Silent Haptic Alarm Pillow
What I Made: I developed a silent alarm clock system that replaces stressful audio alerts with localized physical vibrations. Built using an Arduino Uno and a 4-digit 7-segment display, and JK-SM-0716 vibration motor driven by an external motor driver and power module. The device counts down the set time in a 1-minute interval system and delivers a deep, unmistakable haptic sensation directly through a pillow when it reaches zero, utilizing a custom-packaged plastic casing for optimal safety and vibration transfer.
Why I Made It: The goal was to solve a common issue in shared living spaces, such as university dormitories, where loud morning audio alarms inevitably wake up and disrupt the sleep of all roommates. To improve this shared living experience, I shifted the focus to a personalized haptic experience. It delivers a physical vibration directly to the user through the pillow, ensuring they wake up reliably and peacefully without disturbing anyone else in the room.
Supplies
Arduino Uno Kit
- Arduino Uno
- Tactile Push Buttons
- Breadboard
- Jumper Wires
4-Digit 7-Segment Display
JK-SM-0716-Wire Vibration Motor
Motor Driver
Material Setup
Gather all the materials
Arduino Uno Kit
- Arduino Uno
- 3 Tactile Push Buttons
- Breadboard
- Jumper Wires
4-Digit 7-Segment Display
JK-SM-0716-Wire Vibration Motor
Motor Driver
Packaging Materials
Hardware Wiring
Connect the Arduino, display, motor driver, vibration motor, etc through the breadboard based on the diagram
1) 4 digit 7-segment display (the most complicated part)
- need 12 jumper wires
- check the attached photo
2) Push buttons
- hour setting button - A1
- minute setting button - A2
- stop/reset button - A3
- connect GND to the Negative (-) Ground Rail of the breadbord
- connect the opposite terminal of all 3 buttons to the Negative (-) Ground Rail of the breadboard to share a common GND
3) L298N Motor Driver
- need screwdriver to connect jumper wires
- 5V - 5V
- GND - GND
- ENA - A0
- N1 - A4
- N2 - A5
4) JK-SM-0716-WIRE Vibration Motor
- connect to Motor Driver
- Red wire - left side of motor driver
- Blue wire - right side of motor driver
Uploading the Source Code
Upload the final source code in Arduino IDE
#include "SevSeg.h"
SevSeg sevseg;
int enA = A0;
int in1 = A4;
int in2 = A5;
int hours = 0;
int minutes = 0;
unsigned long lastUpdate = 0;
bool isAlarm = false;
bool timerStarted = false;
bool lastBtnH = HIGH;
bool lastBtnM = HIGH;
bool lastBtnS = HIGH;
void setup() {
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
analogWrite(enA, 0);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
pinMode(A1, INPUT_PULLUP);
pinMode(A2, INPUT_PULLUP);
pinMode(A3, INPUT_PULLUP);
byte numDigits = 4;
byte digitPins[] = {1, 3, 4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};
sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins, false);
sevseg.setBrightness(90);
}
void loop() {
bool curBtnH = digitalRead(A1);
bool curBtnM = digitalRead(A2);
bool curBtnS = digitalRead(A3);
// 1. Hour Setting Button
if (lastBtnH == HIGH && curBtnH == LOW) {
hours = (hours + 1) % 24;
timerStarted = true;
lastUpdate = millis();
delay(5);
}
lastBtnH = curBtnH;
// 2. Minute Setting Button
if (lastBtnM == HIGH && curBtnM == LOW) {
minutes += 5;
if (minutes >= 60) {
minutes = 0;
hours = (hours + 1) % 24;
}
timerStarted = true;
lastUpdate = millis();
delay(5);
}
lastBtnM = curBtnM;
// 3. Stop/Reset Button
if (lastBtnS == HIGH && curBtnS == LOW) {
isAlarm = false;
timerStarted = false;
hours = 0;
minutes = 0;
analogWrite(enA, 0);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
delay(5);
}
lastBtnS = curBtnS;
// 4. Countdown Logic
if (timerStarted && !isAlarm && (hours > 0 || minutes > 0)) {
if (millis() - lastUpdate >= 60000) {
lastUpdate = millis();
if (minutes > 0) {
minutes--;
} else if (hours > 0) {
hours--;
minutes = 59;
}
}
if (hours == 0 && minutes == 0) {
isAlarm = true;
}
}
// 5. Alarm Activation Logic
if (isAlarm) {
analogWrite(enA, 255);
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
}
// 6. Display Output
sevseg.setNumber(hours * 100 + minutes, 2);
sevseg.refreshDisplay();
}
Pillow Packaging
Package the vibration motor so that it operates safely inside the pillow
I used plastic medicine syrup bottle and cut the bottleneck, but you can use any other plastic bottles.