Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Bluetooth-Controlled Robot with Ultrasonic Sensor and LCD Display

Image of Arduino UNO Bluetooth-Controlled Robot with Ultrasonic Sensor and LCD Display

Circuit Documentation

Summary

This circuit is designed to control a mobile robot with the capability to move, detect obstacles, communicate via Bluetooth, and display information on an LCD screen. The core of the circuit is an Arduino UNO microcontroller, which interfaces with various components such as motors, LEDs, an ultrasonic sensor, a Bluetooth module, and an LCD display. The circuit is powered by a 9V battery, regulated by an LM340T5 7805 voltage regulator. The robot's movement is controlled by two gearmotors, managed by an L293D motor driver. The HC-SR04 ultrasonic sensor is used for obstacle detection, and the Bluetooth HC-06 module allows for wireless control. The LEDs serve as indicators, and the LCD I2C display provides a user interface.

Component List

  • Arduino UNO: A microcontroller board based on the ATmega328P, used as the main controller for the circuit.
  • LED (Green): Two green LEDs used as indicators.
  • LED (Red): Two red LEDs used as indicators.
  • Rocker Switch: A switch used to control the power supply to the circuit.
  • 9V Battery: The power source for the circuit.
  • Gearmotor DC (Left and Right): Two DC motors with wheels, providing mobility to the robot.
  • HC-SR04 Ultrasonic Sensor: An ultrasonic sensor used for measuring distance and detecting obstacles.
  • L293D: A motor driver IC used to control the gearmotors.
  • Resistor (220 Ohms): Four resistors used to limit current to the LEDs.
  • Bluetooth HC-06: A Bluetooth module for wireless communication.
  • LM340T5 7805: A voltage regulator to provide a stable 5V supply to the circuit.
  • LCD I2C Display: A display used to show information and status messages.

Wiring Details

Arduino UNO

  • Digital pins D2, D3, D4, D5, D6, D7, D9, D10, D11, and D12 are used to control LEDs, motors, and the ultrasonic sensor.
  • Analog pins A4 and A5 are connected to the SDA and SCL pins of the LCD I2C display for communication.
  • 5V and GND pins provide power to various components in the circuit.

LEDs (Green and Red)

  • Anodes connected to Arduino digital pins through 220 Ohm resistors.
  • Cathodes connected to the common ground.

Rocker Switch

  • One pin connected to the negative terminal of the 9V battery.
  • The other pin connected to the common ground.

Gearmotor DC (Left and Right)

  • Controlled by the L293D motor driver outputs.

HC-SR04 Ultrasonic Sensor

  • VCC and GND pins connected to the power supply and ground.
  • TRIG and ECHO pins connected to Arduino digital pins D5 and D7, respectively.

L293D Motor Driver

  • Enable and Input pins controlled by Arduino digital pins.
  • Output pins connected to the gearmotors.
  • VCC1, VCC2, and GND pins connected to the power supply and ground.

Resistors (220 Ohms)

  • Connected in series with the LEDs to limit the current.

Bluetooth HC-06

  • VCC and GND pins connected to the power supply and ground.
  • TXD and RXD pins connected to Arduino digital pins D0 and D1 for serial communication.

LM340T5 7805 Voltage Regulator

  • Vin connected to the positive terminal of the 9V battery.
  • Vout provides a regulated 5V output to the circuit.
  • GND pin connected to the common ground.

LCD I2C Display

  • GND and VCC pins connected to the power supply and ground.
  • SDA and SCL pins connected to Arduino analog pins A4 and A5 for I2C communication.

Documented Code

Arduino UNO Code (sketch.ino)

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

#define TRIGPIN 5
#define ECHOPIN 7

// Initialization
int m1a = 9;   // Motor 1, Arduino pin 10 to L293B pin 15.
int m1b = 10;  // Motor 1, Arduino pin 9 to L293B pin 10.
int m2a = 11;  // Motor 2, Arduino pin 12 to L293B pin 2.
int m2b = 12;  // Motor 2, Arduino pin 11 to L293B pin 7.
char val;
bool ready = false;

int VerdDreta = 3;
int VerdEsquerra = 4;
int VermellDreta = 6;
int VermellEsquerra = 2;

LiquidCrystal_I2C lcd(0X27,16,2);  

// Custom characters for eyes
byte ulls1_1[8] = {
  // ... (custom characters defined here)
};

// ... (more custom characters and functions)

// Setup method
void setup() {
  // ... (setup code)
}

// Main loop
void loop() {
  // ... (main loop code)
}

// ... (additional functions)

Additional Documentation (documentation.txt)

Material List

Base:
+ Arduino UNO
+ Medium Breadboard
+ 9V Battery
+ Switch
+ Wires

Mobility:
+ 2 DC Motors with wheels
+ L293D Motor Driver
+ LM340T5

Distance Sensor:
+ HC-SR04 Ultrasonic Sensor

Control:
+ HC-05 Bluetooth Controller

Display:
+ LCD-I2C Screen

Lights:
+ 4 resistors
+ 2 Green LEDs
+ 2 Red LEDs

Chassis:
+ Lower Chassis
+ Central Chassis
+ Front Upper Chassis
+ Rear Upper Chassis
+ Front Wheel
+ Screws

This documentation provides an overview of the circuit, including the purpose and wiring of each component, as well as the embedded code for the Arduino UNO microcontroller. The additional documentation lists the materials used in the construction of the robot.