Wireless nunchuk controlled animatronic doll
This instructable will focus more on the coding and wiring than on the building. Since the doll you use for this project will play a major role in how you mount and house the components and the doll you use most likely will not be the same one I used, the exact way I mounted the components may not work for you.
Step 1: Main materials
NOTE: I origianlly tried to do this with an Arduino Uno but the code wouldn’t work for the newer version. You also have to use the arduino 18 software to compile and load the code
2. Bread board for test wiring
3. universal blank circuit board
4. servo, this one is a pan/tilt
5. wireless Kama nunchuk
NOTE: I know that this code works for this brand of wireless chuk. I cannot say for sure if other brands will work. The code I used was based on code written specifically for this brand of chuk.
6. Nunchuk extender cable
NOTE: This is what i used to connect the nunchuk to the Arduino, there are adapters you can buy that will get the job done as well. I’m not sure if all the wiring will be the same though
7. soldering Iron and solder
NOTE: I got mine from Hobby Lobby, the limbs and head are plastic and the body is cloth
9. power switch
10. momentary switch use for reset
11. small cardboard box to house Arduino and circuit board
12. 3″ PVC pipe cut to fit in doll
13. battery, this one is 7.2 Volts
NOTE: not necessary, used to hold extra components and the nunchuk
15. small speaker
NOTE: used with the wireless microphone to provide a way to make the doll “talk”
16. wireless microphone
17. wall wort
NOTE: needed to cut off the end to attach to the battery to be able to power the arduino with it, must be center positive
18. RC 7.2V battery connector repair kit
NOTE: used to connect to the battery so that we can splice this cable instead of the actual battery cable
19. wire for soldering to circuit board
20. various tools including screw driver, screws, drill, small saw, wrie cutters, wire strippers, electrical tape, bracket, wire, needle nose pliers. etc.
21. needle, thread, scissors, cloth (I used an old pillow case)
22. length of chain, length of material that looks like back pack straps
NOTE: optional to make back pack and add chains to pants
Step 2: Nunchuk Extender Cable connection
This section is basically a repeat of parts of another instructable, some photos have been taken from said instructable. See link below:
1. cut off the male plug end of the cable
2. strip the white wire insulation to reveal the inner wires
3. expose the inner wires: my cable only had 5 colored wires and some strands of exposed wire wrapped in some white paper
4. Now that you have access to all the wires, strip a portion of each one to expose the wires inside
5. Only 4 of the wires are used. Look in the female end of the cable. There are 6 contact points: 3 on top, 3 on bottom. The outside 4 are used while the 2 middle ones are not. See diagram above.
6. Now you need to find out which wire is which contact point. To do this, you can use a multimeter set to measure resistance. Use one lead of the multimeter to make contact with one of the points in the female socket of the cable and use the other lead to make contact with the exposed portion of a colored wire. When you find the wire that coresponds to the contact point in the socket, the multimeter will read 0 ohms. See the video if you are confused.
7. when you have discovered which wires are which, label them so you wont forget. I cut off the unused wire to keep it out of the way.
8. you may want to solder the ends of the wires a little to make a stronger solid wire that is easier to plug into the Arduino than the thin splayed wires the way they are. Here is a link to a video on how to solder for those of you who are like me before this project and have never used a soldering iron:
Be sure not use too much solder or the wire will be too thick to plug into the arduino
Step 3: Setting up the Bread Board for testing wiring
1. attach jumper cables to the servos. you will need one for the power, ground, and control for each servo.
2. use the bread board to power the servos and the nunchuk. You can wire your bread board how ever works best for you, but I have provided my wiring set up for your reference. Here is a video on bread board basics for those of you new to this:
3. wire the Arduino: this will include power and ground from the breadboard, SDA and SCK of the extender cable from the bread board, and the control jumpers from the servo.
4. go ahead and plug the nunchuk receiver into the extender cable
5.Once everything is wired you are ready to load the code and test it out
Step 4: The code
In this step we will compile and load the code and test our wiring.
1. connect the arduino to the computer
2. open the Arduino 18 program. If you dont already have it, you can download it from the Arduino webpage:
3. make sure you have the correct board type selected and the correct usb port selected before continuing
4. copy and paste the code found below. This code was written using code from user bradlight on this forum and code from my instructor but I’m not sure who wrote it: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1259091426
5. compile the code
6. If there are no errors (there shouldn’t be), upload the code to the arduino
7. when the code loads you should now be able to control the servo by tilting the nunchuck left, right, up, or down. If the servo is not responding, hold the reset button, sync the nunchuk, then release the reset button. I have found that the nunchuk must be synced before the code starts running or the servo gets stuck. This is why my design includes a momentary switch for a reset button.
For more detail: Wireless nunchuk controlled animatronic doll
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw
This Post / Project can also be found using search terms:
- doll circuit connection