AUTONOMOUS STAGE PIPELINE // 5-STATE DETERMINISTIC FINITE AUTOMATON
● ACTIVE STEP 02/12 · PHASE 1
[STATE_01]d > 5.0 cm
SEARCH
SEARCH & APPROACH
[STATE_02]d ≤ 5.0 cm
PICK
PICK OBJECT
[STATE_03]Gripper Locked
CARRY
CARRY & AVOID
[STATE_04]Target Reached
PLACE
PLACE AT TARGET
[STATE_05]Payload Released
DONE
MISSION COMPLETE
STEP 02 // DRIVE TO PICK ZONESCANNING CORRIDOR // DRIVING TO PICK ZONE
310 mA · 7.25 V
3D DIGITAL TWIN STAGE // RM-01 ROVER
NOSE_CAM // POV● LIVE
ARENA:
WIRING FAULT INJECTOR:
HC-SR04 // TIME-OF-FLIGHT OSCILLOSCOPEd = 32 cm
ECHO TIME (t)
1856 µs
FORMULA
t ÷ 58
DISTANCE (d)
32 cm
L298N // H-BRIDGE SWITCH MATRIX310mA · 7.25V
+VGNDS1S2S3S4M
LEFT: 1/0
FWD
RIGHT: 1/0
FWD
D9: 90° (1.5ms)
1d = readDistanceCm(); // HC-SR04: d = echo_us / 58.0
2if (state == SEARCH) {
3 if (d > 5.0) forward(); // Approach cylinder in Pick Zone
4 else { stopMotors(); state = PICK; }
5} else if (state == PICK) {
6 gripper.write(30); delay(1000); state = CARRY;
7} else if (state == CARRY) {
8 if (d <= 20.0) { stopMotors(); turn(); } // Avoid obstacle
9 else if (!atTarget()) forward();
10 else { stopMotors(); state = PLACE; }
11} else if (state == PLACE) {
12 gripper.write(90); delay(1000); state = DONE;
13} else stopMotors(); // Autonomous cycle complete
BLACKBOX TELEMETRY RECORDER // 120-SAMPLE ROLLING STRIP CHART■ SONAR d(cm)■ MOTOR I(mA)■ BATTERY V(volts)
SYNCHRONIZED 12-STEP EXECUTION LOGPHASE 1: SEARCH & PICK [01–06] · PHASE 2: CARRY & PLACE [07–12]
STEP 01SEARCH
SYSTEM BOOT & INIT
Arduino UNO boots, configures GPIO directions, attaches D9 servo to 90° open, and zeroes motor PWM.
STEP 02SEARCH
DRIVE TO PICK ZONE
Arduino sets IN1=1, IN2=0, IN3=1, IN4=0 with PWM=170 so both wheel pairs propel the chassis forward.
STEP 03SEARCH
ULTRASONIC OBJECT LOCK
40 kHz 8-pulse burst reflects off the hollow cylinder; Echo pulse width t (µs) ÷ 58 locates the object.
STEP 04SEARCH
PRECISION CREEP APPROACH
Duty cycle throttles down to creep speed (PWM=115) until cylinder sits ≤ 5 cm centered between open jaws.
STEP 05PICK
ACTUATE SERVO GRIPPER
Motors brake; Pin D9 shifts 50 Hz pulse width from 1.50 ms (90°) to 1.17 ms (30°), squeezing rubber pads.
STEP 06PICK
PAYLOAD LOCK & TRANSITION
1000 ms stabilization dwell confirms servo closed-loop torque lock; FSM transitions from PICK to CARRY.
STEP 07CARRY
CONTINUOUS OBSTACLE SCAN
While transporting payload, any echo returning with d ≤ 20 cm (t ≤ 1160 µs) triggers an obstacle interrupt.
STEP 08CARRY
DIFFERENTIAL SPIN BYPASS
Left wheel drives forward (IN1=1, IN2=0) while right wheel reverses (IN3=0, IN4=1) to pivot clear of obstacle.
STEP 09CARRY
TRAVERSE TO TARGET ZONE
Once ultrasonic line-of-sight reads > 20 cm clear, chassis rejoins trajectory toward designated drop zone.
STEP 10PLACE
OPEN GRIPPER JAWS
Upon reaching target coordinates, robot halts and commands gripper.write(90) (1.5 ms pulse) to open jaws.
STEP 11PLACE
DEPOSIT & CLEARANCE BACKUP
Hollow cylinder rests stably on target pad; robot reverses briefly so open jaws clear the payload.
STEP 12DONE
AUTONOMOUS CYCLE HALT
All H-Bridge enable lines drop LOW (0V), servo remains at 90°, and FSM enters terminal DONE state.