Arduino Nano-Controlled Robotic Vehicle with Ultrasonic Sensor and Laser Module
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino Nano microcontroller with a TB6612FNG Motor Driver to control two DC motors. Additionally, it includes a laser module and an HC-SR04 Ultrasonic Sensor for distance measurement. The circuit is powered by a 9V battery, and the ground connections are shared among the components to complete the circuit.
Component List
Arduino Nano
- Microcontroller with a variety of digital and analog I/O pins.
- Used as the central processing unit for controlling the motors, laser, and reading sensor data.
DC Motor (x2)
- Electric motor that converts DC electrical power into mechanical power.
- Controlled by the motor driver to perform tasks that require rotational movement.
TB6612FNG Motor Driver
- A motor driver IC capable of driving two DC motors.
- Interfaces with the Arduino Nano to control the speed and direction of the motors.
Laser Module
- A module that emits a focused beam of light.
- Controlled by the Arduino Nano for applications such as distance marking or as a visual indicator.
HC-SR04 Ultrasonic Sensor
- A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
- Connected to the Arduino Nano for distance measurement tasks.
9V Battery
- Provides the power supply for the motor driver and indirectly for the other components through voltage regulation by the Arduino Nano.
Wiring Details
Arduino Nano
D3connected to TB6612FNG Motor DriverPWMAD4connected to TB6612FNG Motor DriverAI1D5connected to TB6612FNG Motor DriverAI2D6connected to TB6612FNG Motor DriverPWMBD7connected to TB6612FNG Motor DriverBI1D8connected to TB6612FNG Motor DriverBI2D9connected to TB6612FNG Motor DriverSTBYD10connected to HC-SR04 Ultrasonic SensorTRIGD11/MOSIconnected to HC-SR04 Ultrasonic SensorECHOD12/MISOconnected to Laser Module+GNDconnected to TB6612FNG Motor DriverGND, HC-SR04 Ultrasonic SensorGND, and Laser Module-5Vconnected to TB6612FNG Motor DriverVCCand HC-SR04 Ultrasonic SensorVCC
DC Motor #1
pin 1connected to TB6612FNG Motor DriverB01pin 2connected to TB6612FNG Motor DriverB02
DC Motor #2
pin 1connected to TB6612FNG Motor DriverA01pin 2connected to TB6612FNG Motor DriverA02
TB6612FNG Motor Driver
GNDconnected to Arduino NanoGNDand 9V Battery-VMconnected to 9V Battery+
Laser Module
+connected to Arduino NanoD12/MISO-connected to Arduino NanoGND
HC-SR04 Ultrasonic Sensor
VCCconnected to Arduino Nano5VTRIGconnected to Arduino NanoD10ECHOconnected to Arduino NanoD11/MOSIGNDconnected to Arduino NanoGND
9V Battery
+connected to TB6612FNG Motor DriverVM-connected to TB6612FNG Motor DriverGND
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 include specific functionality. It should be populated with the necessary setup and loop code to control the connected components as per the circuit's requirements.