Wednesday, 29 October 2014

Marble dispenser

Description
This is another challenging project that took over all my free-time but it made me achieve something that I couldnt think that I was possible to do.
The marble dispenser was a machine that interacts with Twitter and streaming a live feed from a webcam.

Watch the final result:




Problems
The bigger problem was to make an automatic marble dispenser without any human interaction to make it works.
The first idea was to make something like the candy vendor machine, with a rotator dispenser and hook it up with a motor
Of course, as every simple thing, this didnt work as I wanted. The problem was to make a container that wouldnt let marbles stuck in the container.

Solution
The solution came after few days, after a bit of brain storming and a good beer.
The container solution couldnt have made in the short time that I had, but a pre-order columns with marbles placed in a row, this was the way to go.


It might look odd but in the end, it worked and I had less trouble to make sure that one marble was released when the system needed.


Twitter integration
It might sounds strange to connect a marble dispenser with Twitter, but the reason is simple. The idea was to ask questions on Twitter and make a visual action from people's answers.
The visual action was to position two marble dispensers and drop one single ball for each answer received. Here it comes the bottom part of the marble dispenser, where I made one simple system to release only one at the time.

Bottom part
The release mechanism is very simple, it has two main parts:
- The little brick that drag only one marble at the time
- One servo motor that moves the brick


In the picture above, you can see that the brick ( in red ) has a small hole where you can fit a bracket ( in red ) and connected to the servo motor.
The main enclosure ( in orange ) fits the servo and the brick, the motor rotates from 170 to 85 degrees to make sure that the marble is released.

LCD count
To keep track of each answer and have visual reading, I used one of the 7 segments from AdaFruit.
This little guy is super easy to use and the library save you hours of coding or understanding how to send the right number to the IC.



Streaming
I have used one low resolution webcam from Logitech, even because I was streaming a 640x480 because Raspberry pi can't handle a full hd streaming to Ustream.
The resolution maybe let people down, but the cool feature was to have a visual access for people not physically  at the installation.



Source code
I am sharing some of the code from the whole installation and STL files in case you would like to print the same thing.
The code might be not the perfect one you have ever seen but it works, so please dont judge me.
Also this was my first attempt to create something very sophisticated in 3D using TinkerCad.com ( web software ), so my models might be crappy and bad made.



Press


Pictures and Videos













Saturday, 9 August 2014

Ampere meter DIY


Introduction
I always wanted to test my devices and find out what was the real current of each item.
The option was to buy a multi-meter that could do it, but because I bought an ampere meter display for 2 pounds on ebay, I wanted to make it easy to use.

Assembly
I bought a small plastic box and fitted all the electronic inside, even the cable to connect the device to test.


I have used:
  • 2 crocodile clips to be able to clip any cable and measure the current.
  • 1 female and 1 male audio jack, to remove the cable and put it back in the box when it's done.
  • 1 ampere meter from ebay
  • 1 switch to turn on the power
  • 1 9V battery ( from the picture I used something else because I didnt have one )


Usage
The usage is streight forward, turn on the device from the switch, connect the cable and clip your device.
I have tested a DC motor to confirm that everything was working, and it worked!

Of course, with a 9v battery the box would be closed and easy to read.


When I have done with it, I just put the cable inside the box and put it somewhere.








Saturday, 5 July 2014

Bike's lights

Introduction
Since I got my bike, I had to carry around two lights when I was going to cycle on late nights. These lights were small but I was worried to leave them somewhere and cycle without lights.
I came up with a simple solution to make my own lights system and to install it on my bike.


Items
The shopping list is very simple and small, also I could have bought less stuff:
- 4x white leds with wide angle and brighter
- 4x red leds with small angle and brighter
- 8x transistor to switch on and off
- 1x push button to change mode
- 1x arduino pro mini to control flashing mode
- 1x 3 AA battery holder


Lights

I wanted to get something very bright and have arduino to control these lights, but because it was using a lot of current I had to install some transistor.
I am not a genius in electronic, but probably my transistor wouldn't handle the amount of current of 4 leds, so I put one on each led.

An huge amount of hot glue was used to make it waterproof, I am sorry I made something very ugly, but the next version will be better!




Modes
I have coded 3 modes for my bike: both solid, front solid and back flashing, both flashing.
I could have used some small components and a 555 timer, but because I am very lazy and the arduino pro mini was very small, I decided to code it.

The whole electronics is fitted under the seat with some hot glue and good position in case I ride in a bumpy road.

The main switch, that you can reach with your hand, turn on the whole system and in few seconds I am ready to cycle.
I have used heat shrink to cover the cable and to make it less "mobile-bomb", people could think that I just made something dangerous!

The button to change the mode is located on the top bar, where you hands are.
I used a piece of plastic to make sure that it will be "water-proof", but only the first few rains will tell me if I have done a good job.


Final result
The big piece of glue is not good-looking stuff, I will try improve the whole system by using one single transistor and to drill 4 holes into the reflectors.
It will become less ugly and more stable while I am cycling.












Tuesday, 6 May 2014

Arduino caller

Description
I had a big problem in the last few months, and this problem made me spend a lot of money at the end of the month.  This because I was too lazy to buy a "home card" and digit the aboard number.
The solution came quickly after I decided to make my life easier and less expensive, and I came up with the Arduino Caller.


Arduino Caller
The Arduino Caller is basically: one Arduino, two gsm shields and one Ethernet shield.
My theory was:
- One GSM shield with the same network as my current sim, in this case I have free calls
- One GSM shield with one of the cheap sim card to call aboard
- Connect these two shields to talk each others without using the GSM network

After few research I found a cheap and good GSM shield that allowed me to make the "bridge connection" with two audio extensions.





Android
I couldn't complete the whole project without a "nice" application that would help me to make the phone call within one tap.
I made a simple Android app that retrieves all contact from my phone and I can call one of them by using my Arduino Caller.
My theory was pretty forward:
- Get the list of my contacts
- When pressed the number, send it to the "http server"
- Call the number from the GSM shield ( the free one from my network )


 


Conclusion
I am still testing the whole system, but so far I managed to call few times my parents spending just 1-2 pounds.
Also the quality is good, I tried some VOIP services that made my voice funny and some lags or jumps.

I am sure that I need to add few more amends to make my software stable.

Sunday, 9 February 2014

Compile any wallet for coins based on Scrypt

Here a little tutorial how to compile for you linux the wallet, because I always found instructions for windows, at least a binary ready but nothing about how to compile it for linux.

After hours and hours of googling, I ended up on this website, that explains step by step what to do.

I am going to write the simple steps that always worked for me, in case you have trouble you might want to check the website.

1) Get all needed software

sudo apt-get install build-essential libssl-dev \

libdb-dev libdb++-dev libboost-all-dev \libqrencode-dev qt4-qmake libqtgui4 libqt4-dev

2) Check out your wallet's source code

git clone <git source>

Dogecoin: https://github.com/dogecoin/dogecoin.git

3) Compile the wallet

Enter the folder of your source code and type:
qmake USE_UPNP=- USE_QRCODE=0 USE_IPV6=0

then just type:
make

If everything goes well, you should have the binary on the current folder, for Dogecoin would be dogecoin-qt.

That's all, I hope that this little guide has been helpful and you won't google for hours and hours to find the solution.



--------    Other problems --------------


  • Permission Denied
    Example output of the error:
    /bin/sh: 1: ./build_detect_platform: Permission denied

    Solution:
    chmod 755 src/leveldb/build_detect_platform



Monday, 11 November 2013

Strip leds at 5v

Intro:
Are you looking to implement some leds on your project? Do you want a strip leds that works at 5v? Are you interest about strip leds? I hope that one of these questions you have answered to YES otherwise this post will be useless for you =).

I am going to describe what I got on Amazon for a few pounds, just to add on my project some strip leds that could work at 5V instead 12v as usual.


Items:


Teardown:

The strip leds came with a small controller with 3 functions:
  • Light: you can change the colour of the leds with predefined colours
  • Speed/Bright: you can change the speed and brightness
  • Mode: you can change mode between: fading, strobe and solid
In the video you can see how bright they are and a small demo.
 


Under the protective plastic you can find 3 buttons and on the back some components, nothing very interesting, the main chip doesn't have any info printed on it.



The strip leds is a normal RGB, you can see from the image below, it has 4 pins:

  • 5V
  • Green
  • Red
  • Blue
Great news that allows me to re-use this strip leds with my Arduino.




Testing leds: Google plus ( sorry I couldnt upload on youtube)


Arduino Test:

The final conclusion, this simple and "cheap" ( well still 4 pounds but for prototyping is good enough ),  is suitable to be connected on your Arduino.
Below you can see that I tried to give 5v and the Ground to the pin Blue, I got the blue colour.

What you need to do is to connect the 3 pins on your 3 PWM output and try to send values from 0 to 255.
The strip leds will change colour based on what you are going to send on each pins, it's easy, isn't it?

Friday, 25 October 2013

Photo resistor with inverter logic


Intro:
I was looking for a system that allowed me to trigger a circuit when was getting dark, so I found out that with some testing, a photo resistor and a inverter logic I could achieve this goal.

Items:

  • 1x 74HC04N ( hex logic )
  • 1x photo resistor
  • few resistors ( 10-22k )
  • 1x transistor n-channel
  • 1x led
  • 1x battery 5v
  • few jumpers

Wiring:



Connect the battery to the VCC and Ground of your Inverter logic.
The photoresistor needs to be connect to 5v on one pin and the other needs a resistor 10-22k to the ground and a jumper to the Input 1 on your Inverter logic. The resistor has to be tested on the final circuit because based on it, the system trigger the transistor when is very dark or less dark.
Connect the output 1 on the gate of your transistor, the drain to the led and the source on the ground. Remember to bridge the gate and source with 10k!
Complete everything by connecting the other pin of the led to the 5v, better to put a resistor if you dont want burn it.

After all this is done, try to cover it or switch off your light, you should see the led lighting up, if it doesn't work, try with something less than 10k.


Video: