I have wanted to make an Arduino based 4 wheel drive car with a direction based on a servo motor, and who could be driven with an IOS phone with bluetooth and Dabble pad app.
Project Architecture
This Advanced 4WD Robot Car uses a hybrid steering system. Unlike traditional differential drive (where turning is achieved by spinning wheels at different speeds), this design uses a Servo Motor to physically pivot the front steering rack, similar to a real car. The propulsion is handled by four DC motors powered by an L298N Motor Driver.
iOS Bluetooth Integration
Standard HC-05 Bluetooth modules are not compatible with iOS devices due to Apple's strict MFi requirements. To solve this, this project uses the HM-10 BLE (Bluetooth Low Energy) module. The HM-10 allows the Arduino to communicate directly with an iPhone or iPad via the Dabble App, which provides a virtual gamepad interface.
Component Breakdown
- L298N Dual H-Bridge Bridge: Controls the speed and direction of the four DC motors. It can handle high current and provides the necessary logic to drive the wheels forward, backward, or at variable speeds.
- SG90 Servo: Mounted on the front axle to control the steering angle.
- Power Source: Dual 18650 Li-ion batteries are recommended to provide the 7.4V - 8.4V needed for the motors and the Arduino regulator.
Control Logic with Dabble
The Arduino code utilizes the Dabble library to parse incoming serial data packet from the iOS app.
- When the virtual joystick moves left or right, the Arduino command
myservo.write(angle)adjusts the front wheels. - When the joystick moves up or down, the L298N receives PWM signals to drive the DC motors proportionally.
This mechanical steering approach provides a much smoother and more realistic driving experience compared to tank-style turning.