Arduino Mega and ESP32-Based Robotic Navigator with Environmental Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control various components including DC motors, a GPS module, an IR sensor, a servo motor, a motor driver, an ESP32 microcontroller, a rocker switch, a 12V battery, a linear actuator, a soil moisture sensor, an Arduino Mega 2560, and a soil moisture detection module. The circuit is capable of receiving GPS data, driving multiple motors, and reading sensor inputs. The Arduino Mega 2560 and ESP32 are the primary microcontrollers used for processing and control.
Component List
DC Motor
- Description: A standard DC motor used for converting electrical energy into mechanical rotation.
- Pins: pin 1, pin 2
GPS NEO 6M
- Description: A GPS module capable of providing geolocation and time information.
- Pins: VCC, RX, TX, GND
IR Sensor
- Description: An infrared sensor used for object detection or distance measurement.
- Pins: out, gnd, vcc
Servomotor MG90S
- Description: A small and lightweight servo motor used for precision control.
- Pins: SIG, VCC, GND
L298N DC Motor Driver
- Description: A motor driver module capable of controlling up to two 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
ESP32 (30 pin)
- Description: A powerful microcontroller with Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
Rocker Switch
- Description: A simple on/off switch to control the power supply.
- Pins: 1, 2
Battery 12V
- Description: A 12V battery providing the power source for the circuit.
- Pins: +, -
Linear Actuator
- Description: A type of motor that creates motion in a straight line.
- Pins: +, -
Capacitive Soil Moisture Sensor V1.2
- Description: A sensor used to measure the moisture content in soil.
- Pins: GND, VCC, AOUT
Arduino Mega 2560
- Description: A microcontroller board based on the ATmega2560, with numerous digital and analog I/O pins.
- Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL
YL-69 Module LM393
- Description: A soil moisture detection module that outputs both analog and digital signals.
- Pins: A0, DO, GND, VCC, -, +
Wiring Details
DC Motor
- pin 1: Connected to L298N DC motor driver OUT1, OUT3
- pin 2: Connected to L298N DC motor driver OUT2, OUT4
GPS NEO 6M
- VCC: Connected to Arduino Mega 2560 5V
- RX: Connected to Arduino Mega 2560 D18/TX1
- TX: Connected to Arduino Mega 2560 D19/RX1
- GND: Connected to Arduino Mega 2560 GND
IR Sensor
- out: Connected to Arduino Mega 2560 D37
- gnd: Connected to Arduino Mega 2560 GND
- vcc: Connected to Arduino Mega 2560 5V
Servomotor MG90S
- SIG: Connected to Arduino Mega 2560 D7 PWM
- VCC: Connected to Arduino Mega 2560 5V
- GND: Connected to Arduino Mega 2560 GND
L298N DC Motor Driver
- OUT1, OUT2, OUT3, OUT4: Connected to DC Motors and Linear Actuator
- 12V: Connected to Rocker Switch pin 2
- GND: Connected to Battery 12V -
- 5V: Connected to ESP32 Vin
- ENA, ENB: Connected to Arduino Mega 2560 D2 PWM, D3 PWM
- IN1, IN2, IN3, IN4: Connected to Arduino Mega 2560 D22, D23, D24, D25
ESP32 (30 pin)
- 3V3: Connected to Arduino Mega 2560 3V3
- GND: Connected to Arduino Mega 2560 VIN
- TX0: Connected to Arduino Mega 2560 D0 RX0
- RX0: Connected to Arduino Mega 2560 D1 TX0
Rocker Switch
- 1: Connected to Battery 12V +
- 2: Connected to L298N DC motor driver 12V
Battery 12V
- +: Connected to Rocker Switch pin 1
- -: Connected to L298N DC motor driver GND
Linear Actuator
- +: Connected to L298N DC motor driver OUT1
- -: Connected to L298N DC motor driver OUT2
Capacitive Soil Moisture Sensor V1.2
- GND: Connected to Arduino Mega 2560 GND
- VCC: Connected to Arduino Mega 2560 5V
- AOUT: Connected to Arduino Mega 2560 A0
Arduino Mega 2560
- 3V3: Connected to ESP32 3V3
- 5V: Connected to GPS NEO 6M VCC, IR Sensor vcc, Servomotor MG90S VCC, Capacitive Soil Moisture Sensor V1.2 VCC
- GND: Connected to GPS NEO 6M GND, IR Sensor gnd, Servomotor MG90S GND, Capacitive Soil Moisture Sensor V1.2 GND, YL-69 Module LM393 GND
- VIN: Connected to ESP32 GND
- A0: Connected to Capacitive Soil Moisture Sensor V1.2 AOUT
- D0 RX0: Connected to ESP32 TX0
- D1 TX0: Connected to ESP32 RX0
- D2 PWM: Connected to L298N DC motor driver ENA
- D3 PWM: Connected to L298N DC motor driver ENB
- D7 PWM: Connected to Servomotor MG90S SIG
- D9 PWM: Connected to YL-69 Module LM393 DO
- D18/TX1: Connected to GPS NEO 6M RX
- D19/RX1: Connected to GPS NEO 6M TX
- D22: Connected to L298N DC motor driver IN1
- D23: Connected to L298N DC motor driver IN2
- D24: Connected to L298N DC motor driver IN3
- D25: Connected to L298N DC motor driver IN4
- D37: Connected to IR Sensor out
YL-69 Module LM393
- VCC: Connected to Arduino Mega 2560 5V
- GND: Connected to Arduino Mega 2560 GND
- DO: Connected to Arduino Mega 2560 D9 PWM
Documented Code
Arduino Mega 2560 (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino Mega 2560 (documentation.txt)
(No additional documentation provided)