A Bluetooth-controlled car using Arduino and a Python desktop GUI built with Tkinter.
arduino/β Arduino sketch to control the car motors via HC-05 Bluetooth module.python_gui/β A desktop app built in Python using Tkinter to send control signals.images/β Screenshots or visual assets (optional).
- Arduino Uno/Nano
- HC-05 Bluetooth Module
- L298N Motor Driver
- 2 DC Motors
- Jumper Wires
- Power Supply
- Python-capable PC
- Toy Wheels
| Component | Arduino Pin / Connection | Notes |
|---|---|---|
| HC-05 Bluetooth | ||
| HC-05 TX | D10 (Arduino RX via SoftwareSerial) | Connect directly |
| HC-05 RX | D11 (Arduino TX via voltage divider) | Use 1kΞ© + 2kΞ© voltage divider to step 5V β 3.3V |
| HC-05 VCC | 5V | Do NOT use 3.3V pin |
| HC-05 GND | GND | |
| HC-05 KEY (optional) | Leave unconnected | Only if you want to enter AT command mode |
| L298N Motor Driver | Arduino Pin / Connection | Notes |
|---|---|---|
| IN1 | D2 | Controls Motor A direction |
| IN2 | D3 | Controls Motor A direction |
| IN3 | D4 | Controls Motor B direction |
| IN4 | D5 | Controls Motor B direction |
| ENA | D6 (PWM) | Controls Motor A speed |
| ENB | D7 (PWM) | Controls Motor B speed |
| 12V (Motor Power) | Connect to external battery (7.4Vβ12V) | Powers motors, NOT Arduino! |
| GND | Connect to battery GND and Arduino GND | Common ground is essential |
| 5V Output (optional) | Can power Arduino if jumper on L298N | Or leave disconnected if Arduino powered by USB |
| Motors | Connect to L298N Motor Outputs |
|---|
- Voltage Divider: Use a simple resistor divider on HC-05 RX pin to avoid damaging the module (5V Arduino TX β 3.3V HC-05 RX).
- Power Supply:
- Use a separate battery (7.4Vβ12V Li-ion or NiMH pack) to power motors through the L298N.
- Do NOT power motors from Arduino 5V pin.
- Common Ground: Make sure Arduino GND, battery GND, and L298N GND are connected together.
- SoftwareSerial Pins: D10 is RX (Arduino receives), D11 is TX (Arduino transmits).
- PWM Pins: D6 and D7 support PWM for speed control.
| Command | Action |
|---|---|
| F | Move Forward |
| B | Move Backward |
| L | Turn Left |
| R | Turn Right |
| S | Stop |
- The Arduino listens for single-character commands over Bluetooth (F, B, L, R, S).
- The Python GUI sends these commands via serial when buttons are pressed.
- Motors are controlled through the L298N driver based on the command.
Run the GUI with:
cd python_gui
python bt_car_controller.py
Install required dependencies:
bash
Copy
Edit
pip install pyserial
π Permissions
Make sure your user has permission to access the COM port (on Linux/Mac, add user to dialout group).
π License
This project is MIT Licensed. Feel free to use, modify, and share!