Panic button (not only for) the elderly & mobile phone hack - Page 1
Forum section: electronics / projects

author: Alex
author_rank: Regular Contributor
timestamp: October 12, 2013, 10:12:51 pm
content: Hi all,I am putting this project out there openly - if anyone decides to build something similar that would be fantastic.In summary it is an emergency button for the elderly and part of it is a mobile phone 'hack' that might be useful elsewhere.The final build:You can find a link to a gallery with all the pictures from the projectherePlease excuse the bizarre formatting, it is copy-pasted from an email.MotivationThe motivation for this project came from my grandpa, who suffers from poor lung capacity.Sometimes he will get short of breath during the night, wake up and stay awake due to anxiety.SolutionI decided to do something about it and came up with a ‘panic button’. The device, placed next to the bed, has a few special features. Once the panic button is pressed, a bright light illuminates the room. The light has an immediate positive effect on the psychology of a person in need, especially my grandpa who likes to sleep with all lights off. Additionally, it allows him to reach for something or turn on the room’s lights. At the same time a siren goes off. The siren is used as his condition means that he might not be able to shout for help. Finally, if the device is not deactivated within 20 seconds, a call is automatically made to a relative for further assistance.Usage of the deviceThe device is purposely made to be very easy to use. An oversized red button at the top sets off everything. Due to its size it is very difficult to miss even in total darkness. On the side of the device is a green button that stops and resets the system. The button is on the side so it is difficult to press unintentionally. This button is illuminated if the device is activated, thereby giving a clue to someone unaware of the user interface as to how to turn it off. Finally, a small switch is used to selectively deactivate the siren and emergency call functions, effectively turning the device into an emergency flash light.The device is battery powered so it will also work during a power outage. Due to zero power consumption in standby, a fresh set of alkaline batteries will last for many years making this a ‘set and forget’ solution.Circuit and construction detailsThe internal workings of the device are straightforward. Four 1.5V C-size alkaline cells are connected in series. A small SPDT relay (not visible) salvaged from a security light sensor is wired as a Set-Reset flip-flop, with the red button acting as the Set and the green button as the Reset. When the flip-flop is ‘Set’ the relay coil is energised, therefore everything is powered off the relay coil. The light housing came from a motorbike reversing light and houses a 6V, 3W lightbulb from a flashlight. The siren is a 12V model off ebay, equally loud at 6V. The green button is from an industrial control panel and the red button from CoolComponents in the UK or Sparkfun in the US. The enclosure is ABS plastic, also from ebay.Details on the mobile phone hackFor the emergency call functionality I decided to use an old Nokia 7250 and a ‘pay as you go’ SIM card. This is an excellent way of recycling the pile of old phones. Unfortunately the venerable 3310 was too thick to fit.It is well known that mobile phones communicate with their batteries, so the first challenge was to power the phone externally. Using the charging connector still requires the original battery and simply applying power does not work. In this case I reverse-engineered the battery supervisor circuit to isolate a battery presence resistor and a thermistor. Connecting these two components directly to the phone allowed me to trick the phone into thinking an original battery is installed.The second challenge was to talk to the phone. The official solution is to purchase a serial cable and communicate to the phone using AT commands. This would require a microcontroller and serial communication firmware. A simpler, brute-force solution is to use the keypad directly. For this I removed the membrane keypad to expose the contact pads of all buttons. I was planning to tap into all the numbers used by the phone number of a relative, until a friend pointed out speed-dial! I stored the phone number in position ‘2’ and then I only had to use the ‘No’, ‘Yes’ and number ‘2’ contacts. I disabled the locking and screen-saver functions of the phone. Unfortunately the keyboard is multiplexed and scanned, so using a microcontroller directly was not possible. Small relays can be used, but I used a DG444 quad analogue switch I had laying around. The DG444 is controlled by a PIC12F509 programmed in Assembly under MPLABX. The firmware is 39 instructions long and emulates a person switching on the phone and speed-dialing the emergency number. To switch on the phone I tapped into the on/off switch at the top. Luckily one of the contacts was ground, so I was able to connect that to the MCU directly and alternate the pin between ‘logic low’ and ‘high impedance’. Power to the MCU and analogue switch is not regulated, but a diode was used to reduce the 6V from the battery to 5-5.2 that these devices can handle.The keypad LEDs of the phone were desoldered to save 80mA. When everything is energised, the device consumes about 800mA, good for approximately 2 hours of continuous operation (@ 4Ah capacity, 1V cut-off). The dates to replace the batteries and to top-up the SIM card are written on a sticker at the bottom of the device, along with the calling number. The PUK codes for the SIM card are inside the device.Alex.

author: Rerouter
author_rank: Super Contributor
timestamp: October 12, 2013, 10:18:52 pm
content: interesting design, its a lot to take in so others may hold there comments, but i just wanted to say awesome tool crafted out of necessity

author: amyk
author_rank: Super Contributor
timestamp: October 12, 2013, 10:28:58 pm
content: If you don't have any old phones lying around, they also sell standalone GSM modems:http://www.ebay.com/itm/SIM900-SIMCOM-Quad-band-GSM-GPRS-Module-/180794206513(Rather overpriced asyou can buy a complete phone for less...)

author: amyk
author_rank: Super Contributor
timestamp: October 14, 2013, 10:58:20 am
content: Quote from: mojo-chan on October 14, 2013, 10:43:02 amI understand the use case, but does anyone find this just a little creepy...?

author: nctnico
author_rank: Super Contributor
timestamp: October 14, 2013, 11:05:03 am
content: I'm not quite sure a panic button like this is useful. The biggest problem for old people is falling and being unable to move. One of my grandmothers spend half a day lying next to her bed with a dislocated shoulder. In other words: the panic button must be wearable. Most commercial solutions have a button as a pendant and a receiver to forward the alarm. Some buttons also have an accellerometer to detect when somebody is falling.There are many 433MHz receiver/transmitter kits on Ebay.

author: BillyD
author_rank: Regular Contributor
timestamp: October 14, 2013, 11:57:05 am
content: Quote from: mojo-chan on October 14, 2013, 10:43:02 amAnother system which I believe is in common use in sheltered accomodation in this country is to monitor toilet flushes, whereby an alarm is raised if there is too long an elapsed period between flushes. There are also various neighbourhood monitoring schemes in operation here where the person wears a little panic button pendant around their neck for the reason mentioned by another poster.This project sounds like quite a good creation, the only suggestion I'd add is that I'd always be nervous of it failing silently due to dead batteries, broken wire, etc although I see he has tried to mitigate that by posting battery expiration dates etc on the casing. So it would be nice to have some sort of Test or 'Transmit-all-is-well' button which could be used to test it periodically, similar to what you'd see in an Epirb or fire alarm system. Though this naturally would push up the cost and complexity.

author: Alex
author_rank: Regular Contributor
timestamp: October 14, 2013, 01:56:52 pm
content: Probably the first product revision would be to add a "chilli dinner night out" button to that toilet flush monitor.I am aware of a few of the examples of similar devices mentioned, and a couple currently in development in Universities. But why aren't similar schemes/devices more widespread? Is it just a matter of public awareness?As far as my old folks are concerned, they are more concerned about being forgotten. When I handed over this project to the 'customer', he didn't say thank you for making a panic button; heck, I doubt he understood a word I said about its operation. Instead he said thank you for caring about me. Although more research is needed, I wouldn't feel too uncomfortable generalising this to the elderly. So we can't neglect what they think/feel and only be concerned about their physical integrity.Commercialisation and market penetration are great powers, but maybe unsuitable. I strongly believe personalised devices are needed. A small 'for profit' company could not realistically develop the dozens of different designs to a 'commercial medical product level', they would have to cherry-pick. But even if they did, the price tolerance in the medical market is stupendous which can only mean an expensive product, even more so for personalised devices. However, the playing field changes if such devices (a few mentioned) start being integrated to mass consumer electronics. Then a commercial entity is the only way. In any case it would not be as thoughtful of a gift as making it on your own and being recognised for it.Instead we can use our skills to make such devices, one at a time. How many engineers and technicians are out there? How many more can be added to this number due to the hacker/maker/diyer movement? Use the scrap components in your bin, the facilities in your lab or your hackerspace and build a custom device. Use this as an excuse to ask for money for better tools. The elderly is only one piece of the pie; kids, pets, personal protection...enormous possibilities!I did some of the mechanical construction for this project in a local workshop/hackerspace and the huge red button attracted some attention. One person in particular told the story of his mother that could have been saved by a similar device. One could tell from the look on his face that he would have given anything to have such a device a few months ago.Sorry to hear about your grandma ntcnico, hopefully you can build something for her so that this wont happen again!Alex.

author: fluxcapacitor
author_rank: Frequent Contributor
timestamp: October 14, 2013, 02:53:32 pm
content: Its a nice project,well done. For UK residents you can get alarms and telecare through the NHS ( UK ONLY ) ,some for free,some for a small fee. My grandma had a panic button a few years ago,it went around her neck,if she fell she could press it and it would call someone ,im not sure if it rang the emergency services or alerted a relative ? .http://www.nhs.uk/CarersDirect/guide/practicalsupport/Pages/Othersupport.aspxSee alarms and telecare.