Embedded robotics · Penn MEAM 5100

ROBA: Mobile Robot and Embedded Control

Fall 2025

A physical competition robot connecting gamepad commands, wireless communication, range sensing and optical localization to a four-wheel drivetrain and servo mechanism.

A complete robot, from structure to control

Assembled ROBA robot with four wheels, a two-level MDF chassis, top servo arm, sensor mounts and control electronics
The assembled robot: laser-cut MDF structure, four-wheel differential drive, compliant front bumper and upper actuation/sensing layer.

ROBA combines a laptop driver station, an ESP32 FeatherS2 master and an ESP32-C3 sensor board. Manual commands, wall-follow feedback and Vive target navigation share the master's motor outputs. A servo sweeps the upper mechanism, while dedicated commands trigger predetermined competition-task sequences.

Recorded hardware demonstrations

Arena demonstrations with the original audio: wall-side traversal, a corridor maneuver and target contact.

Wall-side traversal, 32.6 s. The robot follows the right arena boundary and turns near the far end.

Use the video controls to play, pause and adjust volume.

Mechanical design and embedded architecture

Closer view of the robot's bumper, MDF cross-bracing, electronics and upper mechanism
Cross-bracing ties the stacked plates together; wiring and components remain accessible for assembly and tuning.
CAD view showing the robot's plates, motor mounts, wheels and upper servo structure
The CAD layout separates the drivetrain from the upper mechanism and optical receivers.

The report describes four geared DC motors driven in left/right pairs through H-bridges. A movable 3D-printed bumper supports repeated contact, and the two raised Vive receivers are positioned to reduce occlusion by the mechanism and wiring. The report records supply sensitivity and sensor noise; these shaped the final task strategy.

Gamepad and Python laptop communicate with the ESP32 master over UDP; the sensor slave sends ranges over UART; Vive inputs feed pose estimation; the master drives motors and servo
Architecture reconciled with the committed firmware. Range data uses UART, while the optional TopHat packet-count interface uses I²C.

Sensing and communication

The C3 reads two right-facing HC-SR04 ultrasonic sensors and a front VL53L0X time-of-flight sensor. It rejects invalid readings, handles short misses and sends integer centimetres as DIST:RB,RF,F over 115200-baud UART. The master applies median-of-three filtering before wall control. The 70 ms acquisition schedule is a configured interval, not a measured fixed sensor rate.

The Python station uses Pygame to read an Xbox-compatible controller, then sends newline-terminated UDP messages to the robot's Wi-Fi access point at 192.168.4.1:4210. The laptop receives diagnostic messages on port 5005. Manual commands are discrete directions rather than proportional throttle.

Hardware pins and message formats

Master motor PWM: GPIO 3/7; servo: GPIO 11; Vive inputs: GPIO 12/14; UART RX/TX: GPIO 44/43. Slave UART RX/TX: GPIO 20/21; ultrasonic trigger/echo pairs: 4/5 and 8/10; ToF SDA/SCL: 7/6.

Mode commands are J/W/V. G arms wall following, T toggles servo sweep in joystick mode, TARGET accepts one coordinate, TARGET2 queues two, and AL/AH/AN invoke timed task routines. Full wiring, power and setup requirements are in the operating guide.

Original report's circuit drawing for the robot electronics and motor control connections
Original electrical drawing; use the source-based pin table for the final firmware rather than assuming every earlier drawing label is current.

Manual drive, wall following and target navigation

ModeInputs and control behavior
ManualAxes 0/1 with a 0.25 deadzone select forward/backward/left/right/stop. A selects wall mode; B selects Vive mode; LB toggles servo sweeping.
Wall followRB arms motion. Right distance and angle corrections track a 10 cm target; a stable front range below 25 cm for three control ticks invokes a left turn.
Vive navigationTwo receiver readings estimate position and heading. Filtered rotate/drive states align with a target and advance; the implemented queue accepts two targets.
Task sequencesAL/AH/AN run fixed-duration motor sequences. They are separate from feedback target navigation and do not perform obstacle replanning.

Vive heading alignment uses a 3° threshold and arrival uses a 100-unit position threshold in the interface's coordinate units. Vive position jitter motivated timed sequences for capture tasks.

Arena maneuver, 17.9 s. Forward travel down the arena corridor, followed by a heading change near the far end.

Servo mechanism and competition-task execution

The master generates a 50 Hz servo signal with a 600–2400 µs pulse sweep, advancing in 20 µs steps. The joystick shoulder command toggles continuous sweeping. The timed tower/nexus routines operate the drivetrain; the code does not make their stopping behavior depend on bumper contact.

Approach and contact sequence, 16.2 s. The robot approaches a field target and performs a repeated contact sequence.

Our team earned a third-place alliance finish in the Penn MEAM 5100 robotics competition. Timed routines made task execution repeatable, while opponent interference could still block the route.

Reproduce the software and inspect the system

The repository includes the Python driver station, master/slave firmware, report, wiring and protocol guide, dependency instructions and build checks. Firmware uses Arduino-ESP32, the original Penn Vive interface and the ToF library.

See the operating guide for setup, mode cancellation, stop handling and link-loss behavior.

Developed as a Penn MEAM 5100 team project.