Arduino Nano Controlled Robot with IR Sensing and Dual Motor Driver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino Nano microcontroller with a 5 channel IR array, an L293 motor driver, two DC Mini Metal Gear Motors, and a 7.4V power source. The Arduino Nano serves as the central processing unit, interfacing with the IR array for sensor input and controlling the motor driver, which in turn drives the two DC motors. The 7.4V power source provides the necessary voltage for the motors and the motor driver, while the Arduino Nano is powered through its VIN pin.
Component List
Arduino Nano
- Microcontroller board based on the ATmega328P
- It has a variety of digital and analog I/O pins
- Used for controlling the overall logic of the circuit
5 Channel IR Array
- Sensor array with multiple infrared sensors
- Provides analog outputs corresponding to the detected IR light
- Used for line tracking or obstacle detection
L293 Motor Driver
- A dual H-bridge motor driver IC
- Capable of driving two DC motors or one stepper motor
- Used to control the direction and speed of the motors
7.4V Power Source
- Provides the power supply for the motors and motor driver
- Typically a LiPo battery or similar rechargeable battery
DC Mini Metal Gear Motor (x2)
- Compact DC motors with gear reduction
- Used for providing motion to the system they are integrated into
Wiring Details
Arduino Nano
- GND connected to the ground of the L293 motor driver and the 5 channel IR array
- D5 connected to B2 of the L293 motor driver
- D6 connected to B1 of the L293 motor driver
- D7 connected to A2 of the L293 motor driver
- D8 connected to A1 of the L293 motor driver
- D9 connected to EN_A of the L293 motor driver
- D10 connected to EN_B of the L293 motor driver
- VIN connected to VCC of the L293 motor driver
- 5V connected to VCC of the 5 channel IR array
- A4 connected to A5 of the 5 channel IR array
- A3 connected to A4 of the 5 channel IR array
- A2 connected to A3 of the 5 channel IR array
- A1 connected to A2 of the 5 channel IR array
- A0 connected to A1 of the 5 channel IR array
5 Channel IR Array
- GND connected to GND of the Arduino Nano
- VCC connected to 5V of the Arduino Nano
- A5 connected to A4 of the Arduino Nano
- A4 connected to A3 of the Arduino Nano
- A3 connected to A2 of the Arduino Nano
- A2 connected to A1 of the Arduino Nano
- A1 connected to A0 of the Arduino Nano
L293 Motor Driver
- -V and GND connected to GND of the Arduino Nano and the negative terminal of the 7.4V power source
- B2 connected to D5 of the Arduino Nano
- B1 connected to D6 of the Arduino Nano
- A2 connected to D7 of the Arduino Nano
- A1 connected to D8 of the Arduino Nano
- EN_A connected to D9 of the Arduino Nano
- EN_B connected to D10 of the Arduino Nano
- VCC connected to VIN of the Arduino Nano
- MA2 connected to IN1 of one DC Mini Metal Gear Motor
- MA1 connected to IN2 of the same DC Mini Metal Gear Motor
- MB1 connected to IN1 of the other DC Mini Metal Gear Motor
- MB2 connected to IN2 of the other DC Mini Metal Gear Motor
- +V connected to the positive terminal of the 7.4V power source
7.4V Power Source
- + connected to +V of the L293 motor driver
- - connected to -V of the L293 motor driver and GND of the Arduino Nano
DC Mini Metal Gear Motor (x2)
- IN1 and IN2 of one motor connected to MA2 and MA1 of the L293 motor driver, respectively
- IN1 and IN2 of the other motor connected to MB1 and MB2 of the L293 motor driver, respectively
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. It needs to be populated with the logic for controlling the motors via the L293 motor driver and reading inputs from the 5 channel IR array.