Arduino Nano and TB6612FNG Motor Driver-Based Line Following Robot with IR Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes a TB6612FNG Motor Driver, two DC Mini Metal Gear Motors, an Arduino Nano, a 9V Battery, and a 5-channel IR sensor. The circuit is designed to control the motors using the motor driver and the Arduino Nano, with inputs from the IR sensor.
Component List
TB6612FNG Motor Driver
- Description: Motor driver used to control the speed and direction of two DC motors.
- Pins: GND, B01, B02, A02, A01, VCC, VM, PWMB, BI2, BI1, STBY, AI1, AI2, PWMA
DC Mini Metal Gear Motor (Motor 1)
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
DC Mini Metal Gear Motor (Motor 2)
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
Arduino Nano
- Description: A small, complete, and breadboard-friendly board based on the ATmega328P.
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
9V Battery
- Description: A standard 9V battery used to power the circuit.
- Pins: -, +
5-channel IR sensor
- Description: An IR sensor with 5 channels used for detecting obstacles or line following.
- Pins: VCC, GND, S1, S2, S3, S4, S5, CLP, Near
Wiring Details
TB6612FNG Motor Driver
- GND: Connected to GND of 9V Battery, GND of Arduino Nano, and GND of 5-channel IR sensor.
- B01: Connected to IN1 of Motor 2.
- B02: Connected to IN2 of Motor 2.
- A02: Connected to IN1 of Motor 1.
- A01: Connected to IN2 of Motor 1.
- VCC: Connected to VCC of 5-channel IR sensor and 5V of Arduino Nano.
- VM: Connected to + of 9V Battery and VIN of Arduino Nano.
- PWMB: Connected to D8 of Arduino Nano.
- BI2: Connected to D7 of Arduino Nano.
- BI1: Connected to D6 of Arduino Nano.
- STBY: Connected to D2 of Arduino Nano.
- AI1: Connected to D4 of Arduino Nano.
- AI2: Connected to D3 of Arduino Nano.
- PWMA: Connected to D5 of Arduino Nano.
DC Mini Metal Gear Motor (Motor 1)
- IN1: Connected to A02 of TB6612FNG Motor Driver.
- IN2: Connected to A01 of TB6612FNG Motor Driver.
DC Mini Metal Gear Motor (Motor 2)
- IN1: Connected to B01 of TB6612FNG Motor Driver.
- IN2: Connected to B02 of TB6612FNG Motor Driver.
Arduino Nano
- GND: Connected to GND of 9V Battery, GND of TB6612FNG Motor Driver, and GND of 5-channel IR sensor.
- 5V: Connected to VCC of TB6612FNG Motor Driver and VCC of 5-channel IR sensor.
- VIN: Connected to + of 9V Battery and VM of TB6612FNG Motor Driver.
- D2: Connected to STBY of TB6612FNG Motor Driver.
- D3: Connected to AI2 of TB6612FNG Motor Driver.
- D4: Connected to AI1 of TB6612FNG Motor Driver.
- D5: Connected to PWMA of TB6612FNG Motor Driver.
- D6: Connected to BI1 of TB6612FNG Motor Driver.
- D7: Connected to BI2 of TB6612FNG Motor Driver.
- D8: Connected to PWMB of TB6612FNG Motor Driver.
- A0: Connected to S1 of 5-channel IR sensor.
- A1: Connected to S2 of 5-channel IR sensor.
- A2: Connected to S3 of 5-channel IR sensor.
- A3: Connected to S4 of 5-channel IR sensor.
- A4: Connected to S5 of 5-channel IR sensor.
9V Battery
- -: Connected to GND of TB6612FNG Motor Driver, GND of Arduino Nano, and GND of 5-channel IR sensor.
- +: Connected to VM of TB6612FNG Motor Driver and VIN of Arduino Nano.
5-channel IR sensor
- GND: Connected to GND of 9V Battery, GND of TB6612FNG Motor Driver, and GND of Arduino Nano.
- VCC: Connected to VCC of TB6612FNG Motor Driver and 5V of Arduino Nano.
- S1: Connected to A0 of Arduino Nano.
- S2: Connected to A1 of Arduino Nano.
- S3: Connected to A2 of Arduino Nano.
- S4: Connected to A3 of Arduino Nano.
- S5: Connected to A4 of Arduino Nano.
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:
}
Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.