Arduino Bluetooth 4WD Car With Steering
by vitorccsiqueira in Circuits > Arduino
8 Views, 0 Favorites, 0 Comments
Arduino Bluetooth 4WD Car With Steering








Bluetooth remote-controlled 4WD car using an Arduino Nano v3 board with steering performed by a servo motor
Supplies
- 01 - 4WD Car Chassis with steering (see section below)
- 04 - DC Motors (3v - 6v)
- 04 - Wheels
- 01 - Arduino Nano v3
- 01 - Arduino Nano shield (recomended, not required)
- 01 - Dual H-Bridge board (L298N or TB6612FNG)
- 01 - HC-05 Bluetooth module
- 02 - Red Leds
- 02 - White Leds
- 01 - Passive Buzzer
- 04 - 150 Ω Resistors
- 01 - 1.0K Ω Resistor
- 01 - 3.3K Ω Resistor
- 01 - 220 Ω Resistor
- 02 - 18650 batteries (3.7v - 4.2v)
- 01 - Battery support
- 01 - SG90 Servo Motor
- 02 - Electrolytic Capacitor (16v - 50v, 8,000 - 12,000 μF)
NOTES:
- TB6612FNG is a modern MOSFET driver with about 90% energy efficiency versus 40-70% for the L298N
Schematics


You can use either a L298N (easier to build) or a TB6612 Bridge (better energy efficiency)
About Car Chassis


This project was designed to have a servo motor steering the front wheels
References:
Install VS Code With Platform IO Plugin

Download and install PlatformIO, a plugin for Microsoft Virtual Studio Code
It is a more robust IDE compared to Arduino IDE. It also allows us to easily create our own private libraries and use a more object oriented code.
Upload the Code
The project is hosted in Github at:
https://github.com/vitorccs/bluetooth-rc-car
Download the ZIP file containing the source code at:
https://github.com/vitorccs/bluetooth-rc-car/archive/refs/heads/master.zip
Once you open the project folder at VS Code with PlatformIO, it automatically downloads and install all library dependencies - much easier than Arduino IDE and risks free of downloading incorrect source or version (!)
Customization
The PINs can be customized in the main.cpp
Fine-tuning customization can be done in the individual files like ServoMotor.h for servo motor angle
or in the DCMotor.h for changing speed parameters
Bluetooth Controller


1) Download and install the free Android app called "Arduino Car"
2) Find and connect to the Bluetooth device called "HC-05" (if asked for a password, type 1234 or 0000)
3) Once installed the app, map the buttons code as shown in the picture
4) I recommend to change the controller joystick type to "Analog"
Advices
Power Supply
I recommend to use high quality 18650 batteries (3.7v - 4.2v, 2200mAh, at least 2C of discharge rate).
Most people prefer to use different power sources for Arduino (5v) and Bridge driver (7.4 - 8.4v).
I prefer to have a single power source and thus a single power switch. However, it was required to use huge Electrolytic Capacitors (around 8,000 to 12,000µF) to prevent Arduino Nano from rebooting when the 04 DC motors drains too much power. The capacitor is also useful to filter some electric noise. Note: in the video recordings above, I used 2x 18650 batteries 2600mAh (3C) and one 10,000 µF capacitor.
It is up to you!
Servo Motor
Be careful if you need to change PINs of PWM motors (PIN_M1_EN and PIN_M2_EN) and Servo (PIN_SERVO) since they cannot use the same Arduino timers.
Resources
Fritzing file
The eletronic schematic was created in the Fritzing software and can be downloaded at