Introduction: My First Toy Hack
This instructable will focus on how to control a "My First Camera" toy from Walgreens using Arduino. Here's what you'll need:
- My First Camera toy ($6.99 - Walgreens)
- Protosnap Arduino board ($29.95 - Sparkfun)
- breadboard ($5.30 - Amazon)
- Hook-Up Wire ($16.50 - Sparkfun)
- two electric relays ($5.59 - Amazon)
- small phillips head screw driver
- soldering iron
- Arduino for windows/mac
Step 1: Disassemble Your Toy
Unscrew the back or your toy with a screwdriver. Be careful as you separate the back since the wires might snap. Save your screws in a container to keep from losing them.
Step 2: Map
Before disconnecting any wires, record where your wires connect. This is incredibly important. If the wires break before you can write down where they go, there's no way to know what attached where and by extension what anything does. If this happens you will have to buy a new toy.
Step 3: Solder Your Wires
The wires used in the toy are stranded wires. To use them in the breadboard, we'll need to solder solid wire to the ends of them.
Step 4: Plug in the Relays and Arduino
Plug your arduino board and relays into the breadboard.
Step 5: Connect the Wires
Attach the components to their corresponding wires according to the schematic.
The relay is chosen as a replacement for the switches in the original toy circuit. In the above image, the leftmost and rightmost wires connect to a switch in the toy. The inner two go to one of your ports and GND (ground) on your Arduino board. The ports we're using are A0 and A1. Since relays are unpolarized, the order of GND and the port is arbitrary, as long as they're in the middle.
The relay functions by receiving a signal from the Arduino, which completes the circuit as if the switch were turned "on". The Arduino controls which port is turned on and that allows us to control, in turn, which switch.
Step 6: Open Arduino
If you don't have Arduino on your computer, go here and download it.
Open Arduino. Open a new document.
Step 7: Upload the Sketch
Copy the code from here and paste it into the Arduino window.
Press the "Upload" Button.
This tells the arduino board to turn on the relay attached to A0. Pause. Then turn it off. Pause. Then turn on the relay attached to A1. Pause. Then turn it off. We're using relays to replicate the switches (attached to buttons) on the original toy. We then control those using Arduino.
Step 8: That's It!
Enjoy your Arduino-controlled toy! Try playing with the code and see if you can get it to play in a pattern.