DIY Vending Machine Using Arduino & 1Sheeld

by MahmoudTolba in Circuits > Arduino

29020 Views, 36 Favorites, 0 Comments

DIY Vending Machine Using Arduino & 1Sheeld

DSC_3963.JPG

Simply the machine has four types of candies and each type has it's special code, you should tweet with this special code to get your candy.

Actually we participated with this project at Bay Area Maker Faire last week and I intend to continue my last journey to inspire kids to use modern technologies to create their own toys instead of wasting a lot of time in playing with smart phones or PCs.

Return back to the machine,
If you would like to get a candy from the first flavor you should write C111 between your tweet.

If you would like to get a candy from the second flavor you should write C112 between your tweet.

If you would like to get a candy from the third flavor you should write C113 between your tweet.

If you would like to get a candy from the fourth flavor you should write C114 between your tweet.

That's all :)

What Will You Need!

71-PCS-Household-Tools-Set-Packs-household-drill-Hardware-Engineering-Box-Made-in-China-tool-set.jpg

So here is the list of things you need for this project.
Tools:
1. Screwdrivers
2. Pliers
3. Flush cutter
4. Digital Multimeter
5. Double Sided Glue Tape.
6. Copper Spacers (6mm Male - Female)
7. Duct Tape

Materials:
1. Acrylic Sheets 3mm
2. Plywood Sheets 3mm
3. Screws & Nuts

Mechanism components:
1. 8 x Standard Metal Servo Motor (7.5 kg.cm)
2. Bolt M4 x 10mm

Electronics components:
1. Arduino MEGA 2560
2. 1Sheeld
3. SMPS (5V - 5A)
4. Small Breadboard
5. Jumper Wires (Male - Male)
6. Jumper Wires (Male - Female)

Mechanism & Frame Design

Vending Machine1.JPG
Vending Machine.JPG
Vending Machine3.JPG
Front Side.JPG
Back Side.JPG
Arduino Carier.JPG
Servo carier.JPG
Blocker.JPG
Buttom Side.JPG
Top Side.JPG
Right Side.JPG
Separator.JPG

It all started with a proper design, in my case a few sketches to get a
good feeling for the dimensions and shape. Quickly after the sketching phase came the CAD model. I created my model in SolidWorks. After all the parts were modeled, technical drawings were made. I used these drawings to machine all of the custom parts on the laser cutter.

Since I intend to take this machine with me in a lot of events around the world i designed it to be easy to be disassembled and installed so i used screws and nuts, Martise and Tenon to fix all it's parts.

Mechanism & Frame (Fabrication and Assembly)

DSC_3758.JPG
DSC_3759.JPG
DSC_3760.JPG
DSC_3761.JPG
DSC_3762.JPG
DSC_3763.JPG
DSC_3764.JPG
DSC_3765.JPG
DSC_3767.JPG
DSC_3768.JPG
DSC_3769.JPG
DSC_3770.JPG
DSC_3776.JPG
DSC_3777.JPG
DSC_3778.JPG
DSC_3779.JPG
DSC_3780.JPG
DSC_3781.JPG
DSC_3784.JPG
DSC_3785.JPG
DSC_3786.JPG
DSC_3787.JPG
DSC_3788.JPG
DSC_3789.JPG
DSC_3795.JPG
DSC_3796.JPG
DSC_3807.JPG
DSC_3809.JPG
DSC_3810.JPG
DSC_3811.JPG
DSC_3869.JPG
DSC_3870.JPG
DSC_3871.JPG
DSC_3872.JPG
DSC_3873.JPG
DSC_3874.JPG
DSC_3875.JPG
DSC_3876.JPG
DSC_3877.JPG
DSC_3881.JPG
DSC_3891.JPG
DSC_3892.JPG
DSC_3893.JPG
DSC_3894.JPG
DSC_3905.JPG
DSC_3911.JPG
DSC_3897.JPG
DSC_3912.JPG
DSC_3913.JPG
DSC_3914.JPG
DSC_3924.JPG
DSC_3925.JPG
DSC_3927.JPG
DSC_3928.JPG
DSC_3964.JPG

I used laser cutter machine to cut the machine parts from the plywood and acrylic sheets. Then i used M4*10mm Bolts to fix the servo motors to their carriers.

After fixing the servo motors, fix the Arduino Mega & 1sheeld using the copper spacers to their carrier then fix the power supply, Now you can gather all the machine parts together.

Electronics & Arduino Code

Vending Circuit.png
Untitled.png
FXKS7I4IAAG7G9R.LARGE.jpg
F6SMNW6IAAG7GAE.LARGE.jpg
FQHIMN6IAAG7G93.LARGE.jpg
FJ15KPTIAAG7GBO.LARGE.jpg
FT6U0MLIAAG7GC1.LARGE.jpg
sheelds_a7792edc-c118-469c-bc9f-d3deecfe0a44.png
FT1MX5VIAAG7G7P.LARGE.jpg

The most important part here is powering the servo motors, you should power the servo motors from the power supply directly to avoid resting the Arduino board.

Don't forget to connect all the grounds with each other

After connecting the motors with Arduino & 1Sheeld and power them from the power supply, you should follow these steps:

Step 1:
Place your 1Sheeld on your Arduino board then plug the Arduino to your laptop or PC.
Step 2: Download 1Sheeld Application onto your smart phone. The app is available on the Google play store at http://1sheeld.com/app

Step 3: Download 1Sheeld library

Download OneSheeld library to your computer through this link

Step 4: Extract the folder, copy it, and paste it in your Arduino libraries directory.

Step 5: Open my Arduino Sketch ( you will find it in the attached files

Step 6: Upload your sketch Hesre comes the most important part of the whole tutorial, switch 1Sheeld to the Uploading-mode (this is the switch labeled UART Switch on the board) before you upload your sketch to the Arduino board to avoid serial conflicts between 1Sheeld and Arduino, then press the Upload button in the IDE.

Upload mode is turned on when the UART switch is pushed away from the 1Sheeld logo.

Once you have completed your upload you need to switch 1Sheeld back to the operating mode. Don’t forget! If you don’t switch the UART Switch back to the operating mode your project will not work properly as you will have no communication between 1Sheeld and the Arduino board.

Operating mode is turned on when the UART switch is pushed closest to the 1Sheeld logo.

Step 7: Use 1Sheeld Application

Open 1Sheeld application on your Android smart phone. The application will first scan over bluetooth for your 1Sheeld, it will take a few seconds and the phone will find it. Once it appears on your screen as 1Sheeld #xxxx, you will be required to enter the pairing code (the default pairing code is 1234) and connect to 1Sheeld via bluetooth.

NOTE: If you are having trouble please make sure the bluetooth is turned on for your Android phone and that the Android phone is close to your 1Sheeld.

Step 8 : Access Twitter and Terminal Shields

Select Twitter Shield and Terminal Shield from the shields list and press on the multiple shields icon at the top right of the app.

Share Your Thoughts, Feedback and Opnions With Me!

index.jpg

I will be happy if you shared your kindly feedback with me to enhance this machine :)

Thanks..