How to make a modified Bluetooth controller car with a Raspberry Pi Pico board
Hello and welcome back! In this project, we’ll learn how to make a modified Bluetooth controller car with a Raspberry Pi Pico board. I’ve added front lights and a horn to this car for a more realistic feel. You can control it using the SriTu Hobby Bluetooth controller app, making driving the car with your smartphone easy. You can also control it by voice and gesture. For this, I used the HC05 Bluetooth module to enable wireless communication and the L293D motor driver IC to effectively control the car’s motors. I also designed the PCB for the car chassis using JLCPCB, so you can easily connect all the components without wires.
This project is very important for your final projects as it covers various skills like electronics, programming, and PCB design. You can also buy all the components easily from our shop, where we provide high-quality parts to ensure your project is successful.
- How to use the Raspberry Pi Pico board – Click on me
- You can download the SriTu Hobby app using this link — Download
Ok, let’s do this project step by step. The required components are given below.
- Raspberry Pi Pico board x 1 — Our store / Amazon
- HC-05 Bluetooth module x 1 — Our store / Amazon
- L293D motor driver IC x 1 — Our store / Amazon
- IC base x 1 — Our store / Amazon
- LM7805 Voltage regulator x 1 — Our store / Amazon
- 100uf Capacitor x 2 — Our store / Amazon
- 5mm white LED x 2 — Our store / Amazon
- 35 ohm Resistor x 2 — Our store / Amazon
- 0.1uf Capacitor x 1 — Our store / Amazon
- 1N4007 Diode x 1 — Our store / Amazon
- Barrel jack socket x 1 — Our store / Amazon
- 5v Active buzzer x 1 — Our store / Amazon
- DIP slide switch x 1 — Our store / Amazon
- Two-pin terminal x 2 — Our store / Amazon
- Female header x 2 — Our store / Amazon
- Gear motor x 2 — Our store / Amazon
- 65mm Robot wheel x 2 — Our store / Amazon
- Cater wheel x 1 — Our store / Amazon
- Li-ion battery x 2 — Our store / Amazon
- Li-ion battery holder x 2 — Our store / Amazon
Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.
Step 1
Firstly, identify these components.
Step 2
Secondly, let’s order PCBs for this project. For that, follow the instructions below.
- First, go to the JLCPCB official website and log in to your account. If you are a new customer, please use my link here to register and get $60 new user coupons.
- Now, click the instant quote button and upload the Gerber file. You can download it using the link below.
- Gerber file — Download
- I have ordered 5 PCBs with Purple color. Then, select the build time and shipping. Finally, click the save to cart button.
Step 3
Thirdly, when the package is received, unbox and check the quality of these PCBs. Now you can make a superb Bluetooth control car.
Step 4
Now, place the one-by-one components on the PCB and solder them. Also, bend and mount the LEDs on the PCB.
Step 5
Next, connect the wheels to the gear motor and install them on the bottom side of this PCB. For that, I have used the pieces of double tape. Then, put the wires through the holes.
Step 6
Afterward, install the caster wheel rear side of this chassis. Then, temporarily connect the gear motor wires to the terminals.
Step 7
Next, connect the motor driver IC, Raspberry Pi Pico board, and Bluetooth module to the PCB. Then connect the Raspberry Pi board to the computer.
Step 8
Now, let’s upload the Micro Python script to the Raspberry Pi Pico board. For that copy and paste the following script to the Thonny IDE.
- Program and Gerber file — Download
# Include the library files
from machine import UART,Pin, PWM
from time import sleep
#Lights
led1 = Pin(21,Pin.OUT)
led2 = Pin(20,Pin.OUT)
#Horn
buzzer = Pin(19,Pin.OUT)
# Set the motor driver pins as output pins
ENA = PWM(Pin(2))
IN1 = Pin(3,Pin.OUT)
IN2 = Pin(4,Pin.OUT)
IN3 = Pin(5,Pin.OUT)
IN4 = Pin(6,Pin.OUT)
ENB = PWM(Pin(7))
uart = UART(0, 9600)
# speed of this car
speed = 60000 # 0 - 65025
ENA.duty_u16(speed)
ENB.duty_u16(speed)
def forward():
IN1.on()
IN2.off()
IN3.on()
IN4.off()
def backward():
IN1.off()
IN2.on()
IN3.off()
IN4.on()
def left():
IN1.on()
IN2.off()
IN3.off()
IN4.on()
def right():
IN1.off()
IN2.on()
IN3.on()
IN4.off()
def stop():
IN1.off()
IN2.off()
IN3.off()
IN4.off()
while True:
if uart.any():
value = uart.readline()
print(value)
if value == b'U':
forward()
elif value == b'D':
backward()
elif value == b'L':
left()
elif value == b'R':
right()
elif value == b'S':
stop()
elif value == b'1':
led1.on()
led2.on()
elif value == b'2':
led1.off()
led2.off()
elif value == b'3':
buzzer.on()
elif value == b'4':
buzzer.off()
- Now save this script on the Raspberry Pi board as main.py. Then, click the run button.
Step 9
Next, remove the USB cable and install the battery holder on the back of this car. Then, put the battery into the battery holder and connect it to the barrel jack. Finally, power up this car.
Step 10
Now let’s set up the Bluetooth controller app step by step. Follow the instructions below for that.
- First, download and install the SriTu Hobby app from the Play Store.
- SriTu Hobby app — Download
- Now, open this app and click the “control” button.
- Then select Remote Control.
- Next, click on the gear wheel button and find your device. In this case, you need to enable location and location permission. And then, select your device. Then, it will connect.
- Also, you can change the modes using the arrow button.
- Now, it will connect and you will see the green indicator on the remote control. Then, check the LED bulbs, buzzer, and motor directions.
- If the motors are not rotating properly, please change the motor wires. I have to change them.
Now you can control this car using your SriTu Hobby Bluetooth controller app. Ok, enjoy this project. The full video guide is below. So, we hope to see you in the next project. Have a good day.
Troubleshooting tips
- Check gear motor connections.
- Connect the motor driver IC correctly.
- Save this script as main.py
- Check the power source.
How to make a modified Bluetooth controller car with a Raspberry Pi Pico board