Arduino UNO and L298N Motor Driver-Based Wi-Fi Controlled Robotic System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control multiple DC motors, a water pump, and various sensors using an Arduino UNO and an Arduino Nano. The circuit also includes wireless communication modules (NRF24L01 and HC-05 Bluetooth Module) and an ESP32 CAM for additional functionalities. The L298N DC motor driver is used to control the DC motors, and a PCF8574 IO Expansion Board is used to expand the I/O capabilities of the Arduino UNO.
Component List
L298N DC Motor Driver
- Description: Motor driver module used to control DC motors.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
DC Motor
- Description: Standard DC motor.
- Pins: pin 1, pin 2
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Battery 12V
- Description: 12V battery used to power the circuit.
- Pins: +, -
HC-05 Bluetooth Module
- Description: Bluetooth module for wireless communication.
- Pins: Key, VCC, GND, TXD, RXD, State
Water Pump
- Description: Water pump for fluid control.
- Pins: VCC, GND
NRF24L01
- Description: Wireless transceiver module.
- Pins: IRQ (not used), MOSI, CSN, VCC (3V), GND, CE, SCK, MISO
Arduino Nano
- Description: Microcontroller 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
SparkFun Soil Moisture Sensor
- Description: Sensor to measure soil moisture levels.
- Pins: VCC, GND, SIG
ESP32 CAM
- Description: Camera module with ESP32 for image processing and transmission.
- Pins: 5V, GND, GPIO12, GPIO13, GPIO15, GPIO14, GPIO2, GPIO4, 3.3V, GPIO16, GPIO0, 3.3V / 5V / P_OUT, GPIO3 / RX, GPIO1 / TX
Ultrasonic Sensor
- Description: Sensor to measure distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
PCF8574 IO Expansion Board
- Description: I/O expansion board to increase the number of I/O pins.
- Pins: VCC, GND, SDA, SCL, A2+, A2c, A2-, A1+, A1c, A1-, A0+, A0c, A0-, O0, O1, O2, O3, O4, O5, O6, O7, INT
Wiring Details
L298N DC Motor Driver
- OUT1 connected to pin 2 of DC Motor 1 and DC Motor 2
- OUT2 connected to pin 1 of DC Motor 1 and DC Motor 2
- 12V connected to + of Battery 12V
- GND connected to GND of Arduino UNO, NRF24L01, Battery 12V, and ESP32 CAM
- 5V connected to 5V of Arduino UNO, PCF8574 IO Expansion Board, Water Pump, ESP32 CAM, and +VCC of Ultrasonic Sensor
- OUT3 connected to pin 1 of DC Motor 3 and DC Motor 4
- OUT4 connected to pin 2 of DC Motor 3 and DC Motor 4
- IN1 connected to D2 of Arduino UNO
- IN2 connected to D3 of Arduino UNO
- IN3 connected to D4 of Arduino UNO
- IN4 connected to D5 of Arduino UNO
DC Motor 1
- pin 1 connected to OUT2 of L298N DC Motor Driver
- pin 2 connected to OUT1 of L298N DC Motor Driver
DC Motor 2
- pin 1 connected to OUT2 of L298N DC Motor Driver
- pin 2 connected to OUT1 of L298N DC Motor Driver
DC Motor 3
- pin 1 connected to OUT3 of L298N DC Motor Driver
- pin 2 connected to OUT4 of L298N DC Motor Driver
DC Motor 4
- pin 1 connected to OUT3 of L298N DC Motor Driver
- pin 2 connected to OUT4 of L298N DC Motor Driver
Arduino UNO
- GND connected to GND of L298N DC Motor Driver, NRF24L01, Battery 12V, ESP32 CAM, PCF8574 IO Expansion Board, HC-05 Bluetooth Module, Ultrasonic Sensor, and Water Pump
- 5V connected to 5V of L298N DC Motor Driver, PCF8574 IO Expansion Board, Water Pump, ESP32 CAM, and +VCC of Ultrasonic Sensor
- 3.3V connected to VCC (3V) of NRF24L01
- Vin connected to VCC of HC-05 Bluetooth Module
- A4 connected to SCL of PCF8574 IO Expansion Board
- A5 connected to SDA of PCF8574 IO Expansion Board
- D13 connected to SCK of NRF24L01
- D12 connected to MISO of NRF24L01
- D11 connected to MOSI of NRF24L01
- D10 connected to RXD of HC-05 Bluetooth Module
- D9 connected to TXD of HC-05 Bluetooth Module
- D8 connected to CE of NRF24L01
- D7 connected to CSN of NRF24L01
- D1 connected to GPIO1 / TX of ESP32 CAM
- D0 connected to GPIO3 / RX of ESP32 CAM
Battery 12V
- + connected to 12V of L298N DC Motor Driver and VIN of Arduino Nano
- - connected to GND of L298N DC Motor Driver, Arduino Nano, and other components
HC-05 Bluetooth Module
- VCC connected to Vin of Arduino UNO
- GND connected to GND of Arduino UNO
- TXD connected to D9 of Arduino UNO
- RXD connected to D10 of Arduino UNO
Water Pump
- VCC connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO
NRF24L01
- VCC (3V) connected to 3.3V of Arduino UNO
- GND connected to GND of Arduino UNO
- MOSI connected to D11 of Arduino UNO
- CSN connected to D7 of Arduino UNO
- CE connected to D8 of Arduino UNO
- SCK connected to D13 of Arduino UNO
- MISO connected to D12 of Arduino UNO
Arduino Nano
- GND connected to GND of Battery 12V, NRF24L01, and SparkFun Soil Moisture Sensor
- VIN connected to + of Battery 12V
- 5V connected to VCC of SparkFun Soil Moisture Sensor
- **