Have ever had those days when you can’t get up for your morning class? As college students ourselves, we believe that all of us have those bad mornings and that is why we bring to you the Wakey Blankey. We propose a special blanket designed to wake someone up by movement and vibration. We look to build this project through the use of the Arduino UNO, Ethernet Shield, LCD, buzzer, servo motors and a pulling mechanism. We connect the Arduino UNO is connected to LCD and Ethernet shield which fetches the GPS universal time via Ethernet connection and displays it on the LCD with a 10 seconds update rate. How it works is when the real time reaches the alarm time, the Arduino commands the connected buzzer to sound and the connected servo motor to spin half a revolution. This spin pulls the wire attached to the servo motor which triggers our blanket pulling mechnism, snatching away the user's blanket and forcing the user to wake up as one cannot simply sleep in the cold without a blanket. This project will use the skills we have acquired so far in the labs such as the servo motors, internet connection, LCD and Arduino. It will be beneficial for people who have difficulties waking up for early appointments, and that’s the majority of college students.

Here is the link to our Introduction Video: https://www.youtube.com/watch?v=n2-cZYqnxvk


The Wakey-Blankey is a special blanket designed to wake up someone, by pulling itself away at a specified time that one would wish to wake up. For most college students, it is extremely difficult to get off bed to go to an early morning class when sleeping in a warm fluffy blanket, even with the loudest alarm. In my case, when the alarm rings I snooze it or turn it off, then go back to sleep. Consequently, most college students including ourselves have missed those early morning classes, because getting out of bed was extremely difficult. Therefore, we were self-inspired to make a blanket that could actually wake one up by exposing you to the cold, hence solving the problem of missing classes. With the blanket pulled away, and one’s body exposed to the cold in the morning, one would not have a choice but to wake up.


For the Wakey-Blankey to work, we used the Ethernet cable to connect the Arduino to the internet, then the internet sends time signals to the Arduino Uno which in turn receives the time and displays it on the LCD shields. Continuously, the Arduino Uno commands the servo motor to rotate when the specified time is at hand, and the buzzer pin starts ringing. As the Servo motor rotates, it triggers the wire to press the mechanical button of the Dog leash (our blanket pulling mechanism). Finally, the Dog leash pulls the blanket and the goal is achieved, no more sleeping! In the implementation, we strived for simplicity of the system, considering that it would be used on the bed, hence needed to be practically convenient.

The Wakey-Blankey project was implemented by constructing a connected system of the following subsystems:

Arduino Uno & LCD shield: This is the command engine of the Wakey-Blankey. The Arduino-Uno receives time signal from the internet, display it on the LCD shield. Then use Arduino to send signal to the servo motor to rotate, when the time to wake up is at hand, and making the buzzer pin to start ringing.

Ethernet cable: In this system, we are using the Ethernet cable to connect the Arduino to the internet. The Ethernet is connected to the internet server in the lab, then connected to the Arduino to make the whole system work.

A servo motor & Wire: A wire is connected to both the servo and the mechanical button of the dog leash, so that when the servo motor blades rotate, the wire presses the dog leash button, making the chain of the dog leash retract. We made the servo motor fixed to the Dog leash handle using glue tape so that the servo remains still during rotation of the blades, hence not altering the whole system.

Dog leash: This is a simple material that is used to pull the blanket. The dog leash has a small hook, which is attached to one end of the blanket. The dog leash has a mechanical button which makes its chain loose or still when pressed.

Buzzer pin: The role of the buzzer pin in this system is to ring at the same time the servo motor starts rotating. So it acts as an alarm, giving warning that the blanket is about to retract, and continues sounding after the blanket is pulled away. It can stop ringing by pressing a button.

A Blanket: This is the main part that the project is centered on, it is the final tool in the system that actually makes somebody wake up. The blanket retracts itself, hence exposing the person sleeping in the cold.


During the implementation of the project, we could not use a real blanket because the dog leash we used didn’t have enough force to support the weight of the blanket. Therefore, we used a pillow case as a prototype, but the process of the system is the same, we would just need to get a more powerful dog leash to support a blanket.

To implement it as an everyday tool, we would have to get Arduino to connect to the internet with Wi-Fi without having to use an Ethernet cable. Furthermore, we would implement a button device to be used to set the alarm time and to stop the buzzer in order to make the Wakey-Blankey more user friendly.

The Wakey Blankey is not only for college student, but for anybody who faces waking up problems. Make sure you get one!


// the code for the wakey-blankey project is adapted from the codes from
// lab 6 (the internet lab) and lab 4 (the servo & dc motor lab)
// last modified by Patadon Kongsoonthorn on December 10th 2015

// the code below will fetch the time from the "time.nist.gov" and convert it 
// into 6 digit integer (taking out the colon - hh:mm:ss --> hhmmss) because
// we can then set the alarm time as another 6 digit integer. 
// So, when the 6 digit real time passes the 6 digit threshold, the arduino starts
// its waking up operations. The servo turns to the right to trigger the
// blanket pulling mechanism and the buzzer will sound at the same time.
// At the same time, the buzzer will sound just like a traditional alarm clock.

#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <LiquidCrystal.h>
#include <Servo.h>

Servo servo1;

const int servoPin = 3;
const int left = 0;
const int right = 180;

// MAC address printed on a sticker on the Ethernet shield
byte mac[] = {
  0x90, 0xA2, 0xDA, 0x0E, 0x9D, 0x0B
unsigned int localPort = 8888; //local port to listen UDP packets
char timeServer[] = "time.nist.gov"; 
const int NTP_PACKET_SIZE = 48;
byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
EthernetUDP Udp;
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); //for DF robot
IPAddress ip(192, 168, 1, 111);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (you must change this!):
EthernetClient client;

void setup() {
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  lcd.begin(16, 2);

  // setup the pin for the servo motor
  pinMode(2, OUTPUT);

  Ethernet.begin(mac, ip);
  // print your local IP address:
  //Serial.print("My IP address: ");
  for (byte thisByte = 0; thisByte < 4; thisByte++) {
    // print the value of each byte of the IP address:
    //lcd.print(Ethernet.localIP()[thisByte], DEC);
    Serial.print(Ethernet.localIP()[thisByte], DEC);

void loop() {
  sendNTPpacket(timeServer); // send an NTP packet to a time server

  // wait to see if a reply is available
  if (Udp.parsePacket()) {
    // We've received a packet, read the data from it
    Udp.read(packetBuffer, NTP_PACKET_SIZE); // read the packet into the buffer

    // the timestamp starts at byte 40 of the received packet and is four bytes,
    // or two words, long. First, extract the two words:

    unsigned long highWord = word(packetBuffer[40], packetBuffer[41]);
    unsigned long lowWord = word(packetBuffer[42], packetBuffer[43]);
    // combine the four bytes (two words) into a long integer
    // this is NTP time (seconds since Jan 1 1900):
    unsigned long secsSince1900 = highWord << 16 | lowWord;

    // now convert NTP time into everyday time:
    // Unix time starts on Jan 1 1970. In seconds, that's 2208988800:
    const unsigned long seventyYears = 2208988800UL;
    // subtract seventy years:
    unsigned long epoch = secsSince1900 - seventyYears;

    // print the hour, minute and second:
    Serial.print("The time is ");       // UTC is the time at Greenwich Meridian (GMT)
    lcd.print("Time: ");
    Serial.print((epoch  % 86400L) / 3600 - 5); // print the hour (86400 equals secs per day)
    lcd.print((epoch  % 86400L) / 3600 - 5);
    if (((epoch % 3600) / 60) < 10) {
      // In the first 10 minutes of each hour, we'll want a leading '0'
    Serial.print((epoch  % 3600) / 60); // print the minute (3600 equals secs per minute)
    lcd.print((epoch  % 3600) / 60);
    if ((epoch % 60) < 10) {
      // In the first 10 seconds of each minute, we'll want a leading '0'

    Serial.println(epoch % 60); // print the second
    lcd.print(epoch % 60);

    long theTime = ((epoch  % 86400L) / 3600 - 5) * 10000 
      + ((epoch  % 3600) / 60) * 100 + epoch % 60;
    // print the 6 digit integer time in the serial monitor

    // Set the time for the alarm here as a 6 digit integer
    long wakeUp = 182000;

    if (theTime >= wakeUp) {
      // servo rotates right to trigger the blanket pulling mechanism
      Serial.println("Wake Up!!");
      lcd.setCursor(0, 0);
      lcd.print("Wake Up!!");
      // sound the buzzer as an alarm
      digitalWrite(2, HIGH);

    else if (theTime < wakeUp) {
      // servo rotates left to reset the pulling mechanism
      lcd.setCursor(0, 0);
      digitalWrite(2, LOW);

  // our clock updates its time from the server every ten seconds +- 2 secsonds
  delay(10000); // wait ten seconds before asking for the time again
// send an NTP request to the time server at the given address
unsigned long sendNTPpacket(char* address) {
  // set all bytes in the buffer to 0
  memset(packetBuffer, 0, NTP_PACKET_SIZE);
  // Initialize values needed to form NTP request
  // (see URL above for details on the packets)
  packetBuffer[0] = 0b11100011;   // LI, Version, Mode
  packetBuffer[1] = 0;     // Stratum, or type of clock
  packetBuffer[2] = 6;     // Polling Interval
  packetBuffer[3] = 0xEC;  // Peer Clock Precision
  // 8 bytes of zero for Root Delay & Root Dispersion
  packetBuffer[12]  = 49;
  packetBuffer[13]  = 0x4E;
  packetBuffer[14]  = 49;
  packetBuffer[15]  = 52;

  // all NTP fields have been given values, now
  // you can send a packet requesting a timestamp:
  Udp.beginPacket(address, 123); //NTP requests are to port 123
  Udp.write(packetBuffer, NTP_PACKET_SIZE);

Built With

  • arduino
  • buzzer
  • ethernet
  • lcd
  • servo-motor
Share this project: