Project · Engineering

Postman Robot

Line-following robot that finds its way on a grid map by counting junctions and stops on the spot where the parcel goes.

Ref.
02.04
Period
Apr 2022
Status
Completed
Organization
Bachelor — IMERIR
Stack
  • ESP32-WROOM
  • IR sensors
  • DC gearmotors
  • PID
  • 3D printing

Key points

  1. Line following with front infrared sensors and a PID controller on two DC gearmotors.
  2. Localisation by counting junctions, detected by side infrared sensors.
  3. Delivery by stopping on the target spot of the grid map.
  4. My part: the hardware and the sensors, plus the chassis, which I modelled and 3D-printed.

The task

A small delivery robot on a printed map: a grid of black lines, with numbered delivery spots in each square. The robot has to follow the lines, know at any time where it is on the grid, and stop on the spot where the parcel must be delivered.

Built in a team of three for the mobile robotics course of my Bachelor in Computer Science at IMERIR. I handled the hardware and the sensors, and designed the chassis.

Video 1Line following on the delivery map.
0:00 / 0:00

Video 1Line following on the delivery map.

Fig. 1The robot from above.
Top view of the robot: round white chassis, ESP32 board, wiring and battery

Fig. 1The robot from above.

How it works

Following the line. Infrared sensors at the front read the black line under the robot. A PID controller turns their readings into a speed for each of the two DC gearmotors, so the robot stays centred on the line instead of zigzagging along it (Video 1). Everything runs on an ESP32-WROOM (Fig. 1).

Knowing where it is. No GPS or positioning system: infrared sensors on each side detect when the robot crosses a junction, and counting junctions tells it where it is on the grid (Fig. 2).

Fig. 2The delivery map: horizontal aisles T1 to T4, vertical aisles A1 to A4, and four numbered spots in each square.
Delivery map: a 3 by 3 grid of black lines, horizontal aisles labelled T1 to T4 and vertical aisles A1 to A4; each square holds four grey tiles numbered 1 to 4, one next to each side

Fig. 2The delivery map: horizontal aisles T1 to T4, vertical aisles A1 to A4, and four numbered spots in each square.

Delivering. Once it reaches the target spot, the robot simply stops there.

My part

  • Hardware: choosing and wiring the board, the motors and the sensors (Fig. 4).
  • Sensors: placing and reading the front and side infrared sensors.
  • Chassis: modelled and 3D-printed (Fig. 3), with room for the board, the battery and the sensors.
Fig. 3Printing the chassis.
3D printer printing a round white chassis plate with hexagonal cut-outs

Fig. 3Printing the chassis.

Fig. 4The hardware (AI-generated reproduction).
AI-generated reproduction of the robot from the side: white chassis, red motor driver, blue sensor board, cylindrical battery, coloured wiring, a drive wheel, a caster and the front infrared sensor

Fig. 4The hardware (AI-generated reproduction).

Challenges

PID tuning. Too soft and the robot drifts off the line in turns; too aggressive and it oscillates. The challenge was finding gains that held at a usable speed.

Junction detection. A junction must be counted exactly once: missing one or counting it twice puts the robot in the wrong place. The side sensors had to tell a real crossing from noise or a slightly off-centre pass.

#robotics#embedded#line-following#pid#3d-printing