SOS Alert Call Box

SOS Alert Call Box

February 14, 2023

SOS Alert Call Box

I recently had an older family member who lived alone fall and they couldn’t get up.  They were only discovered when my father tried to call them and couldn’t get them to answer the phone.  Well my dad is getting up there in age and also lives alone… so this really got me worried.  Plus…  He’s not very tech savvy (couldn’t figure out an iPhone or even texting) and I know he hates to call me because he thinks he’s bothering me.  So I thought I would try to make a DIY Just In Case SOS Alert system that he could just press a button to automatically send me a text to get “my” help during an emergency…  or at the very least a basic call box he can use to get me to call him if he needs something.

I have a bunch of unused Raspberry Pi’s laying around which seemed like a good base for this kind of project.  I also found a simple 433Mhz RF Wireless Relay Remote Control Relay on Amazon that would work as the “Emergency Button”.  Combine these with a few other switches, LED’s, power supply, and a voltage converter and I think I can make a simple system that will do both things I want.  While this will not be a “True” life alert system I figure it’s better than nothing and just a little peace of mind when I can’t stop and visit him.

The first thing I did was wire up some LED’s for a power indicator and a visual aid that the system is sending a message.  To do this I start by adding a few 330 ohm resistors to some LED’s I had on hand.

I use the 3.3 volt output of my ATX Bench Top Power Supply to test out the LED’s to make sure I wired them correctly.

Once I had both LED’s wired and tested I covered the resistor and other leg with some heat shrink tubing.

I then used a Crimping Tool to add some Dupont connectors to the other end of the wires.

These make it easy to wire everything to the Pi.

Here are the two LED’s wired and ready to go.  I used one shared ground for theses.

Next…  I did the same thing for the switches. (only one shown)

Then it was time to connect everything to the Pi’s GPIO pin’s.

Future Notes to me =

  • The Send Button = GPIO 21
  • Emergency Button = GPIO 20 X
  • Shutdown Button = GPIO 2
  • Sending LED = GPIO 17
  • Power LED = 3.3V (Pin 1)
  • Black Wires = Any Grounds

X = Not Shown yet.

Next it was time to design a housing for all of the parts. I was able to recycle the design of the enclosure from my Soil Tester because it already fit a full sized Pi.  (I thought about trying to use a Pi Zero W but wasn’t sure if I would need to used this wired as my dads WiFi is spotty.

Luckily I found design files online for the Pi and LM2596 Buck Converter so I just had to mock up the Wireless Relay to see if they would all fit in the box.

After the quick changes to the soil tester enclosure design I 3D printed out the new design for the SOS box.

The safe shutdown button was then just force tapped into the side of the enclosure.

The Pi was then mounted to the box with a few 2-56 screws.  Before I go any further I think it’s time to figure out the code.


The Code

This is the code I am using… Keep in mind I have no idea what I’m doing most of the time so a lot of it was recycled from my Pet Feeder project but I changed the way the emails are sent to use a G-mail account because my Xfinity email account was having issues sending the text/email to my phone.  Also to keep things simple it just sends a basic subject line message with no message body.  There are two different messages that can be sent depending on the button used.  The button on the box will just send a basic “Give Dad a call when you get a chance” message and if the remote fob button is press it sends an “Emergency” message.  Let’s hope this one never has to be used.  With the code figured out it was time to get back to the actual build.

This is the 12v wall wart I will be using to power everything in the box.

A quick test and it’s putting out 17 volts.  (I checked another 12v wart and it was putting out 16V too so this must be the norm?)

I forgot to add the power cord hole in the design so I just drilled it out and added a grommet before inserting the wires into the box.

The wires from the supply will connect to the buck converter and I added another pair to jump the 12v power over to the remote receiver unit.

Because of the thicker double wires I had to drill out the connection points a bit on the converter.

Here the wires have been soldered onto the boards input side…

… and another pair of wires is then attached to the output side to power the Pi.

Next using a multimeter on the output wires the 5.1 voltage required by the Pi is set by turning the adjustment screw on the converter.  (You have to turn this screw a surprising amount of turns to get it to adjust.)

A quick check of the other wires shows it’s still putting out 16v.

Testing out the Receiver to make sure 16v isn’t to much.  Everything seems fine so far.

Next the converter is secured into the box.

Then I made up a few more jumpers for the receiver.  (Black to Com, Orange to NO (normally open).

The 12V power is then wired to the Receiver.

After putting the Receiver in the Box…  the orange wire is connected to GIPO 20 and the Black to a ground.

The 5V power from the Converter is then wired to the Pi using a 5V pin and another ground.  (Get these backwards and you might let out the magic smoke as this by passes the boards power fuse.)

At this point it was ready to test and so far everything is working correctly.

Next it was time to print the cover.  (The square block just holds the receiver in place.)

I added a piece of window screen over the vents just so nothing could get dropped inside.

The labels were printed separately and then glued in place.  I was going to print them in different colors and then do color changes for the text but I decided it was easier just to print them in white PLA, paint them, and then sand off the paint (back to white) for the text.

The cover is held in place with a single 4-40 screw. Here you can see the hole for the antenna but I’m going to see if it even needs to stick out of the box first.  Initial range testing in my house was pretty good even a floor down.

To finish it off I added some rubber feet to the bottom of it.

It’s pretty much done at this point but I’m going to go back and clean up/shorten some of the wiring and maybe share a few more of the grounds (especially from the cover wires) just so everything fits in the box nice and neat.

These are what the FOB’s look like. The receiver came with 2 so I’m using one on a lanyward that can be worn and the other will probably be a spare.

They are not crazy big which is nice.

Here is the final project (minus some programing tweaks maybe) ready for testing.


4/21/23 – Updates

I was having trouble with the reliability of the RPi functioning correctly and after noticing the little lightning bolt on screen I decided to try a better power supply as I don’t think the other one was putting out the 2.4 amps it was rated at. I found this Chanzon 12V 3A UL Listed power supply on Amazon so I thought I’d see if this fixes the problem.

I didn’t want to cut the plug off it so I just drilled a hole in the case to fit the DC power connector that came with it.  This actually made jumping the wires to the two different boards much easier too.

The connector sticks out a bit from the case but this made it easy to use a piece of safety wire in one of the grooves to secure it in place.


Updated Code:

def reboot(t):
    print("Rebooting in 20 Sec!")
    time.sleep(20)
    import subprocess
    subprocess.call(["sudo", "shutdown", "-r", "now"])

    # start system reboot at time (11:50pm) 24 hour format
    schedule.every().day.at("23:50").do(reboot,'Reboot Complete.')

I also added this bit of code to make the RPi reboot itself every night too.  Hopefully these changes will fix the reliability problems.


While this probably needed a better power supply anyway it turns out the problem was more of a WiFi issue… The box was too far from the router so I moved the box and just ended up plugging it in with a ethernet cable and it’s been working fine ever since.


All Information, Pictures, and Material is copyright © 2023 by Stephen Thone and may not be used for any personal or commercial purposes without the consent of the author. All rights reserved. The Author makes no guarantees or warranties as to the accuracy or completeness of, or results to be obtained from accessing and using the Information herein.

Leave a Reply

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