Toy Truck Powered by Raspberry Pi

Here is a great way to impress your fiends when your out an’ about at the park, by modifying a broken toy Truck/Car with a Raspberry Pi and Adafruit’s DC & Stepper Motor Pi HAT , to existing electronics . And for the controller to run the car/truck, you basically have two options to choose from, as shown in the pictures and video above –

#1 KeyBoard Controller – if you like playing computer games using your keyboard ,follow the steps below to upload the python program to your Pi to use the wireless keyboard to control your toy car/truck as shown in the second part of the video above.

#2 Mobile controller using a flask web app – use your mobile/tablet to control the truck, by connecting to the Pi’s WiFi network and opening up the flask controller web app on your mobile browser as shown in the first part of the video above.

Step 1: Getting the Monster Tuck ready for the Pi

Remove the screws from the Monster truck and gently dis-assemble the parts.

Be careful and patient ! while getting the circuit board and the battery holder out to prevent it from damaging the battery holder.

In my case, I got the monster truck from my neighbor after his 6 year old broke the receiver and yes the truck was also in a bad shape. After repeatedly trying to fix the controller , I decide to strip the truck as shown in the picture above and check if the motors and battery holder were still functional.

Step 2: Test the motors and Solder wire to the battery pack

Before you get to interesting bits below test to check if the DC motor are still functional , in my case I used a 4 AA battery holder to test both the motors as shown in the picture above.

Now desolder the circuit board using a soldering iron from the battery holder.

Once done add batteries to holder and do a quick voltage test using a multimeter as shown in the picture above, in my case the battery holder uses 5 AA batteries , which means a output voltage of about 8-8.5 Volts.

Solder some breadboarding wire to the two ends of the battery holder as shown in the picture above.

Add use 4 pieces of bread boarding wire, just long enough to reach the motor wires to M2 and M3 of the motor shield( here you can connect it to M1 and M2 , if you do so, remember to modify the code in the steps below)

Connect the battery holder wired to the + and – holder as shown in the 4th picture.

Connect the wires from M2 to the back motor which rotates foward and backward

and connect M3 to the motor in the front which is used to turn left and right.