Community project

Kids Safe Phone Prototype

Photo of Kids Safe Phone Prototype
Generated with AI

Тлепиева Гульбахрам

Published November 24, 2026

This Kids Safe Phone Prototype uses an ESP32 microcontroller to create a simplified communication device designed with safety in mind. The build combines a 4x4 matrix keypad for input, an SSD1306 OLED display for visual feedback, an SOS button for emergency alerts, and a piezo speaker for audio notifications. It restricts calling to a small list of approved contacts while providing a dedicated emergency button that triggers an alarm.

This guide provides a complete parts list, wiring diagram showing all keypad, display, and button connections, and step-by-step assembly instructions. The included firmware handles keypad scanning, contact selection, display rendering, and SOS alert logic with tone generation. Builders will learn how to wire matrix keypads, interface I2C displays with the ESP32, and implement simple emergency alert systems.

Wiring diagram

Wiring diagram for Kids Safe Phone Prototype
Loading diagram…

Gather all the parts

QtyComponent
1

4x4 Matrix Keypad

Large button input for kid-friendly navigation.

1

SSD1306 OLED

Simple text UI for contacts and status.

1

SOS Button

Dedicated emergency shortcut input (hold 2s to trigger).

1

Piezo Speaker

Audio feedback for calls and SOS chirps.

Assemble it in 4 steps

1. 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.

2. 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.

3. Add the SOS button and speaker

Connect the SOS button between GPIO32 and GND; the firmware enables the internal pull-up. Wire the 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.
  • GPIO32 is dedicated to SOS. Do not share it with a keypad row or column.

4. 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.

Review all connections

1. Connections between "keypad-1" and "ESP32"

Functionkeypad-1ESP32
digitalROW0GPIO 14
digitalROW1GPIO 27
digitalROW2GPIO 12
digitalROW3GPIO 13
digitalCOL0GPIO 23
digitalCOL1GPIO 18
digitalCOL2GPIO 17
digitalCOL3GPIO 19

2. Connections between "oled-phone-1" and "ESP32"

Functionoled-phone-1ESP32
powerVCC3V3
groundGNDGND
i2cSDAGPIO 4
i2cSCLGPIO 15

3. Connections between "sos-btn-1" and "ESP32"

Functionsos-btn-1ESP32
groundGNDGND
digitalSIGGPIO 32

4. Connections between "speaker-1" and "ESP32"

Functionspeaker-1ESP32
groundGNDGND
pwmSIGGPIO 26

Deploy the firmware

#include <Wire.h>
#include <Keypad.h>
#include <Adafruit_SSD1306.h>

#define SDA_PIN 4
#define SCL_PIN 15
#define SOS_PIN 32
#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'}
};
#define ROW0_PIN 14
#define ROW1_PIN 27
#define ROW2_PIN 12
#define ROW3_PIN 13
#define COL0_PIN 23
#define COL1_PIN 18
#define COL2_PIN 17
#define COL3_PIN 19
byte rowPins[ROWS] = {ROW0_PIN, ROW1_PIN, ROW2_PIN, ROW3_PIN};
byte colPins[COLS] = {COL0_PIN, COL1_PIN, COL2_PIN, COL3_PIN};
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);
}

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik