This project for university we built a simple scaled replica of a can vending machine.
The coin sensor is replaced by a flex sensor that bends when the coin is inserted in order to give the can.
Step 1: Writing the Code
First of all we needed to create a cheap system that would make the vending machine interact with a coin when it was introduced.
The simplest way and the one we ended up using was the flex sensor that returns a value when the coin inserted due as the flex sensor bends and the resistance that it generates increases.
The code is writen so that it shows in the screen text letting you know stuff as you get the product.
Due to wanting to make a cheap version of it, the device just detects that a "coin" is introduced, for more expensive ones it can use a proper coin detector sensor.
Step 2: Building the Device
First of all we designed the different components of the vending machine using the program AutoCAD. After that we cut it with laser cut.
Then we cut the cylinder in a half and we join it with a tape. This part will be join with the servo. For create the ramp, we join two surfaces with two carpenter's square. We fix it with DIN m3x10. Also we fix the wall with carpenter's squares and screws. Before we join all the pieces with glue, we paint the pieces with black mate spray. After we join all the painted pieces, we cut the metacrilat surface that will be used as the door of the vending machine. We join the metracrilat with the wall using strings. So the final product has one wall (the right one looking at the metacrilat door) that isn't fixed. Also the top cover surface isn't fixed. Because if you have a problem, you could remove it, so it's more easy to solve the problem.