A delivery robot with three password-protected compartments opened by servo motors.
Built and tested by Shahan Fathima K · Industrial Robotics Institute

This delivery robot provides secure compartments so items can be delivered safely using password protection. An Arduino Uno reads a 5-digit password from a 4×4 keypad and drives three servo motors, one for each box. Each box has its own unique password; pressing * opens the selected box and # closes it.
| Component | Qty |
|---|---|
| Arduino Uno | 1 |
| 4×4 Keypad | 1 |
| Servo Motor (SG90) | 3 |
| Jumper Wires | As needed |
| Lithium-ion Battery | 2 |
| Battery Case with Switch | 1 |
| From | Connect to |
|---|---|
| Keypad Rows | Pins 9, 8, 7, 6 |
| Keypad Columns | Pins 5, 4, 3, 2 |
| Servo 1 Signal (Box 1) | Pin 10 |
| Servo 2 Signal (Box 2) | Pin 11 |
| Servo 3 Signal (Box 3) | Pin 12 |
| All Servo VCC | 5V |
| All Servo GND | GND |
| Battery + | Arduino VIN |
| Battery – | GND |
Complete, tested Arduino C++ code for this project. Copy it into Arduino IDE and upload it to the Arduino Uno.
#include <Keypad.h>
#include <Servo.h>
Servo box1;
Servo box2;
Servo box3;
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {9,8,7,6};
byte colPins[COLS] = {5,4,3,2};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
String input = "";
// 5-digit passwords
String pass1 = "12345";
String pass2 = "23456";
String pass3 = "34567";
int activeBox = 0;
void setup()
{
box1.attach(10);
box2.attach(11);
box3.attach(12);
box1.write(0);
box2.write(0);
box3.write(0);
}
void loop()
{
char key = keypad.getKey();
if (key)
{
if (key >= '0' && key <= '9')
{
input += key;
}
if (input.length() == 5)
{
if (input == pass1) activeBox = 1;
else if (input == pass2) activeBox = 2;
else if (input == pass3) activeBox = 3;
else activeBox = 0;
input = "";
}
// Open box
if (key == '*' && activeBox != 0)
{
if (activeBox == 1) box1.write(90);
if (activeBox == 2) box2.write(90);
if (activeBox == 3) box3.write(90);
}
// Close box
if (key == '#' && activeBox != 0)
{
if (activeBox == 1) box1.write(0);
if (activeBox == 2) box2.write(0);
if (activeBox == 3) box3.write(0);
activeBox = 0;
}
}
}
This delivery robot provides secure compartments so items can be delivered safely using password protection. An Arduino Uno reads a 5-digit password from a 4×4 keypad and drives three servo motors, one for each box.
You need: Arduino Uno (1), 4×4 Keypad (1), Servo Motor (SG90) (3), Jumper Wires, Lithium-ion Battery (2), Battery Case with Switch (1). Software: Arduino IDE, Keypad library, Servo library.
Yes. It is rated beginner and takes about 3–4 hours to build, using the Arduino Uno. The guide on this page explains every connection and step.
The complete, tested Arduino C++ code is free on this page. Copy it into Arduino IDE and upload it to the board.
Yes. IRI sells a kit with the parts for this project (PRJ-033). Message IRI on WhatsApp at +91 86060 82634 for the kit price and delivery details.