How to Build an ESP32 Kids Phone Prototype
A kid-safe mini phone with big buttons, approved contacts, and SOS mode
Updated

What you'll build
In this project you will prototype a kid-safe phone built around an ESP32, a 4x4 membrane keypad, a small TFT display, a speaker module, and a dedicated SOS button. The phone stores a short list of approved contacts, lets the child scroll through them with simple up-and-down key presses, and initiates a call with a single confirm press. Holding the red SOS button for two seconds triggers an emergency routine that auto-dials a preset guardian number and flashes the screen with a bright alert pattern. The entire interface is designed with large fonts, high-contrast colors, and minimal menus so even very young children can operate it confidently.
Building this prototype teaches you how to manage multiple peripherals on a single ESP32 simultaneously -- scanning a keypad matrix, driving a TFT over SPI, producing audio tones through a DAC-fed speaker, and monitoring a hardware interrupt on the SOS pin. You will learn how to structure a state-machine architecture that keeps the user interface responsive while background tasks handle audio playback and communication events. The project also introduces the concept of contact whitelisting and parental lock-out logic, giving you a taste of how product designers think about child safety in consumer electronics.
The finished prototype is a compelling proof-of-concept that demonstrates core embedded-systems skills: multiplexed input handling, SPI display rendering, interrupt-driven safety features, and non-volatile contact storage. From here you could extend the hardware with a SIM800L GSM module to make actual cellular calls, add GPS tracking for location sharing, or integrate Bluetooth for pairing with a parent's smartphone. It is an ideal project for makers who want to explore the intersection of hardware design and user-centered product thinking.
Wiring diagram
Wiring diagram
Components needed
Assembly
Wire the keypad matrix
Connect 4x4 keypad row pins to GPIO14, GPIO27, GPIO12, GPIO13 and column pins to GPIO23, GPIO18, GPIO17, GPIO19.
- Membrane keypads usually have 8 pins — 4 rows on the left, 4 columns on the right.
Connect the OLED display
Wire OLED VCC to 3.3V, GND to ground, SDA to GPIO4, and SCL to GPIO15.
- Confirm I2C address 0x3C — some modules use 0x3D.
Add the SOS button and speaker
Connect the SOS button between GPIO34 and GND (uses internal pull-up). Wire piezo speaker signal to GPIO26 with the other lead to GND.
- Use a large, brightly colored button for the SOS input so kids can find it easily.
- GPIO34 is input-only on the ESP32 — do not try to use it as output.
Upload and test
Flash the sketch and open Serial Monitor at 115200 baud. Press A/D to scroll contacts, B to call, and hold SOS for 2 seconds to trigger the emergency alert.
- Label the approved contacts directly on the enclosure for younger users.
Pin assignments
| Pin | Connection | Type |
|---|---|---|
| GPIO 14 | keypad-1 ROW0 | DIGITAL |
| GPIO 27 | keypad-1 ROW1 | DIGITAL |
| GPIO 12 | keypad-1 ROW2 | DIGITAL |
| GPIO 13 | keypad-1 ROW3 | DIGITAL |
| GPIO 23 | keypad-1 COL0 | DIGITAL |
| GPIO 18 | keypad-1 COL1 | DIGITAL |
| GPIO 17 | keypad-1 COL2 | DIGITAL |
| GPIO 19 | keypad-1 COL3 | DIGITAL |
| 3V3 | oled-phone-1 VCC | POWER |
| GND | oled-phone-1 GND | GROUND |
| GPIO 4 | oled-phone-1 SDA | I2C |
| GPIO 15 | oled-phone-1 SCL | I2C |
| GND | sos-btn-1 GND | GROUND |
| GPIO 34 | sos-btn-1 SIG | DIGITAL |
| GND | speaker-1 GND | GROUND |
| GPIO 26 | speaker-1 SIG | PWM |
Code
#include <Wire.h>
#include <Keypad.h>
#include <Adafruit_SSD1306.h>
#define SDA_PIN 4
#define SCL_PIN 15
#define SOS_PIN 34
#define SPEAKER_PIN 26
const byte ROWS = 4, COLS = 4;
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {14, 27, 12, 13};
byte colPins[COLS] = {23, 18, 17, 19};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
Adafruit_SSD1306 display(128, 64, &Wire, -1);
const char* approvedContacts[] = {"MOM", "DAD", "HOME"};
const int numContacts = 3;
int selected = 0;
bool sosActive = false;
unsigned long sosStartMs = 0;
void playTone(int freq, int durationMs) {
tone(SPEAKER_PIN, freq, durationMs);
delay(durationMs + 10);
noTone(SPEAKER_PIN);
}
void sosAlert() {
display.clearDisplay();
display.setTextSize(2);
display.setCursor(20, 20);
display.println("!! SOS !!");
display.display();
display.setTextSize(1);
for (int i = 0; i < 3; i++) {
playTone(2200, 150);
playTone(1800, 150);
}
}
void setup() {
Serial.begin(115200);
delay(100);
Wire.begin(SDA_PIN, SCL_PIN);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
pinMode(SOS_PIN, INPUT_PULLUP);
pinMode(SPEAKER_PIN, OUTPUT);
Serial.println("Kids Phone ready");
}
void loop() {
if (digitalRead(SOS_PIN) == LOW) {
if (!sosActive) {
sosActive = true;
sosStartMs = millis();
} else if (millis() - sosStartMs > 2000) {
sosAlert();
sosActive = false;
}
} else {
sosActive = false;
}
char key = keypad.getKey();
if (key == 'A') {
selected = (selected + 1) % numContacts;
playTone(800, 50);
}
if (key == 'D') {
selected = (selected - 1 + numContacts) % numContacts;
playTone(800, 50);
}
if (key == 'B') {
playTone(1400, 100);
playTone(1600, 100);
Serial.printf("Calling %s...\n", approvedContacts[selected]);
}
display.clearDisplay();
display.setCursor(0, 0);
display.setTextSize(1);
display.println("--- Kids Phone ---");
display.println();
display.print("> ");
display.setTextSize(2);
display.println(approvedContacts[selected]);
display.setTextSize(1);
display.println();
display.println("A=Next D=Prev B=Call");
display.println("Hold SOS 2s = alert");
display.display();
delay(40);
}
// Run this and build other cool things at schematik.ioReady to build this?
Open this project in Schematik to get the full wiring diagram, pin assignments, and deployable code for the ESP32 Kids Phone.
Open in Schematik →Related guides
How to Build a Self-Balancing Rover with ESP32
ESP32 · Intermediate
How to Build a Fitness Wristband Prototype with ESP32
ESP32 · Intermediate
How to Build an RFID Treasure Chest with ESP32
ESP32 · Intermediate
How to Build a Cosmic Critter Pet with Raspberry Pi Pico
Raspberry Pi Pico · Beginner