How to build a Sleepwalking Monitor/ Pager /Alarm for your home

Ok, the problem we are solving today is “sleepwalking”. The real term for sleepwalking is “somnambulism”, and it causes 620,000 injuries per year. This project aims to reduce the number of injuries, by notifying another person in the home if you’ve:

  1. Left your bed (bed exit).
  2. Opened a window.
  3. Opened a door.

This will allow the other person to wake up and get you back to a place of safety. It won’t ever wake up the sleepwalker themselves, which also prevents harm. We will do this all through the use of some clever electronics, which I will teach you how to make here for less than £5. Fear not, this project can be attempted by novices and beginners with fantastic success. Note, you can also use this product in other applications, such as with the elderly who’s movements need to be monitored during the day and night.

Sleepwalking pagers/alarms on the market at the moment can cost upwards of £200. So if this product helps you, please remember to hit the “Buy me a coffee link” and donate some money to keeping this website running! Thank you.

Let’s dive get to it…

The device we will make here today is a “pager” type device. Sensors can be dotted around the home (i.e on doors and windows) and whenever one is triggered, the caregivers receiver will beep and let you know exactly which window or door has been opened. We will also use a movement sensor which detects as soon as the sleepwalkers feet hit the ground (by putting the sensor by the bottom of the bed, near the headrest).

So like baking a cake, you need ingredients. Here are the components you will need to build this product as follows:

  1. PIC16F628-04/P (note it has to be the 04 model) microcontroller.
  2. HC-12 Wireless Modules. Get one per window, door and bed sensor as needed.
  3. LM7805 voltage regulator.
  4. 0.1uF ceramic capacitors, 470ohm resistors, 4.7k ohm resistors, 10k ohm resistors. 2 or 3 of these per sensor and pager. Switches.
  5. A PIC microcontroller programmer (we use the Pickit2 in this tutorial).
  6. Hitachi HD44780 LCD controller
  7. Battery holder
  8. 3 x AA batteries.

Now, all you need to do is solder the components onto the printed circuit boards that needs fabricating. You can print and etch the pcb’s yourself using acid, or get someone to make it for you (there are plenty of vendors online). Simply print and etch this pcb file, drill the holes and solder on the components according to this schematic.

Then all you have to do is upload the following code to the sensor board PIC16F628’s and pager chip and it’s ready to go.

Now simply place the devices on the windows, doors and foot of bed. Then place the pager in the caregivers room, and you have yourself a £10 sleepwalking monitor!

Don’t forget to “buy me a coffee”.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Buy me a coffee .button { display: inline-block; text-align: center; vertical-align: middle; padding: 12px 24px; border: 1px solid #4b6037; border-radius: 8px; background: #7a9c5a; background: -webkit-gradient(linear, left top, left bottom, from(#7a9c5a), to(#4b6037)); background: -moz-linear-gradient(top, #7a9c5a, #4b6037); background: linear-gradient(to bottom, #7a9c5a, #4b6037); -webkit-box-shadow: #719053 0px 0px 40px 0px; -moz-box-shadow: #719053 0px 0px 40px 0px; box-shadow: #719053 0px 0px 40px 0px; text-shadow: #2f3c23 1px 1px 1px; font: normal normal bold 20px arial; color: #ffffff; text-decoration: none; } .button:hover, .button:focus { border: 1px solid ##5e7845; background: #92bb6c; background: -webkit-gradient(linear, left top, left bottom, from(#92bb6c), to(#5a7342)); background: -moz-linear-gradient(top, #92bb6c, #5a7342); background: linear-gradient(to bottom, #92bb6c, #5a7342); color: #ffffff; text-decoration: none; } .button:active { background: #4b6037; background: -webkit-gradient(linear, left top, left bottom, from(#4b6037), to(#4b6037)); background: -moz-linear-gradient(top, #4b6037, #4b6037); background: linear-gradient(to bottom, #4b6037, #4b6037); } .button:before{ content: "\0000a0"; display: inline-block; height: 24px; width: 24px; line-height: 24px; margin: 0 4px -6px -4px; position: relative; top: 0px; left: 0px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEyUlEQVRIia2VWWxUVRjHf3eZdtpO22mBllLoxmJlqYQoYGgCQRQTECsEeYFEARMNlAhqDMENH/TBGE0gMUaECIlRHwgoS9WoUJo2NlBDF1onZeje6Uw7nX3mTu/c48O9YG3ApAlf8uXmnnvO//8t/3M/hWlazQIKquew6tFcZsgpYiMaieli/K9dfb3wlBi+JoT7oghc/VhrO/78tR92pO8usmN/KAS/HJjzvYgOCBHuFyIyIETMI8RQvXCfeKHz8/VUT90vT5tBGJAMgBaExDjEfJDmpHzrR5V73//gtzPbM3dP3q5On0CAFoKUAYi7iwBkLdyQtm2/8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8xw0DLwW/b15oAfH6DY6qPL6wK3jefMyr/mjxGrXUPtkMesK/TiUZrDZQVFNBaNDJIlxw8+tr69z7Kc2vgNCTLJ7A2cwTvtIgK1/RWnfd449PaNcB4z9Z2nItrP4uaVsWFnCE7McFNgU1HCSgMuH63wbf3QN0wiMcvdndj/bUsXqT2v4JjOdigduMovjAHKATKY5EWXMNj5U+wcb0TIr9nRDzwAAAABJRU5ErkJggg==") no-repeat left center transparent; background-size: 100% 100%; }