Silent Haptic Alarm Pillow

by subinni123 in Circuits > Arduino

363 Views, 2 Favorites, 0 Comments

Silent Haptic Alarm Pillow

STEP 111.jpg
STEP 11.jpg

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

  1. Arduino Uno
  2. Tactile Push Buttons
  3. Breadboard
  4. Jumper Wires

4-Digit 7-Segment Display

JK-SM-0716-Wire Vibration Motor

Motor Driver

Material Setup

Gather all the materials


Arduino Uno Kit

  1. Arduino Uno
  2. 3 Tactile Push Buttons
  3. Breadboard
  4. Jumper Wires

4-Digit 7-Segment Display

JK-SM-0716-Wire Vibration Motor

Motor Driver

Packaging Materials

Hardware Wiring

STEP 1.png

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)

  1. need 12 jumper wires
  2. check the attached photo

2) Push buttons

  1. hour setting button - A1
  2. minute setting button - A2
  3. stop/reset button - A3
  4. connect GND to the Negative (-) Ground Rail of the breadbord
  5. 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

  1. need screwdriver to connect jumper wires
  2. 5V - 5V
  3. GND - GND
  4. ENA - A0
  5. N1 - A4
  6. N2 - A5

4) JK-SM-0716-WIRE Vibration Motor

  1. connect to Motor Driver
  2. Red wire - left side of motor driver
  3. 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

STEP 4.jpg

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.