Introduction: How to Create Your Own Candy Grabber Machine‬‏ Using Arduino & 1Sheeld

Simply, this project is a candy grabber machine controlled using Arduino and 1Sheeld via Game pad Shield.

1Sheeld is a platform for Arduino that allows you to tap into your smartphone's sensors and capabilities and lets you use them in your Arduino projects. Basically, It is a hardware shield that sits on top of your Arduino board and communicates over Bluetooth to this Android app, to transfer data between it and your smartphone.

And in our case i have used Gamepad Shield which is a GUI on my smartphone which has some buttons like PlayStation joystick and connected to Arduino through Bluetooth and i used it control the motors of my machine to catch a candy then put it in the box at the bottom left corner.

I have made this project to participate in Cairo Mini Maker Faire to make children happy and inspire them to use modern technologies especially developing platforms such as Arduino and 1Sheeld to create their toys.

I've included all the needed files ( CAD drawings, Circuits schematics and layouts, Arduino codes and Adobe Illustrator files for laser cutter) to help any one to build his own machine.

Step 1: What Will You Need!

Picture of What Will You Need!

So here is the list of things you need for this project.

Tools:
1. Screwdrivers
2. Hammer
3. Pliers
4. Flush cutter
5. Wire Stripper
6. Soldering Iron
7. Soldering Iron Stand
8. Solder
9. De-soldering pump
10. Soldering Helping Hand Tool With Magnifying Glass
11. Digital Multimeter
12. PCB Files
13. Iron
14. Double Sided Glue Tape.

Tools for the PCB:

1. Copper sheets (single side)
2. Steel wool ( to clean the copper sheets)
3. Heavy dry electric iron
4. Glossy photo paper
5. Laser jet printer
6. PCB cutter
7. Etching solution ( I use Ferric Chloride)

Materials:
1. Aluminum Bars
2. Acrylic Sheets 3mm
3. Acrylic Sheets 5mm
4. Plywood Sheets 3mm
5. Screws & Nuts

Mechanism components:
1. 3 x DC Geared Motor (2.9 Watt , 150r/min , 0.23 N.m).
2. 1 x Continuous Rotation Metal Servo (6 kg.cm).
3. 8 x Shaft End Support 8mm
4. 6 x Linear Motion Slide Block (Inner Dia 8MM)
5. 4 x Stainless steel Shaft Dia 8mm * 1M Length
6. 5 x Timing Pulley (20 teeth 5mm inner diameter)
7. Timing Belt
8. Bolt M4 x 20mm
9. Bolt M4 x 20mm
10. Bolt M5 x 20mm
11. Bolt M5 x 30mm
12. Crystal String
13. Nylon Cable Tie Belt

Electronics components:

The electronics system consists of 4 circuits:
1. Arduino MEGA 2560
2. 1Sheeld
3. My Motor Driver Circuit
4. 7 segment circuit

Now, I will list the components of my motor driver circuit and 7 segment circuit.

- My own motor driver circuit :

1. 8 x Relay 5v
2. 8 x Transistor BC547
3. 25 x Resistor 1k ohm
4. 13 x Red LED 5 mm
5. 4 x Green LED 5 mm
6. 16 x diode 1N4007
7. 1 x DC socket
8. 1 x Fuse Socket
9. 1 x Fuse 3A
10. 1 x Male pin header
11. Single Side Copper Sheet

- 7 segment circuit:

1. 2 x 7 segment 3 inch common Anode.
2. 2 x ULN2803
3. 14 x Resistor 220 ohm
4. 2 x DIL socket 18 pin
5. 1 x Male pin header
6. Single Side Copper Sheet

- Adapter 12V / 3A for Motors and 7 Segment
- Adapter 6v / 2A for Arduino

Step 2: Mechanism & Frame Design

Picture of Mechanism & Frame Design

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 to fix all it's parts.

Step 3: Mechanism & Frame (Fabrication and Assembly)

Picture of Mechanism & Frame (Fabrication and Assembly)

Regards the machine frame, I have used aluminum bars to create the frame of the machine, then i used transparent acrylic sheets to cover the front and the sides of the machine to enable the people to see what inside the machine. But i used plywood sheets to cover the back side of the machine and i used laser cutter to engrave the machine name and to cut my company logo.

Also I have used acrylic sheets to create the gripper and the mechanism.

Step 4: Electronics Circuits Design ( Schematics - PCB Layout)

1Sheeld Mobile Application has a long list of shields, you should select Game pad shield from this list. The mobile application is connected to 1Sheeld through Bluetooth. when you pressed on any button from Game pad shield the application will send data to 1Sheeld then Arduino will control the motors through Relays board and the 7 segment counter will count down starting from 60 (1 minute), when the counter reach zero your game will over and your smart phone will play a game over soundtrack :D

To add the soundtrack, after selecting the shields from the list, open Music Player shield from the top left corner then press on the gear icon to add the desired soundtrack from your files.

Relays board is simple circuit to control the DC motors, you can check it's schematic for more information.

I've uploaded all schematics and PCB layouts needed to enjoy building your own candy grabber machine ( you will need to use Professional Proteus 8.0 SP2 to open the design files ).

I will be pleased if you shared me your enhancements, opinions, notes, ... etc.

Step 5: Arduino Code

Picture of Arduino Code

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
Here 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 Game pad Shield

Select Game pad shield from the shields list and press on the multiple shields icon at the top right of the app.

Step 6: Kids Enjoy Playing With My Machine :)

Picture of Kids Enjoy Playing With My Machine :)

Finally, people enjoyed playing with the machine eating candies especially the kids :)

Comments

IanPerkins (author)2015-04-05

This is so cool, kudos on an epic project my freind.

MahmoudTolba (author)IanPerkins2015-04-07

Thanks Ian for your nice words :)

verdelj (author)2015-04-06

awesome, I am about 50% done building one for my daughters 3nd bday.

MahmoudTolba (author)verdelj2015-04-07

Keep going and don't hesitate to ask me if you need any help :)

About This Instructable

9,840views

178favorites

License:

Bio: Mahmoud Tolba is an Egyptian engineer who is passionate about building intelligent robots. using his expertise in robotics, embedded systems, electronics, computer vision, programming and ... More »
More by MahmoudTolba:How to control your light switch from your smartphone?How to build Sauron The Lord Of The RobotsAutomated Clothes & Shoes Donation Machine
Add instructable to: