With the Wall-E toy selected as my PiWars entry the next step was to open it up and discover how much space I had to work with. Luckily for me Wall-E is relatively easy to dismantle, with no glue or clips locking the chassis into place and most of the screws easily accessible. The exceptions were the four screws on the back, partly covered by the battery compartment and requiring a triangular screw bit to undo, as well as the screws that hold the axles in place.
The first time I removed the tracks it was with a lot of physical force, pulling on the tracks hard until they came free. I didn't realise at the time but they only came loose after the plastic gear on the axle had cracked, allowing the axle to move within the gearbox. When I finally tried to work out how to remove the axles properly I turned back to the various Wall-E conversions documented on the internet until I found the answer. The axles are held in place by a screw that is hidden underneath the 'B&L' logo and, armed with this knowledge, it only took a few seconds with a drill to finally uncover and remove them.
With the tracks, base and back unscrewed the main body can be pulled up and away. This took a little force the first time, but came away cleanly. The insides have wires running from the top half to the base, so these have to be disconnected to free the two sections. As I didn't know if I'd be needing these connections again in future I tried to unplug them where possible, and if I needed to cut a cable I'd trim it close to the PCB to ensure I had the longest length of wire remaining to work with in future.
|Original PCB and green gearbox!|
At this stage my focus is in validating that Wall-E could be driven sufficiently well to attempt the challenges, so the section with the arms and head was put to one side for future considerations.
The original Wall-E gearbox uses a single motor that allows it to drive forwards or reverse with a turn. Obviously this limited amount of control is insufficient to get through the PiWars challenges, so that needed to be replaced. Along with the gearbox I also removed the existing PCB as it didn't look very reusable, plus the competition requires a Raspberry Pi to be the brains. The speaker, however, I kept as I wanted Wall-E to be able to talk.
Considering ways of making Wall-E move I wanted to keep the weight low to increase stability, so I tried to find a motor that would fit in the side areas of the base. Hunting around I managed to find such a motor, but just couldn't get the axle and shaft to line up. It took quite a bit of time, and various iterations of potential gearboxes, before I finally came to the conclusion it was a lost cause and switched to mounting the motor directly above the axle.
|It fits, but doesn't line up.|
It took a bit of hunting around on the internet to find a way of transferring power from the motor shaft to the axle in a compact enough form to fit but eventually, after trying out a variety of gears, I purchased a set of bevel gears off ebay that got the job done. To get them to mesh correctly I designed a gear box in Fusion 360, based on measurements from the original, that I could create on my 3D printer. It took numerous iterations and tweaks but I finally produced a 3D printed gearbox to hold everything in place.
|Some of the iterations!|
With one gearbox completed and installed it was time to see if Wall-E would move. Now in theory I could have thrown together a motor driver, RPi Zero and a few lines of python to drive the motor, but it was much quicker, and easier, to just wedge a battery into the base and connect the motor directly to it. So that is what I did, making sure the track was moving freely before placing everything on the floor and watching it spin in circles.
Now that I had proof this was a viable approach I printed out the second gearbox (which ended up requiring some slight modifications, as the base wasn't an exact mirror) and moved on to driving the motors in a more controlled way.