Again (well I repeat this a lot), not a comprehensive write up because it was a quick a dirty build but read on for the short description and a visual walk-through.
Robots & Dinosaurs (the Sydney Hackerspace) is co-located with the Sydney Robot Workshop, or to cut to the point, there are A LOT of Daleks there! I loved Doctor Who as a kid but building a large life size replica of a Dalek seemed a bit too hard for lazy me. eBay fluffy Dalek to the rescue!
It is a decent size and only costs around $25 including shipping, should fit a router! Cute little bugger, there’s even a BONUS! Recorded voice module! Win!
Ripping apart a plush Dalek isn’t as emotionally challenging as tearing apart a teddy bear. Using some sewing tools to remove the thread is handy so you don’t have to incise into the toy. I pulled out the battery holder so I knew where the wires were, just in case.
Digging into the fluffy Dalek reveals the inner workings. It is basically comprised of a battery module, a switch for activating the voice and a voice module that integrates the speaker wrapped in the blue cover pictured below. Of course there is a lot of stuffing as well!
Since we’re hacking though, we need to go deeper (no Inception jokes thanks) and see how the voice module ticks. Luckily it is very easy to pry apart with a small flat screwdriver and inside shows a small speaker wired up to a PCB. Surprisingly for something that is off a mass produced toy, the PCB is extremely well labelled.
Now that we can see all the apparently simple innards, we need to figure out how it ticks. A common mistake that many people make when they take things apart to learn how they work is that… well they take it apart. The easiest way to understand how something works is to keep it in working order and observe it working. In the case of the Dalek, I kept all wiring in place and and measured across various points as I squeezed the Dalek to make it squeal.
The two wires coming in from the battery were obvious starting points and measured 4.75V. Great, this will go well with the USB 5V power of the router.
The ‘switch’ that activates the voice module should be a simple normally open contact based on assumption. What assumption? It is probably safe to assume that whatever you buy that is made in China is made as cheap as possible. Which leads to the next question what does the switch do? The switch comes in via two white wires and with a multimeter we can simply measure each wire with reference to the ground or black wire from the battery. We take a set of measurements with the switch in its normal state, as well as when it is ‘squeezed’. What do we find? We find that the switch pulls low a 4.75 voltage to active the voice module.
i.e. to activate the voice module, we need to pull the “TG” pin near the VCC/+ve (red wire) low. One of the simplest ways to effect this voice module is to use an open collector output.
Now that the Dalek has been hacked open and its inner workings deciphered, we can try figure out what components we need to make it a remote control toy.
So the electronics include :-
- Brains – TP-Link TL-WR703N Router [eBay?] ~$20
- Locomotion – 2 x Continuous Rotation Servos ~$3.40ea
- Interface – Pololu Maestro 6 USB Servo Controller ~$20 (Or ~$28 from LittleBirdElectronics in Aus)
- Battery – Zippy 6.6V 700mA LiFePO4 ~$2.70
- Power Regulator – HobbyKing 3A / 5V UBEC ~$3.70
- The fluffy Dalek and its innards of course…
The Pololu Maestro 6 USB Servo controller is really good because it is USB controlled via a simple serial interface and the outputs are configurable so that one channel can be used as a general purpose output, which conveniently able to drive the voice module. Like in the previous example project, I found the HobbyKing UBECs to be extremely good value for money and their small package is an added bonus.
Since I have a 3D printer at home, replacing the ‘base’ of the Dalek was relatively easy.
If you’re interested in a 3D printer and you’re in Oceania (Australia/New Zealand), please consider buying the Up! printer using my Affiliate Code Here [seriously!]
Easy isn’t necessarily without pain and I think I’ve said before that having access to rapid prototyping tools like a 3D printer at home just lets you make mistakes quicker! Yup that’s right, the wheels don’t fit through the base plate.
Yup, definitely screwed up the holes in the base for the wheels but the little mount for the Maestro 6 to sit on the router looks nice though.
Making mistakes quick is a good thing though, now that I have a defective base it is relatively easy to measure how ‘wrong’ I was on the measurements and adjust. A short while later on the printer, everything fits! Notice the black on the printed wheels, this is plasti-dip to improve traction. The unpowered roller is also 3D printed held on by two M3 countersunk screws from each side mounted on flanged 3x6x2.5 bearings (rotates real nicely). Strips of Velcro (the hook bits) is attached to the sides of the base to ‘stick’ onto the fabric sides of the Dalek.
#!/bin/sh #This script decodes a url encoded query string and sends it to ttyACM0 printf $(echo $QUERY_STRING | sed -e 's/%/\\x/g') >> /dev/ttyACM0
All it does is convert whatever query string is received from urlencoding back to binary, and send it straight out the serial port (the Maestro attaches as ttyACM0). Neat eh?
Another tip for the budding hacker is to test your software before you put everything together! It is very important, you wouldn’t want your robot to run away or you taking apart something you just painfully assembled.
The software used in this example project is available here :- cutex_2012-08-13.
- Create directory /www/cutex/
- Copy index.html to /www/cutex/
- Copy ‘serial.sh’ into /www/cgi-bin
- Make sure serial.sh is executable ( ‘chmod +x serial.sh’)
Connect to the router, browse to the control page e.g. “http://192.168.1.1/cutex/”
- Initial ‘touch’/’press’ down sets the starting point,
- Move the cursor/touch up to go forward
- Move the cursor/touch down to go backward
- Move the cursor/touch left/right to rotate
- Exterminate button activates the voice module
- Note, there is some issue with the latest webkit browsers like Chrome for this button… I didn’t bother to look into it, use Dolphin HD if you’re using Android.
Note : You don’t really need to use a plush toy for this project It was just cute