Arduino Nano-Controlled Robotic Vehicle with Ultrasonic and IR Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components including a microcontroller, sensors, a motor driver, servomotor, and a power supply to form a system capable of controlling motors and interfacing with sensors. The Arduino Nano acts as the central processing unit, interfacing with an IR sensor array, an ultrasonic sensor, and controlling a servomotor and DC motors through a motor driver. A rocker switch is used to control the power supply from a 9V battery to the system.
Component List
Servomotor SG90
- Description: A small and lightweight servo for RC (Radio Control) and hobby use.
- Pins: SIG (Signal), VCC (Power), GND (Ground).
Arduino Nano
- Description: A compact microcontroller board based on the ATmega328P, featuring digital and analog I/O pins.
- Pins: D1/TX, D0/RX, RESET, GND, D2-D13, VIN, 5V, A0-A7, AREF, 3V3.
5 Channel IR Sensor
- Description: An array of infrared sensors designed to detect lines or obstacles.
- Pins: VCC, GND, S1-S5, CLP, Near.
TB6612FNG Motor Driver
- Description: A motor driver capable of driving two DC motors or one stepper motor.
- Pins: GND, B01, B02, A02, A01, VCC, VM, PWMB, BI2, BI1, STBY, AI1, AI2, PWMA.
Rocker Switch (SPST)
- Description: A single-pole single-throw (SPST) rocker switch used to control the power circuit.
- Pins: 1, 2.
Battery 9V
- Description: A standard 9V battery used as the power source for the circuit.
- Pins: VCC, GND.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor capable of measuring distances using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND.
DC Mini Metal Gear Motor
- Description: A small DC motor with a gearbox for increased torque.
- Pins: IN1, IN2.
Wiring Details
Servomotor SG90
- Signal (SIG): Connected to Arduino Nano D7.
- Power (VCC): Shared power rail with other VCC connections.
- Ground (GND): Shared ground rail with TB6612FNG Motor Driver.
Arduino Nano
- Digital and Analog Pins: Various connections to sensors and motor driver.
- Power (5V): Shared power rail with other VCC connections.
- Ground (GND): Shared ground rail with multiple components.
- Vin: Connected to the power supply through the rocker switch.
5 Channel IR Sensor
- Power (VCC): Shared power rail with other VCC connections.
- Ground (GND): Shared ground rail with Arduino Nano.
- Sensors (S1-S5): Connected to Arduino Nano analog pins A2-A6.
TB6612FNG Motor Driver
- Power (VCC): Shared power rail with other VCC connections.
- Motor Power (VM): Connected to the power supply through the rocker switch.
- Control Pins (STBY, PWMA, PWMB, AI1, AI2, BI1, BI2): Connected to various Arduino Nano digital pins.
- Motor Outputs (A01, A02, B01, B02): Connected to DC Mini Metal Gear Motors.
Rocker Switch (SPST)
- Pins 1 and 2: Used to control the connection between the 9V battery and the circuit.
HC-SR04 Ultrasonic Sensor
- Power (VCC): Shared power rail with other VCC connections.
- Trigger (TRIG): Connected to Arduino Nano A0.
- Echo (ECHO): Connected to Arduino Nano A1.
- Ground (GND): Shared ground rail with TB6612FNG Motor Driver.
DC Mini Metal Gear Motors
- Inputs (IN1, IN2): Each motor is connected to the TB6612FNG Motor Driver's corresponding outputs.
Documented Code
Arduino Nano Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code to control the circuit components. It needs to be populated with the appropriate setup and loop code to initialize and control the connected sensors, servomotor, and DC motors.