Please design a complete, fully routed schematic and 2D PCB layout for an autonomous agricultural robot (AgBot) using an ESP32.
Include the following specific components and trace connections:
BRAIN: Add an ESP32 DevKit V1 38-pin module (U1) as the central microcontroller.
MAIN POWER INPUT: Add a 2-pin male header for external battery power. Connect the positive pin directly to the ESP32 "VIN" pin, and the negative pin to the common GND net.
MOTOR DRIVER HEADER: Add a 1x6 male header (J1) to connect to an external L298N module. Connect J1 pins to ESP32: ENA -> IO14, IN1 -> IO18, IN2 -> IO19, IN3 -> IO21, IN4 -> IO22, ENB -> IO25. Add a 10k ohm pull-down resistor to GND on all 6 of these lines.
ULTRASONIC SENSOR HEADER: Add a 1x4 male header (J2) for an HC-SR04 sensor. Connect J2 Pin 2 (TRIG) directly to ESP32 IO13. Connect J2 Pin 3 (ECHO) to ESP32 IO34 using a proper voltage divider: a 1k ohm resistor in series from ECHO to IO34, and a 2k ohm pull-down resistor from IO34 to GND.
SERVO MOTOR HEADER: Add a 1x3 male header (J3) for a steering servo. Connect J3 Pin 2 (PWM) to ESP32 IO26, and add a 10k ohm pull-down resistor from IO26 to GND.
SENSOR BUS & GPS: Add a single 1x5 male header (J4) to act as a unified data port for the environmental sensors. Route the 3 data pins to available ESP32 GPIOs, and connect the remaining 2 pins to the 3.3V and GND nets. Next, add a 1x4 male header (J5) for a GPS module and route its TX/RX pins to available ESP32 hardware UART pins.
POWER & GROUND: Connect all GND pins across the ESP32, headers, and resistors into a unified common Ground net.
PCB LAYOUT & SILKSCREEN RULES (CRITICAL):
Set 12V motor power traces to 3.0mm width.
Set VIN and 5V servo power traces to 1.5mm width.
Set 3.3V sensor power traces to 0.5mm width.
Set all standard data/logic lines to 0.3mm width.
SELF-DOCUMENTING SILKSCREEN: You must add clear Top Silkscreen text labels next to EVERY single header and pin. Label the power inputs (VIN/GND), the motor driver pins (ENA, IN1, etc.), the Ultrasonic pins (TRIG, ECHO), the GPS pins (TX, RX), and the Sensor Bus pins. The board must be fully self-explanatory to a human looking at the physical PCB.
Wirelessly connects nets on schematic. Used to organize schematics and separate functional blocks. To wirelessly connect net portals, give them same designator. #portal
General Purpose Thick Film Standard Power
and High-Power Chip Resistor
47 kOhms ±5% 0.125W, 1/8W Chip Resistor 0805 (2012 Metric) Automotive AEC-Q200 Thick Film
Features:
- RMCF – standard power ratings
- RMCP – high power ratings
- Nickel barrier terminations standard
- Power derating from 100% at 70ºC to zero at +155ºC
- RoHS compliant, REACH compliant, and halogen free
- AEC-Q200 compliant