AMR PCB Design


The complete schematic is built: 136 components, 109 named nets, dual high-current regulators, four DRV8874 motor channels, Pi/ESP32 interfaces, sensors, servo bus, and protected power distribution. Independent ERC, passive-component, and availability checks report no open errors or warnings.
Open items before PCB layout
  • Confirm the exact DOIT ESP32 DevKit V1 30-pin orientation.
  • Verify encoder outputs are 3.3 V-compatible.
  • Confirm servo connector and status-beacon current ratings.
  • Six simultaneous servo stalls remain outside the 7.4 V regulator envelope.
Project files
The next phase is PCB stackup, board dimensions, thermal placement, and high-current routing. Confirm these open items and I’ll proceed with layout.
I’ll review the updated layout constraints and confirmations, then incorporate them into the PCB setup and placement plan.
I reviewed the confirmations and existing PCB: it is currently 160 × 100 mm, 4-layer, with all 136 components present, but placement has several congested/unroutable regions. No layout mutations were made because the account ran out of available ACUs.
Remaining work:
  • Apply confirmed ESP32 pinout and encoder-power changes.
  • Add four corner M3 mounting holes with 5 mm keepouts.
  • Re-place components into thermal/functional zones.
  • Configure power-plane and ≥2 mm motor-routing rules.
  • Route copper and complete DRC remediation.
I couldn’t analyze or modify the PCB because no ACUs are currently available, so AI layout features cannot run.
The board remains 160 × 100 mm, 4-layer, with 136 components present. Based on the last verified state, both component placement and trace routing are needed, followed by DRC cleanup. No new changes were applied.
Check placement and DRC
Optimize board size
Find placement issues

Firmware Getting Started
Target
  • ESP32 framework: ESP-IDF or Arduino-ESP32 for a DOIT ESP32 DevKit V1 30-pin module.
  • Raspberry Pi: Linux serial devices enabled through config.txt device-tree overlays for the selected alternate UART pins.
ESP32 Pin Map
Use the GPIO allocation in the Schematic Implementation Report. Keep GPIO12, GPIO15, GPIO2, RX0, and TX0 free during initial bring-up.
I2C Devices
  • PCA9685: address 0x40, PWM channels 0–3 = FL, FR, RL, RR motor enable.
  • MCP23017: address 0x20; GPA0–3 motor direction, GPA4–5 ultrasonic trigger, GPA6–7 beacon, GPB0–3 motor faults.
  • ADS1115: address 0x48; AIN0–3 motor-current measurements.
Initialize I2C on GPIO21 SDA / GPIO22 SCL, then configure the PCA9685 PWM frequency for the DRV8874 control strategy, MCP23017 directions/pull-ups, and ADS1115 gain so the IPROPI voltage remains in range.
UARTs
  • Pi link: ESP32 UART2 RX GPIO16, TX GPIO17.
  • Servo bus: RX GPIO4, TX GPIO5, direction GPIO23. Only drive GPIO23 when the ownership jumper is in the ESP32 position.
  • Preserve UART0 for programming and logs.
Startup Order
  1. Set beacon and motor-direction expander outputs inactive.
  2. Initialize I2C and verify all three addresses.
  3. Set PCA9685 motor PWM outputs to zero.
  4. Read all DRV8874 fault inputs and ADS1115 current channels.
  5. Initialize encoder GPIO interrupts/counters.
  6. Initialize Pi and servo UARTs.
  7. Enable motion only after valid battery/rail/fault checks.
Safety Rules
  • Limit servo concurrency so the 7.4 V rail remains below the 8 A continuous / 10–12 A transient envelope.
  • On any motor fault or overcurrent, command zero PWM before changing direction.
  • Treat encoder voltage compatibility as unverified until measured on the real motors.
  • Target

  • ESP32 Pin Map

  • I2C Devices

  • UARTs

  • Startup Order

  • Safety Rules