So, this is what happened when I bought a cute robot, pulled its head off, and replaced its brains with a Raspberry Pi!
I had some time off over Christmas, which means I end up with time to do fun stuff like hacking toy robots, then making fun movies made with hacked toy robots….
This started I went to a favourite store of mine in London just before Christmas (please note other large toy stores are available!) where I found this very cute, fairly dumb, but remarkably not that overpriced, robot kit. How could I not take it home?
This particular version is called a ‘Tobbie’ but it is a generic kit that I’ve now seen marketed under several different names ranging in price from £15-40 for an identical item.
The actual kit took only an hour or so to put together but several things struck me during the build. Firstly, the actual quality of the components was really good for a cheap toy kit.
The 100+ piece kit – my idea of Friday night heaven!
Also, the head turning and walking movement is all done with just two motors. The mechanism means the direction the head is facing determined the direction of travel. It is an elegantly simple motion and as it’s only two motors, that makes the possibility for hacked control much more straightforward.
A quick look inside during the build…..
The legs just snap together and build up into this really lovely mechanism….
So what you end up with is a *really* cool, but not very bright little robot. It does IR follow / avoid and that’s about it.
From Tobbie – to Zobbie!
I think we can all see where this is going.
It took about 0.5 seconds of playing with the original to realise I was, of course going to have to see how we could improve on its abilities. It became really apparent that a Pi Zero, power, DC/DC regulator etc. weren’t going to fit inside that head… so it was going to have to go….
You have to ‘unbuild’ the kit almost all the way back to the start, this then allows for removal of the head which conveniently then just leaves the wires for the two motors exposed.
I built this from parts I had at home, there are a myriad ways of doing this in terms of controllers etc but I used the following for this build:
- Raspberry Pi Zero W
- PiBorg ZeroBorg Motor Controller
- Pimoroni Blinkt – for moody eyes
- DC/DC converter
- PS3 Controller for manual control
- Pi Camera Module / OpenCV for autonomous control
Here’s an early test layout to check sizing of components.
I designed a fairly simple head to replace the existing one that could hold all of the components and a battery. I then designed a new face that uses a Pimoroni Blink to add moody eyes. There is also a Pi Camera module mounted between its eyes and I’ve just been adding autonomous control using OpenCV.
Small paper covers work really well to diffuse the Blinkt and make the eyes glow!…
I then used two (fake!) Lego blocks to make nice simple mounts for the new head…
Which I then just glued in place and fed the motor wires up through from the body.
There is a boot switch mounted on the back of its head. On boot it runs in manual mode which uses a PS3 controller connected over Bluetooth. The control code is largely based on the sample code provided by PiBorg for their ZeroBorg board. I also followed their setup for the PS3 controller as this can be problematic and their method has always worked for me. The colour of the eyes can be changed with the shoulder buttons and the overall control and mechanical motion is really lovely.
This has been a really fun project to work on thus far. I’m keeping going with the autonomous coding, I want to take Zobbie to Pi Wars in March where hopefully it’ll be able to complete a couple of the challenges (just for fun! – I’m not competing this time round!)
If you want to have a go yourself, the 3D printing stl file for the head can be found on Thingiverse HERE
And the code can be found on my GitHub repo HERE
Until next time…..