Hardware
Bill of Materials
Kit-Supplied Components
| Component | Model | Qty |
|---|---|---|
| Microcontroller | ESP32 DevKit v1 | 1 |
| Water turbidity sensor | SEN0189 (mandated) | 1 |
| Soil moisture sensor | Capacitive v2.0 (mandated) | 1 |
| DC gearmotor | JGA25-370 12V 300RPM (no encoders) | 2 |
| Motor driver | L298N | 1 |
| Servo | MG996R | 1 |
| Buck converter | LM2596 | 1 |
Additional Components
| Component | Model | Qty | Role |
|---|---|---|---|
| Ultrasonic sensor | HC-SR04 | 1 | Forward wall detection |
| Voltage regulator | AMS1117-3.3V | 1 | 3.3V rail |
| Resistors | 220 Ω + 470 Ω (SEN0189 divider) + 1kΩ/2kΩ (ECHO) | — | SEN0189 output divider + HC-SR04 ECHO 5V→3.3V divider |
| Battery | LiPo 7.4V 2200mAh | 1 | Main power |
The robot has no wheel encoders and no IMU — heading is open-loop dead reckoned from commanded wheel speeds (path log only). There is no I2C device on the robot at all; the single HC-SR04 ultrasonic is a collision guard on two plain GPIOs.
Power Architecture
LiPo 7.4V 2200mAh
│
├── L298N VM (7.4V direct → ~5.4V at motors after L298N drop)
│ └── expect reduced speed/torque on turf and sand
│
├── LM2596 Buck → 5V ──→ SEN0189 (5V supply)
│ MG996R servo
│ L298N logic
│
├── LM2596 Buck → 5V ──→ HC-SR04 ultrasonic (5V device; ECHO returns 5V → divider)
│
└── AMS1117-3.3V (from 5V) ──→ ESP32
Capacitive moisture sensor
Critical: the SEN0189 output swings to ~4.5V. The ESP32 ADC pin maximum is 3.3V — the signal must pass through a voltage divider. As built: signal → 220 Ω → tap → 470 Ω → GND, with the ADC reading the tap.
TURBIDITY_DIVIDER_RATIO= 690/470 = 1.4681, defined inhardware_pins.h. Direct connection clips every clean-water reading and can damage the pin.
Pin Assignments (hardware_pins.h — authoritative)
| GPIO | Function |
|---|---|
| 13 | L298N IN1 — Motor L direction |
| 14 | L298N IN2 — Motor L direction |
| 4 | L298N ENA — Motor L PWM (LEDC ch0) |
| 18 | L298N IN3 — Motor R direction |
| 19 | L298N IN4 — Motor R direction |
| 23 | L298N ENB — Motor R PWM (LEDC ch1) |
| 27 | MG996R servo PWM |
| 21 | free (was I2C SDA — the colour sensor and the whole bus are gone) |
| 22 | free (was I2C SCL) |
| 16 | HC-SR04 TRIG |
| 17 | HC-SR04 ECHO — via 5V→3.3V divider |
| 34 | SEN0189 ADC — via voltage divider |
| 35 | Capacitive moisture ADC — direct (3.3V safe) |
| 0 | BOOT button — flashing only; the firmware no longer reads it |
| 2 | Status LED — solid ON once boot completes |
GPIO 21/22 used to be reserved for I2C and are now free — the colour sensor was the only device on the bus. They remain unassigned rather than reshuffling a working motor pinout.
GPIO 34/35 are ADC1 — safe while WiFi runs. Never move analog inputs to ADC2 pins (0, 2, 4, 12–15, 25–27): ADC2 is unusable with the WiFi AP active.
Obstacle Sensor Wiring
There is no I2C bus. The HC-SR04 is the only sensor that is not a plain ADC read, and it uses two ordinary GPIOs — TRIG 16, ECHO 17. ECHO drives 5V, so it must pass through a divider to 3.3V before the ESP32 pin (e.g. 1kΩ series + 2kΩ to GND → 0.66×). TRIG accepts the ESP32's 3.3V directly.
Double-Arm Seesaw Mechanism
One MG996R servo drives two rigid arms on the same shaft. One servo replaces two linear actuators — simpler, lighter, fewer failure modes. This is the headline innovation.
SERVO SHAFT (pivot)
│
┌─────────────┴─────────────┐
│ │
Arm A Arm B
SEN0189 Cap. Moisture v2.0
(Water probe) (Soil probe)
Servo 90° → NEUTRAL: both arms horizontal (travel position)
Servo 0° → Arm A DOWN: water sensor deployed
Servo 180° → Arm B DOWN: soil sensor deployed
Rules:
- Robot must be stationary before the servo moves.
- Always return to 90° after every sampling sequence.
- Arms are physically rigid — both move together on every rotation.
Physical Compliance
| Constraint | Limit |
|---|---|
| Length | ≤ 400mm |
| Width | ≤ 300mm |
| Height (arm at 90°) | ≤ 400mm |
| Weight (battery included) | ≤ 1.5kg |
All dimensions measured in starting configuration (servo at 90°, arms horizontal). Deployable parts may not exceed the limits.
Mounting Requirements
- HC-SR04 forward-facing, at a height where it sees the arena wall squarely. It is a collision guard only: it cannot see down into a recessed water slot, so nothing in the firmware protects the wheels from a slot — that stays the operator's job.
- HC-SR04 forward-facing at wall height, both transducers unobstructed.
- Servo arm pivot at the front so both probes reach past the front bumper.
- Battery secured with an accessible power switch — officials can order an immediate power-down.