Skip to content

Dheemanth07/Bluetooth-car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— Bluetooth Car Controller

A Bluetooth-controlled car using Arduino and a Python desktop GUI built with Tkinter.

πŸ“¦ Project Structure

  • 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).

πŸ›  Hardware Used

  • Arduino Uno/Nano
  • HC-05 Bluetooth Module
  • L298N Motor Driver
  • 2 DC Motors
  • Jumper Wires
  • Power Supply
  • Python-capable PC
  • Toy Wheels

Wiring Guide for Bluetooth Car Controller

Arduino UNO Pin Connections

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

Important Notes

  • 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.

🚘 Commands Used

Command Action
F Move Forward
B Move Backward
L Turn Left
R Turn Right
S Stop

🧠 How It Works

  1. The Arduino listens for single-character commands over Bluetooth (F, B, L, R, S).
  2. The Python GUI sends these commands via serial when buttons are pressed.
  3. Motors are controlled through the L298N driver based on the command.

🐍 Python GUI

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published