Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Raspberry Pi 3B Bluetooth-Controlled Robotic Car with LED Indicators and Buzzer

View and Edit Project In Cirkit DesignerImage of Raspberry Pi 3B Bluetooth-Controlled Robotic Car with LED Indicators and Buzzer

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to control a robotic vehicle using a Raspberry Pi 3B, an L298N DC motor driver, an HC-05 Bluetooth module, LEDs, a buzzer, and various other components. The circuit allows for motor control, LED toggling, and buzzer activation via Bluetooth commands.

Component List

  1. Raspberry Pi 3B

    • Description: A single-board computer used for controlling the circuit.
    • Pins: 1, 3, 5, 7, 9, 11, 13, 15, 17, 21, 23, 25, 27, 29, 33, 37, 39, 40, 38, 36, 34, 32, 30, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2(5V), 19, 28, 31, 35
  2. L298N DC Motor Driver

    • Description: A dual H-Bridge motor driver used to control the motors.
    • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
  3. HC-05 Bluetooth Module

    • Description: A Bluetooth module used for wireless communication.
    • Pins: Key, VCC, TXD, RXD, State, GND
  4. 18650 Li-ion Battery x 2

    • Description: Power source for the motor driver.
    • Pins: +, -
  5. LED: Two Pin (red)

    • Description: Red LEDs used for visual indicators.
    • Pins: cathode, anode
  6. Gearmotor DC Wheels (Left and Right)

    • Description: DC motors used to drive the wheels of the robotic vehicle.
    • Pins: PIN1, PIN2
  7. Resistor

    • Description: Resistors used to limit current.
    • Pins: pin1, pin2
    • Properties: 220 Ohms
  8. Buzzer

    • Description: A buzzer used for audio signals.
    • Pins: POSITIVE, NEGATIVE
  9. 5V Battery

    • Description: Power source for the Raspberry Pi.
    • Pins: positive, negative

Wiring Details

Raspberry Pi 3B

L298N DC Motor Driver

HC-05 Bluetooth Module

18650 Li-ion Battery x 2

LED: Two Pin (red)

Resistor

Buzzer

5V Battery

Code Documentation

Required Libraries

Make sure to install the required libraries:

sudo apt-get install python-rpi.gpio python-serial

Python Code

import RPi.GPIO as GPIO
import time
import serial

# GPIO Setup
GPIO.setmode(GPIO.BCM)

# Motor Driver Pins
IN1 = 5
IN2 = 6
IN3 = 13
IN4 = 19
ENA = 12  # PWM Pin for motor A
ENB = 18  # PWM Pin for motor B