Two independent robots talking over Bluetooth, master / slave
Fold-out bridge and peristaltic pump to complete the mission
Big robot's path corrected by PID, using the gyro of the small robot riding on board
Fully autonomous mission after pressing START, with emergency stop and shutdown on Bluetooth loss
Gallery
The competition: the bridge unfolds and the small robot crosses (80 s excerpt)
The explorer fire engine next to the fire station, the carrier robot
The fire station: the carrier robot, door closed
The robots being built in the workshop
CAD assembly: the big robot, the unfolded bridge and the small robot
Big robot: raised tank and peristaltic pump
Small robot: the reel that unwinds the hose
The big robot prototype during assembly
Full test of the bridge unfolding (19 May 2025)
Peristaltic pump demonstration
Context and goal
The 1st-year discovery project competition: bring about 0.8 L of water into a tank on the other side of a gap. The course is a 3 m table, a 50 cm gap, then a second 3 m table. Once the tank is filled, the robot must back up 50 cm and stop. Everything runs autonomously after the start, on a CHF 200 budget.
Our answer relied on two independent robots that cooperate and communicate over Bluetooth.
The two-robot strategy
A large carrier robot takes the small explorer robot to the edge of the gap
At the edge, the carrier unfolds a bridge; the small robot drives over it to reach the second part of the course
A hose links the two robots: it unwinds from the small one to the big one, which holds the water container
The small robot reaches the receiving area; the big robot uses a peristaltic pump to empty the tank, through the small robot's front tray, into the tank of the second area
What I did
Designed all the electronics of both robots
Wrote all the code in C++ (Arduino)
Master / slave Bluetooth link: the big robot commands the small one to synchronise the mission phases
Integrated the limit switches for edge detection (stopping at the end of the table), the motors, the servo and the peristaltic pump
PID control of the big robot's path using the small robot's MPU6050 gyro
Technical details
Control — Arduino Mega on the big robot (master), Arduino Uno on the small robot (slave)
Communication — 2 HC-05 Bluetooth modules at 9600 baud; the master module's STATE pin signals a lost link
Drive — Modelcraft RB350100 motors with 1:100 gearboxes, driven by L298N H-bridges
Sensors — MPU6050 gyro (I²C) on the small robot; limit switches to detect the table edges
Bridge — two 300 mm wooden decks reinforced with aluminium angles, lowered by a motorised winch
Water — GROTHEN G3000 peristaltic pump powered at 24 V, hose unwound from a 3D-printed reel
Hose placement — a servo triggered at the start dips the tube into the tank with no human help
Interface — START and STOP (emergency stop) buttons
Block diagram rebuilt from the pins in the final code; the original schematic was not kept (diagram in French)
Communication and control
The big robot has to drive straight for 3 m to the edge, yet its two motors never turn at exactly the same speed. The only gyro available, an MPU6050, is mounted on the small robot… which happens to ride on the big robot during this phase. So the small robot sends its rotation rate over Bluetooth every 50 ms; the big robot integrates it over time to rebuild its own heading, then corrects its two motors with a PID controller (Kp = 6, Ki = 0.05, Kd = 0.6): left speed = target speed − correction, right speed = target speed + correction.
The whole mission is split into states. The master drives the sequence and waits for an acknowledgement from the slave before moving on to the next step:
Mission flow and messages exchanged, from the final code of both robots (diagram in French)
Message
Sent by
Effect
ETAT1
Master
The slave starts sending its rotation rate
G:<value>
Slave
Rotation rate (°/s) for the master's PID
STOP_ANGLE
Master
Edge reached: stop sending
ETAT3
Master
The slave crosses the bridge and drives to the edge
ETAT5
Master
The slave backs up for 3 s
FIN_ETAT
Slave
Acknowledgement: the master moves to the next state
Sizing and tests
Pump — The GROTHEN G3000 peristaltic pump was tested on 3 m of hose with a 750 mL tank:
Voltage
Emptying time
Average flow
12 V
60 s
750 / 60 = 12.5 mL/s
24 V
30 s
750 / 30 = 25 mL/s
Measured losses: about 30 mL, i.e. 30 / 750 = 4 % of the volume, below the 10 % tolerance. Hence a dedicated 24 V battery for the pump, and a raised tank so that gravity helps empty the hose. On competition day the pump ran for about 30 s.
Bridge — It had to span a 500 mm gap, carry a robot of up to 4 kg and fit folded within 400 × 400 × 100 mm. The chosen design: a drawbridge with two 300 mm decks joined by hinges, lowered by a cord wound on a winch; elastic bands unfold the second deck once the lever arm is long enough.
Wheel motors — Continuous torque C = 6 kgf·cm = 6 × 9.81 N × 0.01 m ≈ 0.589 N·m. With two motors and wheels of radius R = 0.06 m, the driving force is F = n·C / R = 2 × 0.589 / 0.06 ≈ 19.6 N. The rolling resistance of a 10 kg robot is F_r = μr·m·g = 0.03 × 10 × 9.81 ≈ 2.94 N. Net force: 19.6 − 2.94 ≈ 16.7 N, giving an acceleration a = 16.7 / 10 ≈ 1.67 m/s². At 52 rpm under load, the speed is v = 52 / 60 × 2π × 0.06 ≈ 0.33 m/s: the 3 m table takes about 9 s. (This corrects the calculation in review report 2, which mixed kgf and newtons and found 3 N; the conclusion — motors more than strong enough — stays the same.)
Result
We won the design award and completed the challenge.
Difficulties
Bridge — during the review 2 demonstration, a cord attachment broke and the bridge came down too fast. The cord was then fixed directly through a hole in the aluminium profile, and the winch speed reduced for a gradual unfolding
Preparation — the winch cord had to be rewound by hand between runs, in a hard-to-reach spot
Electronics — a shield problem prevented the first motor tests with the code
Cooperation — getting two autonomous systems to talk in real time, with acknowledgements and handling of a lost link
The bridge unfolding in three stages, during a test
What I take away
Making two autonomous embedded systems cooperate and talk in real time: that was the real difficulty, far more than either robot on its own.