EgoisticCoder/Xaviers_Final_Robotics

⚡ Field-deployable disaster response AI hub — multi-model inference (xView2, YOLOv8, LADI-v2, Groq Vision) with real-time zone scoring, GPS dispatch, and OpenStreetMap tracking. Runs on Raspberry Pi or server.

1

stars

7

commits

C++

primary language

Jun 4, 2026

updated

README

Hardware Wiring Guide

This document outlines the pinout and wiring connections between the ESP32 microcontroller and the various environmental sensors, navigation modules, and motor drivers used in the system.

🌡️ Environmental Sensors

ComponentSensor PinESP32 Pin / ConnectionNotes
DHT11/22VCC3.3V
GNDGND
DATAGPIO 4Add a 10kΩ pull-up resistor between DATA and 3.3V if your sensor isn't on a breakout board.
MQ-2 GasVCC5V (VIN/VUSB)Needs 5V for the heating element.
GNDGND
AOUTGPIO 34 (ADC)⚠️ Recommended: Use a voltage divider to step 5V down to 3.3V.
Optical Dust (Sharp)V-LED5VAdd a 150Ω resistor in series and a 220µF capacitor to GND as per the datasheet.
LED-GNDGND
LED-INGPIO 5This pin pulses the IR LED to take a reading.
S-VCC5V
S-GNDGND
S-OUTGPIO 35 (ADC)⚠️ Recommended: Use a voltage divider to step 5V down to 3.3V.

🧭 Navigation, IMU, Power & Motors

ComponentPin / FunctionESP32 ConnectionNotes
EVE L89 (GNSS)TXGPIO 16 (RX2)We use Hardware Serial 2 for reliable GPS parsing.
RXGPIO 17 (TX2)
VCC3.3V
GNDGND
MPU6050 (IMU)SDAGPIO 21Standard I2C Data.
SCLGPIO 22Standard I2C Clock.
MagnetometerSDAGPIO 21Connect in parallel with the MPU6050 (I2C Bus).
SCLGPIO 22Connect in parallel with the MPU6050 (I2C Bus).
INA3221 (Power)SDAGPIO 21Connect in parallel with the MPU6050 (I2C Bus).
SCLGPIO 22Connect in parallel with the MPU6050 (I2C Bus).
Motor DriverIN1 (Left)GPIO 25Standard dual H-bridge (like L298N or TB6612).
IN2 (Left)GPIO 26
IN3 (Right)GPIO 27
IN4 (Right)GPIO 14

⚠️ Important Hardware Notes

1. I2C Bus Configuration

The MPU6050, Magnetometer, and INA3221 all share the same I2C bus:

  • SDA: GPIO 21
  • SCL: GPIO 22

Note: Ensure each device has a unique I2C address to avoid bus conflicts.

2. Logic Level Protection (5V to 3.3V)

The ESP32 uses strict 3.3V logic. Do not connect 5V output pins directly to ESP32 GPIOs. As noted in the tables, use voltage dividers for 5V analog outputs (like the MQ-2 Gas Sensor and Sharp Optical Dust Sensor) to protect the ESP32's ADC pins (GPIO 34 and GPIO 35).

3. Power Distribution

Sensors requiring 5V (MQ-2, Sharp Optical Dust) must be powered from the VIN/VUSB pin, assuming the ESP32 is powered via USB or a stable 5V regulator. Be cautious of the total current draw, especially when the MQ-2 heater is active.

Contributors

EgoisticCoder

7 commits

EgoisticCoder/Xaviers_Final_Robotics

⚡ Field-deployable disaster response AI hub — multi-model inference (xView2, YOLOv8, LADI-v2, Groq Vision) with real-time zone scoring, GPS dispatch, and OpenStreetMap tracking. Runs on Raspberry Pi or server.

1

stars

7

commits

C++

primary language

Jun 4, 2026

updated

README

Hardware Wiring Guide

This document outlines the pinout and wiring connections between the ESP32 microcontroller and the various environmental sensors, navigation modules, and motor drivers used in the system.

🌡️ Environmental Sensors

ComponentSensor PinESP32 Pin / ConnectionNotes
DHT11/22VCC3.3V
GNDGND
DATAGPIO 4Add a 10kΩ pull-up resistor between DATA and 3.3V if your sensor isn't on a breakout board.
MQ-2 GasVCC5V (VIN/VUSB)Needs 5V for the heating element.
GNDGND
AOUTGPIO 34 (ADC)⚠️ Recommended: Use a voltage divider to step 5V down to 3.3V.
Optical Dust (Sharp)V-LED5VAdd a 150Ω resistor in series and a 220µF capacitor to GND as per the datasheet.
LED-GNDGND
LED-INGPIO 5This pin pulses the IR LED to take a reading.
S-VCC5V
S-GNDGND
S-OUTGPIO 35 (ADC)⚠️ Recommended: Use a voltage divider to step 5V down to 3.3V.

🧭 Navigation, IMU, Power & Motors

ComponentPin / FunctionESP32 ConnectionNotes
EVE L89 (GNSS)TXGPIO 16 (RX2)We use Hardware Serial 2 for reliable GPS parsing.
RXGPIO 17 (TX2)
VCC3.3V
GNDGND
MPU6050 (IMU)SDAGPIO 21Standard I2C Data.
SCLGPIO 22Standard I2C Clock.
MagnetometerSDAGPIO 21Connect in parallel with the MPU6050 (I2C Bus).
SCLGPIO 22Connect in parallel with the MPU6050 (I2C Bus).
INA3221 (Power)SDAGPIO 21Connect in parallel with the MPU6050 (I2C Bus).
SCLGPIO 22Connect in parallel with the MPU6050 (I2C Bus).
Motor DriverIN1 (Left)GPIO 25Standard dual H-bridge (like L298N or TB6612).
IN2 (Left)GPIO 26
IN3 (Right)GPIO 27
IN4 (Right)GPIO 14

⚠️ Important Hardware Notes

1. I2C Bus Configuration

The MPU6050, Magnetometer, and INA3221 all share the same I2C bus:

  • SDA: GPIO 21
  • SCL: GPIO 22

Note: Ensure each device has a unique I2C address to avoid bus conflicts.

2. Logic Level Protection (5V to 3.3V)

The ESP32 uses strict 3.3V logic. Do not connect 5V output pins directly to ESP32 GPIOs. As noted in the tables, use voltage dividers for 5V analog outputs (like the MQ-2 Gas Sensor and Sharp Optical Dust Sensor) to protect the ESP32's ADC pins (GPIO 34 and GPIO 35).

3. Power Distribution

Sensors requiring 5V (MQ-2, Sharp Optical Dust) must be powered from the VIN/VUSB pin, assuming the ESP32 is powered via USB or a stable 5V regulator. Be cautious of the total current draw, especially when the MQ-2 heater is active.

Contributors

EgoisticCoder

7 commits

Languages

C++

46.7%

Python

36.6%

HTML

16.7%