Autonomous Pepper Harvesting Robot Design

Stopped because the project has no available ACUs, so I can’t continue executing changes right now.
Completed so far:
  • Inspected the existing schematic and found the ESP32 DevKitC, XL1509-5.0 buck regulator, 5A fuse, 12V/5V/3V3 rails, motor/sensor blocks, and existing nets already present.
  • Checked datasheet guidance for:
    • ESP32 DevKitC power/header pins.
    • XL1509-5.0 recommended 12V-to-5V/2A application circuit.
    • Existing 5A fuse rating.
  • Added these Part 1 components:
    • J1: 12V battery input screw terminal.
    • J2: external normally-closed E-stop connector.
    • D4: 10A/40V Schottky reverse-polarity protection diode.
    • D5: 1N5820 XL1509 buck catch diode.
    • L1: 68uH / 2A buck inductor.
    • LED16: green Ready LED.
    • LED17: yellow Harvesting LED.
    • LED18: red Fault LED.
Not completed yet:
  • The generic resistors/capacitors for LED current limiting, E-stop pull-up, buck input/output capacitors, and decoupling were attempted but not added because the generic part lookup failed.
  • The newly added components are not wired yet.
  • Project files for the power distribution diagram, pin table, BOM, and PCB recommendations still need to be created/updated.
  • Schematic checks still need to be rerun and fixed after wiring.
Next work once ACUs are available:
  1. Add the missing resistors and capacitors correctly.
  2. Wire battery → fuse → reverse-polarity protection → 12V rail → XL1509 → 5V_SYS.
  3. Wire common ground, E-stop NC input, and three ESP32-driven status LEDs.
  4. Update documentation files and rerun checks.
Add missing passives
Show power wiring
Create docs
Run checks later
J2
U1
U3
U2
U6
LED17
LED16
LED18
D5
D4
U4
U5
Q1
F1
J1
L1
Inductance
68uH

Refine this doc
Ask about this doc
Electrical Deliverables — Pepper Harvesting Robot Controller
Pin Mapping Table

Table


FunctionESP32 GPIONetDestination
I2C SDAGPIO21I2C_SDAPCA9685 SDA, MPU6050 SDA
I2C SCLGPIO22I2C_SCLPCA9685 SCL, MPU6050 SCL
ESP32-CAM TX to main RXGPIO16CAM_UART_RXESP32-CAM U0T
ESP32-CAM RX from main TXGPIO17CAM_UART_TXESP32-CAM U0R
Vertical STEPGPIO25VERT_STEPA4988 #1 STEP
Vertical DIRGPIO26VERT_DIRA4988 #1 DIR
Shared motor enableGPIO27MOTOR_ENABLE_NA4988 ENABLE through NC E-stop chain
Ring STEPGPIO32RING_STEPA4988 #2 STEP
Ring DIRGPIO33RING_DIRA4988 #2 DIR
Ultrasonic TRIGGPIO18US_TRIGHC-SR04 TRIG
Ultrasonic ECHOGPIO19US_ECHO_3V3Level-shifted HC-SR04 ECHO
Upper limitGPIO34LIMIT_UPPER_NPull-up, switch to GND
Lower limitGPIO35LIMIT_LOWER_NPull-up, switch to GND
Green LEDGPIO13LED_READY330 ohm series resistor
Red LEDGPIO14LED_FAULT330 ohm series resistor
Yellow LEDGPIO15LED_HARVEST330 ohm series resistor
Connection Table

Table


NetConnections
BAT_12V_RAWBattery + through connector to fuse input
12V_MOTORFuse output to A4988 VMOT pins and buck VIN
5V_SYSBuck output to ESP32 5V, ESP32-CAM 5V, sensor/servo rail
3V3_LOGICESP32 3V3 to PCA9685 VDD and A498x logic VDD
GNDCommon ground for battery, buck, ESP32, camera, drivers, sensors, servos
I2C_SDA/SCLESP32 GPIO21/22 to PCA9685 and MPU6050 with one 4.7k pull-up pair
CAM_UART_RX/TXCross-connected UART between ESP32 and ESP32-CAM
MOTOR_ENABLE_NESP32 output routed through normally closed E-stop to both A4988 ENABLE pins
  • I2C pull-ups: 4.7k ohm to 3.3V.
  • Limit switch pull-ups: 10k ohm to 3.3V, switch to GND.
  • LED resistors: 330 ohm to 1k ohm depending brightness.
  • HC-SR04 ECHO divider: 20k ohm high-side and 10k ohm low-side for about 3.3V from 5V.
  • A4988 VMOT bulk: 100uF electrolytic per driver, 25V minimum, 35V preferred.
  • A498x local decoupling: 100nF per VDD/VBB pin, 0.1uF CP1-CP2, 0.1uF VCP-VBB, 0.22uF VREG-GND when using bare IC.
  • XL1509-5.0: 180uF input, 470uF output, 68uH 2A inductor, 1N5820/SS34-class Schottky per datasheet.
Protection Components
  • Main 5A fuse sized to prototype current; adjust after motor current-limit measurements.
  • Reverse-polarity protection using P-channel MOSFET ideal diode or high-current Schottky for simple prototype.
  • TVS diode across 12V input for wiring transients.
  • NC E-stop in series with A4988 ENABLE path; firmware also monitors E-stop if an auxiliary contact is available.
  • Separate servo power wiring and bulk capacitance near servo connector bank.
Connector Recommendations
  • Battery input: 2-pin screw terminal or XT30/XT60 depending pack current.
  • Stepper motors: locking 4-pin JST-VH/Molex MicroFit or screw terminals, at least 2A per phase.
  • Servos: 3-pin 0.1 inch servo headers with separate high-current 5-6V and GND bus.
  • Sensors and switches: JST-XH 2.54mm keyed connectors for student prototype robustness.
  • Debug: keep ESP32 USB accessible; add UART header for ESP32-CAM programming.
PCB Layout Suggestions
  • Keep ESP32 and ESP32-CAM antennas at board edges with copper keepout under/around antenna zones.
  • Place A4988 drivers near motor connectors; route VMOT and motor coil traces wide with strong ground return.
  • Put 100uF VMOT capacitors next to each A4988 carrier.
  • Keep buck converter loop small and away from camera antenna and I2C lines.
  • Star-route high-current motor and servo grounds back to battery/buck ground entry; do not force servo current through ESP32 ground pins.
Wiring Harness Colors
  • Red: +12V
  • Orange: +5V
  • Black: GND
  • Blue: I2C
  • Yellow: PWM servo/control
  • Green: sensor/limit signals
  • Purple: UART camera link
BOM Summary
  • ESP32 DevKit V1 / ESP32-DevKitC-compatible board
  • ESP32-CAM Ai-Thinker module
  • 2x A4988 stepper driver carrier modules
  • 2x NEMA17 bipolar stepper motors
  • PCA9685 16-channel PWM servo driver
  • 2x MG996R servos
  • HC-SR04 ultrasonic module
  • MPU6050 IMU module
  • Upper/lower limit switches
  • Green/red/yellow LEDs plus resistors
  • NC emergency stop button
  • 12V rechargeable battery, fuse holder, reverse-protection MOSFET/diode, TVS
  • 12V to 5V buck converter, plus separate 5-6V high-current BEC recommended for servos
  • Pin Mapping Table

  • Connection Table

  • Recommended Resistor and Capacitor Values

  • Protection Components

  • Connector Recommendations

  • PCB Layout Suggestions

  • Wiring Harness Colors

  • BOM Summary

Pepper Harvesting Robot Controller thumbnail
Autonomous black pepper harvesting robot electrical control system with ESP32 controller, ESP32-CAM vision, A4988 stepper drives, PCA9685 servo control, sensors, E-stop, 12V battery input, and 5V power distribution.

Properties

V

Pricing & Availability

Distributor

Qty 1

Arrow

$6.46–$56.71

Digi-Key

$24.66–$76.38

HQonline

$9.35

LCSC

$18.00–$18.06

Mouser

$14.02–$69.66

TME

$0.65

Verical

$6.04–$13.30

Controls