Propeller Powered Panic Buttons

Duane DegnDuane Degn Posts: 9,079
edited August 2011 in Propeller 1 Vote Up0Vote Down
I've dropped all my other Propeller projects until I get this new one up and running.

I think I know how to do what I want but I'm hoping some of you will see a better way of solving this problem.

I'm hoping to order all the parts I need today. My goal it to have this project finished and shipped within a week from today.

Here's the problem:

My in-laws are old. They both use walkers. They still live at home and would like to continue to do so. There children (they have eight) take turns visiting them and regularly stay the night with them to help with basic needs.

Their children sleep in a room a relatively long way from my in-laws' bedroom. My one sister in-law left walkie-talkies with them so they could use them to call their guest in a time of need. The walkie-talkies are too complicated for my in-laws (too many buttons to choose from).

My plan is to make panic buttons that can be in all the rooms they normally use. I also plan to purchase several of these FOBs. I recently wrote an object for the Propeller for these Nordic modules based on Leon's C code.

I'm hoping both in-laws will wear the FOBs (necklace style). I'm pretty sure they wont always have the FOBs with them so I also want to use Panic Buttons. I plan to have Nordic modules in each panic button.

I'm not quite sure of the buttons I'll use. Here's my short list.

http://www.sparkfun.com/products/9336 I like the red but these are longer than I'd prefer.

http://www.sparkfun.com/products/9178 I'd use a blue for his side of the bed. . .
http://www.sparkfun.com/products/9177 and a pink for her side.

http://www.sparkfun.com/products/9181 Because they're cool and I haven't needed them for any other project. I also think it looks more impressive than the other button so it might be more comforting (because surely something important will happen by pressing that button).

I plan to have a button on top of some sort of enclosure, with LEDs to indicate the status (green for ready, red flashing for pressed, and maybe flashing red and green to indicate someone is on their way). I think I also want to include a small button or switch to reset the system (the reset should propagate wirelessly to all devices).

I'll have a Propeller board and a Nordic transceiver in each device.

There are probably less expensive uC that could do this but I only know how to program the Prop. I don't want to take time to learn to use a different uC. The FOBs use an ATtiny24, but it come preprogrammed.

In the guest room I'll want a master receiving unit (MRU so I don't have to keep typing it). The MRU would be able to reset the system. It will have a piezo buzzer to wake up anyone sleeping. I'll use LEDs to indicate which button was pressed with a label indicating its location. An probably a button to indicate they've seen the alarm and are on their way.

I ordered a bunch of cheap Nordic modules from ebay but they haven't arrived yet. I'll probably order a bunch of the SparkFun modules (I've used these before).

As I write this, I've had the thought that all panic buttons should have some indicator of which of the buttons had been pressed. This way if the guest isn't in the guest-room they will still know where to look for the activated button (and their parent in need of help).

I might also want a piezo in each button. I don't think I'd want the alarm to be loud or to continue very long. I don't want it to add to the fallen person's stress. Maybe a mild chirp to let them know the button press registered an is still working.

I'm not sure what to use as an enclosure for the buttons. This is a picture of a button enclosure I made for another project.

attachment.php?attachmentid=82783&d=1310143018

I might use an even wider end cap so it will be nice an stable.

I'm hoping to order parts in about an hour but I'll be working on this for the next week.

I'd really like to hear any idea you all may have.

I would even consider a premade system if it did all I need and want it to.

Duane
382 x 463 - 355K
Tagged:
«1

Comments

  • 60 Comments sorted by Date Added Votes
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Reserved for stuff I forgot to say in the first post.
    Edit: (7/9/11)I'll use this post for final project pictures and code.
  • kwinnkwinn Posts: 5,981
    edited July 2011 Vote Up0Vote Down
    I would suggest PVC pipe and caps or a low height square plastic box for an enclosure and replacing the 12V bulb in the dome button with a led so the prop can drive it directly.

    PS - An accelerometer chip or some other tip indicator in case they knock the button over when trying to press it might be good.
    In science there is no authority. There is only experiment.
  • Ron CzapalaRon Czapala Posts: 2,159
    edited July 2011 Vote Up0Vote Down
    I thought about doing something similar - to either interface with my home alarm system, phone dialer or a WiFi module. The Transceiver nRF24L01+ Module with RP-SMA with an external antenna looks like a good module to use for base unit.

    How are you planning to communicate with relatives/friends when the units are triggered?


  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    I ordered a bunch of stuff from SparkFun.

    I'm seriously considering using a cap for 4" PVC pipe as an enclosure.

    I initially thought I'd cut a round piece of plastic for the bottom of the cap but now I'm leaning toward not using anything on the bottom. I'd just make sure everything is well attached to the inside of the cap.

    I think I'll use QuickStart boards as the controller inside each button enclosure. It's hard to beat the price of a QuickStart board for adding a Propeller to a project quickly. Besides, I already have a bunch or QS boards.

    I've been giving the LEDs a bit more thought. I'll probably want to dim the LEDs when a room is dark. I don't what the buttons to be annoying and have them move out of sight. I think I have enough light sensors to use one in each button (I'm planning on six buttons, one control base, and two FOBs).

    I know I've read about using an LED as a light sensor. I'll need to see if I can get a LED to reliably sense the brightness of a room.

    I'm still undecided about how and where to mount LEDs on the enclosure.

    One of the possibilities I've considered is cutting a round piece of sheet acrylic to mount as a ring around the button. I wondered if I beveled and sanded the edges maybe I could produce a ring of light with the LEDs shining up into the acrylic. It would be nice if these buttons weren't an eye sore.

    I do think I want some way of indicating on each button, which button was pressed. My in-laws don't live in a big house but it would be nice if the guest didn't have to search through the house.

    I ordered a bunch of different colors of buttons. I thought I could have a LED that matches the color of each of the buttons on each button enclosure. When any button is pressed the corresponding LED would light on all buttons. The appropriate LED could flash if the transceiver of one of the buttons isn't responding.

    I ordered several lengths of light pipe. I ordered both white core and clear core. I thought it could be useful in making the LEDs easier to see from more angles. I don't have a good idea in my mind of how I would use light pipe.

    One of the problems with this system I can't figure out is a way of helping a person who has fallen. If they don't have their FOB with them and they are on the floor of a room, the panic button isn't going to do much good sitting on the counter. Maybe some sort of sound detection would help? A laser scanner the floor area looking for a larger than normal object?

    Back to the pipe cap enclosure. There are a lot of raised symbols and lettering on the cap as you can see from the picture below.

    attachment.php?attachmentid=82795&d=1310152683

    I was just talking with my wife about my concern her parents couldn't reach the buttons if they had fallen to the floor. She told be of panic buttons in a retirement home that had strings running to the floor that could be pulled. Maybe I could use some sort of string with the panic buttons (probably easier than having laser scan the floor).

    Any of you have experience with acrylic rings or light? I also have some transparent red acrylic I could use with the buttons.

    I just saw this thread has two replies (that aren't by me). I'll respond to them in a separate post.
    @Kwinn, I saw yours just as I was pasting in the photo of the PVC cap.

    Duane
    459 x 452 - 390K
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    kwinn wrote: »
    I would suggest PVC pipe and caps or a low height square plastic box for an enclosure and replacing the 12V bulb in the dome button with a led so the prop can drive it directly.

    I like the PVC pipe caps because they are round and low and cheap. I'll probably use a low height box for the base station.

    I like your idea of using a different bulb than the 12V one. Thanks, I'll probably do that.
    kwinn wrote: »
    PS - An accelerometer chip or some other tip indicator in case they knock the button over when trying to press it might be good.
    kwinn wrote: »

    Yes, I like this idea too. I didn't order any accelerometers but I've got have at least three already. Maybe I'll use them in the buttons where that feature would the most useful.

    I suppose I could make some sort of tilt detector with a BB and some metal plates or tubes. I don't want the buttons to go off too easily. My in-laws should be able to move the buttons around on the counter without causing a false alarm.

    Thanks for the ideas.

    Duane
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,080
    edited July 2011 Vote Up0Vote Down
    @Duane

    Thinking here about failure..

    How about making your link "check-in" every so often to insure that communication is solid, with some sort of alarm that triggers if the buttons are failing to talk to the Propeller. The last thing you want to something to fail when it's needed most.

    OBC
    <br>
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    I thought about doing something similar - to either interface with my home alarm system, phone dialer or a WiFi module. TheTransceiver nRF24L01+ Module with RP-SMA with an external antenna looks like a good module to use for base unit.
    I already have two of those exact modules. I just ordered four more of them (and antennas). I also ordered four modules with chip antennas and four of the key FOB modules (I wanted a couple for myself).

    I've used the Nordic modules before and I'll be glad to have some extra ones.
    How are you planning to communicate with relatives/friends when the units are triggered?

    For now, these are just to alert whoever is staying the night in their guest-room. I plan to use flashing LEDs and a piezo alarm.

    It would be great if I could have the system automatically call through a list of numbers and give a recorded message. I don't know how to do that (yet). I will want a similar feature (automatic phone calls or text messages) for our home alarm system so I plan on learning how do this. I'll probably add such a feature once I've learned how. For now just letting their guest know there is a problem will be very helpful.

    Thank you for your reply.

    Duane
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    @Duane

    Thinking here about failure..

    How about making your link "check-in" every so often to insure that communication is solid, with some sort of alarm that triggers if the buttons are failing to talk to the Propeller. The last thing you want to something to fail when it's needed most.

    OBC

    I think this would be a very important feature. The Nordic modules can both transmit and receive so they should be able to "check-in" just fine. I'll need to figure how to do this. I'm pretty sure I can figure something out.

    I think I will want all the units to be able to identify a unit that isn't communicating by lighting up the appropriate LED. This is my current plan:
    Duane Degn wrote: »
    I ordered a bunch of different colors of buttons. I thought I could have a LED that matches the color of each of the buttons on each button enclosure. When any button is pressed the corresponding LED would light on all buttons. The appropriate LED could flash if the transceiver of one of the buttons isn't responding.

    Each unit would be identified by the color of its button and there will be LEDs of all the button color on each unit. This way I'm hoping to identify a problem early since all the units will have these indicator LEDs and the problem unit will be identified by its assigned color (which is also the color of the physical button).

    I'll need to figure out an intuitive signal for a pressed button verses a button that isn't "checking in". Maybe the LED should flash to represent a pressed button and have the LED on solid to indicate a non-communicative unit. (I just realized this is opposite of how I have it in the above quote.)

    I been thinking, as I write this, I think I might use a RGB LED instead of having an LED of each color on each unit. This should make the hardware side of things a bit easier.

    Assuming I use a RGB LED in all he units and the transceiver in the unit with a blue button isn't responding to inquiries (not "checking in") then all the other units' LED would light (probably solid) blue.

    These are just the kind of things I'm hoping to get help with here.

    Thank you.

    Duane
  • Ron CzapalaRon Czapala Posts: 2,159
    edited July 2011 Vote Up0Vote Down
    Duane Degn wrote: »
    It would be great if I could have the system automatically call through a list of numbers and give a recorded message.

    This is the dialer I am using on my home security system. You can record your own messages and it can dial multiple numbers.

    http://www.homesecuritystore.com/p-216-ad2001-usp-voice-dialer-2-channels-4-numbers.aspx

    AD2001 dialer.jpg
    300 x 240 - 14K


  • GranzGranz Posts: 179
    edited July 2011 Vote Up0Vote Down
    Duane,

    For the button and it's enclosure, consider the Easy button (http://www.staples.com/Staples-Easy-Button/product_606396) - they are easily available and pretty decent cost. I like the shape and size, and the color (red) is the "emergency" color. With the large, rounded button, they can be pressed from steep angles, like when you in-laws have fallen and can not reach to the top of the button assembly. I've seen in Instructables (http://www.instructables.com/pages/search/search.jsp?cx=partner-pub-1783560022203827%3Anpr2q7v5m6t&cof=FORID%3A11&ie=ISO-8859-1&q=easy+button) where you can hack them and make them do what you want. You could probably add in your Nordic module or maybe an X-Bee card.

    Looks like a great project.
    Art G. Granzeier III, President
    Granzeier Consulting
    www.granzeier.com

    Helping to Build a Better Engineer
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    This is the dialer I am using on my home security system. You can record your own messages and it can dial multiple numbers.

    http://www.homesecuritystore.com/p-216-ad2001-usp-voice-dialer-2-channels-4-numbers.aspx

    AD2001 dialer.jpg

    That would make it easy to call relatives.

    I wonder why the callers seem to have such limited memory?

    I'd think it would be easy to store several hundred phone numbers, not just four. I'd want a dialer to call at least 16 numbers (for this particular application).

    I ought to hurry up and figure out how to do this with the Propeller.

    Thanks for the information and the idea.

    Duane
  • kwinnkwinn Posts: 5,981
    edited July 2011 Vote Up0Vote Down
    My wife and I owned and ran a small seniors residence for a number of years so I am quite familiar with the problems involved. There are no perfect solutions, and there will always be false alarms and situations where no alarm occurs. The best you can hope for is to minimize the problems and risks. Here are my somewhat random thoughts. Hope they help.

    Using PVC end caps makes for an inexpensive rugged enclosure with enough room for a small speaker. The lettering and symbols can be sanded off, and you could use MacTac shelf liner to cover the open end to keep dirt and moisture out.

    A small hole drilled in the side of the cap for mounting a phototransistor to dim the led at night. There are or were phototransistors in a package similar to leds, but a TO92 package is not hard to mount.

    A high efficiency red led in the big dome push button should be enough to make it visible at night, and it can flash at high intensity when the button is pressed.

    The string idea along with the tilt sensor would be good for someone who has fallen provided they can reach it and it does not create a tripping hazard.

    A noise or vibration sensor might detect falls but sensitivity is a problem. Too sensitive and you get false triggering, too low and a fall may not be detected.

    Use a sensor mat or load sensor on the bed to detect when someone gets out of bed. This is when a lot of falls occur.

    While a propeller might seem like overkill for this application it does have some advantages. It can control and drive the leds, connect to the phototransistor to sense the ambient light level, drive a small speaker, and send data via the Nordic module with little or no additional hardware.
    In science there is no authority. There is only experiment.
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Granz wrote: »
    Duane,

    For the button and it's enclosure, consider the Easy button (http://www.staples.com/Staples-Easy-Button/product_606396) - they are easily available and pretty decent cost. I like the shape and size, and the color (red) is the "emergency" color. With the large, rounded button, they can be pressed from steep angles, like when you in-laws have fallen and can not reach to the top of the button assembly. I've seen in Instructables (http://www.instructables.com/pages/search/search.jsp?cx=partner-pub-1783560022203827%3Anpr2q7v5m6t&cof=FORID%3A11&ie=ISO-8859-1&q=easy+button) where you can hack them and make them do what you want. You could probably add in your Nordic module or maybe an X-Bee card.

    Looks like a great project.

    Okay, This is going to take a while.

    When I first started using microcontrollers about three years ago, I soon learned about the Propeller chip. After trying the Propeller I decided it was the uC for me.

    I initially wanted to learn to use the Propeller to use with the RC aircraft I use for aerial photography. Once I started to learn what the Propeller could do I realized it would make my day job of testing agricultural samples easier.

    I rigged up my first data logger with a Propeller ProtoBoard. I connected serial output of several balances and a spectrometer to the ProtoBoard. I added barcodes to my vials and had the Prop record information from a barcode reader. We no longer had to write down long lists of numbers into a notebook and then carefully type those numbers into the computer. Now I can just take the SD card out of the data logger and the copy the file or files of information onto the computer. It was huge time saver. When we were done gathering data we used a button to tell the logger it should close the current file. I made the enclosure for the yellow button in my first post so this button would be easy to find and press.

    I had (and still have) not ever seen an "Easy Button" commercial (I don't watch a lot of TV). The teenage kid working for had seen an "Easy Button" commercial and explained the similarities with the button enclosure I had just made. The button represent the whole data logger which had transformed a hard job into and easy one. This revelation caused me to add the "Easy" label to the enclosure. I had also just added an Emic to the data logger so I added the phrase "That was easy" to be spoken with the button was pressed. My employee laughed out loud every time he pressed the button and heard "That was easy". I thought heck that's a cheap way of keeping an employee happy so it was fine with me.

    Having followed the link to a real "Easy Button" (my first time seeing a picture of one) I was pleased to see it does look like it would make a good "Panic Button.". I don't know if I can get a QuickStart board in there though. I might need a thin enclosure to go under the "Easy Button."

    Thank you for the link and the idea. I'll need to visit our local staples and purchase a couple to hack. The links you provided make it look very hackable.

    Duane
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    kwinn wrote: »
    My wife and I owned and ran a small seniors residence for a number of years so I am quite familiar with the problems involved. There are no perfect solutions, and there will always be false alarms and situations where no alarm occurs. The best you can hope for is to minimize the problems and risks. Here are my somewhat random thoughts. Hope they help.

    Thank you very much for sharing your ideas.

    One benefit I'm hoping these buttons will bring is to easy some of the stress my in-laws and their children feel. My wife just returned from spending several nights with her parents (hence the spike in my recent posting) and told me of her concern from hearing bumps and booms in the night. She was afraid her parents were trying to get here attention by banging on a wall. It turned out she was hearing fireworks (being set off several nights later than they should have been). She and her siblings tell of continually getting up in the night to try to listen down the hall to make sure all is well. For now there is good chance that both in-laws will be in the same room so if one falls the other could press a button to call for help (phones would be too complicated).

    I think these buttons will ease a lot of stress.
    kwinn wrote: »

    Using PVC end caps makes for an inexpensive rugged enclosure with enough room for a small speaker. The lettering and symbols can be sanded off, and you could use MacTac shelf liner to cover the open end to keep dirt and moisture out.

    A small hole drilled in the side of the cap for mounting a phototransistor to dim the led at night. There are or were phototransistors in a package similar to leds, but a TO92 package is not hard to mount.

    A high efficiency red led in the big dome push button should be enough to make it visible at night, and it can flash at high intensity when the button is pressed.

    The string idea along with the tilt sensor would be good for someone who has fallen provided they can reach it and it does not create a tripping hazard.

    A noise or vibration sensor might detect falls but sensitivity is a problem. Too sensitive and you get false triggering, too low and a fall may not be detected.

    More good ideas. Thank you.

    I had meant to add my plans of sanding off the lettering of PVC cap under the picture of the cap. My wife came into the room as I was uploading the picture and asked what I was doing. We got talking about pull strings for alarms and I forgot about sanding the caps. (My wife is also distractingly beautiful.) I do plan to sand the PVC cap with a belt sander.
    kwinn wrote: »

    Use a sensor mat or load sensor on the bed to detect when someone gets out of bed. This is when a lot of falls occur.

    Yes, this has been a problem for them.

    What kind of sensor mat? Where would is be placed? Next to the bed so it can sense when they get out of bed? Under the mattress? Under the bed posts?

    I have several square feet of anti-static foam. I know Phil has said there is a memory problem in that the foam does not return to its normal thickness with continued compressions. I still wonder if I use a square foot of this material under their mattress (one square per side) maybe it could be used to detect when they get up.

    I'd need some sort of algorithm to time their time up and if they don't return to bed after a certain about of time then an alarm could be raised.

    This is a very big concern. Most of the falls have happened when getting out of bed. Their legs don't obey their brains and they fall. I'd really like to hear any ideas you have concerning this.
    kwinn wrote: »
    While a propeller might seem like overkill for this application it does have some advantages. It can control and drive the leds, connect to the phototransistor to sense the ambient light level, drive a small speaker, and send data via the Nordic module with little or no additional hardware.

    The Propeller is an easy choice for me. It's the only microcontroller I know how to program now.

    Thank you again for all the help and good ideas.

    Duane
  • kwinnkwinn Posts: 5,981
    edited July 2011 Vote Up0Vote Down
    I considered several approaches to detecting when someone gets out of bed but sold the residence before taking a good look at any of them.

    The simplest would be an air bag or long hose (ala the old gas stations) under the mattress with a pressure sensor at one end. Not sure where to find something like that. Perhaps a pool matress?

    The second was a motion sensor (pir) where you limit the field of view to either above the bed to sense when they sit up, or around the bed for when they move away from it.

    Third was to put load sensors under the bed feet to detect a decrease in weight on the bed.

    Fourth was IRLED emitters and detectors on both sides of the bed.

    Final one was the sensor mat. I know they are available commercially because they were used around the robots to shut the system down if someone stepped on one. IIRC they were about 3' x 6'.

    Good luck with your project.
    In science there is no authority. There is only experiment.
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    @Kwinn, Thanks for the ideas.

    I probably don't have to worry too much about someone not being able to reach a button because of a fall. One of the two should be able to get to a button.

    I think I will want to revisit this problem after I get the basic units working.

    Hopefully they wont mind keeping the small FOB transmitter with them. I just don't see them want to wear one to bed. It's probably not a good idea for them to have something around their necks at night. Maybe I should think of a why of fasten the FOB to their wrists?

    If I get the buttons and FOBs working in a week, I'll be satisfied.

    Thanks again for your help.

    Duane
  • Cluso99Cluso99 Posts: 10,796
    edited July 2011 Vote Up0Vote Down
    I have no red all the thread. However, I have used a marine plastic recess (cup holder) for another purpose, These were fairly cheap IIRC and could be an ideal source of a slightly smaller solution to the end cap. Just a thought.
    My Prop boards: CpuBlade, TriBlade, RamBlade, www.clusos.com
    Prop Tools (Index)
    Emulators (Index) ZiCog (Z80)
    Prop OS (also see Sphinx, PropDos, PropCmd)
  • GadgetmanGadgetman Posts: 2,436
    edited July 2011 Vote Up0Vote Down
    Monitoring the bedroom is all good, but there are other rooms that also need special attention...

    Bathroom...
    This has a lot of hard, slippery surfaces. When people fall here, they're much more likely to injure themselves.
    They're also much more likely to be incapacitated in such a way that they can't press a button at all.

    Maybe a 'door closed' sensor, and make certain they only close the door when they use the bathroom, or an 'occupied' switch of some sort?
    Then a countdown timer that will sound the alarm if it isn't reset regularly.
    (Make it beep for a while before the timer runs out so that whoever is in the bathroom knows that it's time to push the button)

    Any stairs?
    A big button at the bottom and top.
    Or you could just stick load sensors under each step, and on the landing below.
  • Toby SeckshundToby Seckshund Posts: 1,993
    edited July 2011 Vote Up0Vote Down
    We had some of those "Easy Button" things given to us as a marketing ploy at my last place of work. They were square rather than round though.

    The contact set under the button was very poor, being just two strips of brass. This would have to be improved.

    Alan
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    I've started writing code for this project.

    I think I'm going to assign each unit an ID number.

    I thought about using pull-up and pull-down resistors on several pins to assign ID.

    I also wondered about those devices, Phil suggested, the size of a transistor used for assigning ID. I remembered the little ID devices cost more than an EEPROM which in turn caused me to remember the QuickStart boards have 64K EEPROMs. I can just record an ID number in upper EEPROM. Easy.

    Another feature I thought would be useful is to be able to reprogram all the devices from the base station. Preferable by just changing some sort of "autoexec" type file on the SD card.

    My in-laws live about 200 miles away from our little town of Chubbuck. It would be great if I could just send a SD card in the mail or even better email a file to a tech savvy bother in-law, when I wanted to update the firmware.

    I've modified KyeDos for one of my other projects so I was confident I could update the basestation's firmware. I'm not sure if I'd want to change the program on the EEPROM or just use Cluso99's trick of having the SD card loader remain on the EEPROM and just keep the firmware on the SD card.

    My concern was about all the other button units. How do I reprogram them? I didn't want to have to have a SD card in each unit. I especially didn't want someone to have to go from unit to unit reprogramming them.

    I was explaining to my wife why updating the button units was a more difficult task than updating the basestation when it occurred to me I already know how to do this. I know how to send data over over the wireless link and I know how to write data to an EEPROM. I just need to make sure the data I send gets written to the correct EEPROM location. I should be able to do that just fine. The main problem I see would be if the Propeller was reset while the rewrite of the EEPROM was in progress. I don't think this will be a major concern but do any of you have any ideas to make this less likely to happen? I do plan to have all the button units battery powered so they should not come unplugged during a firmware update. I really like the wireless firmware update idea.

    Back to programming.

    Duane
  • GranzGranz Posts: 179
    edited July 2011 Vote Up0Vote Down
    Duane Degn wrote: »
    ...

    Having followed the link to a real "Easy Button" (my first time seeing a picture of one) I was pleased to see it does look like it would make a good "Panic Button.". I don't know if I can get a QuickStart board in there though. I might need a thin enclosure to go under the "Easy Button."

    Thank you for the link and the idea. I'll need to visit our local staples and purchase a couple to hack. The links you provided make it look very hackable.

    Duane

    Yes, there may not be enough room for the QuickStart. There are other chips that you could use, but you said that you do not want to climb that learning curve. No trouble, check out the thread about the Smallest Prop (http://forums.parallax.com/showthread.php?132552-Smallest-propeller-board-(3.3v)&highlight=smallest+propeller ), several of those look like they could fit right inside whatever switch enclosure that you choose.
    Duane Degn wrote: »
    ...
    It's probably not a good idea for them to have something around their necks at night. Maybe I should think of a why of fasten the FOB to their wrists?
    ..
    Duane

    A friend of our wears one of those Life Alert wrist bands, it is just a small square box with a push-button running across the bottom of the "face". There is not enough room to put an entire Prop board, but a tiny custom board with a SMT Prop might work. But then again, you are up against more than a simple learning curve to learn a new chip. Still, you may want to call Life Alert (http://www.lifealert.com/ or 800-247-0000) and see how much those things run. Possibly you could hack it and not need the subscription service.
    Art G. Granzeier III, President
    Granzeier Consulting
    www.granzeier.com

    Helping to Build a Better Engineer
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Granz wrote: »
    Yes, there may not be enough room for the QuickStart. There are other chips that you could use, but you said that you do not want to climb that learning curve.

    I ought to learn to use some of the other microcontrollers. The FOB has a ATtiny24 on it. Don't tell anyone, but I downloaded AVR Studio. It would be nice to be able to change the program on the FOB. Jazzed has used small little uCs on at least one of his boards (the SDRAM Propeller Platform board). I also know Holly likes the ATtiny chips.

    I wont be reprogramming the FOBs for this project. I want to finish it as quickly as possible so my in-laws can start using it. But I would like to be able to use the ATtiny24 chip in other projects.
    Granz wrote: »
    No trouble, check out the thread about the Smallest Prop (http://forums.parallax.com/showthread.php?132552-Smallest-propeller-board-(3.3v)&highlight=smallest+propeller ), several of those look like they could fit right inside whatever switch enclosure that you choose.

    I saw that thread when it first started but I hadn't been back to it lately. Those are some small boards. Again, for this project, I don't want wait for the boards to arrive.
    Granz wrote: »
    A friend of our wears one of those Life Alert wrist bands, it is just a small square box with a push-button running across the bottom of the "face". There is not enough room to put an entire Prop board, but a tiny custom board with a SMT Prop might work. But then again, you are up against more than a simple learning curve to learn a new chip. Still, you may want to call Life Alert (http://www.lifealert.com/ or 800-247-0000) and see how much those things run. Possibly you could hack it and not need the subscription service.

    The device to wear from the neck looks about the same size as the FOB from SparkFun. The watch with a button looks like a good idea.

    I called Life Alert but they don't like to give prices over the phone. They're going to send one of their brochures. I don't think LA is a good fit for my in-laws present needs. They just want to be able to alert one of their children who would be staying in a guest room.

    Thank you for the ideas and suggestions.

    Duane
  • Ron CzapalaRon Czapala Posts: 2,159
    edited July 2011 Vote Up0Vote Down
    Duane,
    You got me hooked - I ordered two the key FOBs, and two of the transceivers and duck antennas.

    I also downloaded your code from June 29.

    Have actually used the key FOBs before?

    I guess they all transmit the same data so a receiver could tell one from the another.


  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Duane,
    You got me hooked - I ordered two the key FOBs, and two of the transceivers and duck antennas.

    I also downloaded your code from June 29.

    Have actually used the key FOBs before?

    I guess they all transmit the same data so a receiver could tell one from the another.

    The code from June 29 only checks to make sure the Prop can communicate with the device physically connected with it. It does not trasmit or receive messages wirelessly.

    Use the code from Post #9 of the same thread. Program the master into one Prop and the slave code into another.

    I was working on modifying the driver to use with multiple devices today, when I found a bug in the driver. The bug wouldn't normally interfer much but I think it may be the reason I couldn't communicate with the older modules.

    I'll be posting an updated driver in the other thread sometime soon.

    I'll also post code to use with the FOBs once I receive mine (should be tomorrow). I have not used the FOBs before.

    I believe the FOBs transmit a number depending on which button is pressed (based on my reading the source code).

    I don't think the default firmware will give an indication of which FOB is transmitting.

    Duane
  • Ron CzapalaRon Czapala Posts: 2,159
    edited July 2011 Vote Up0Vote Down
    Thanks! I looked at the OBEX code and even though he had constants for registers, etc he didn't use them. Not sure why?!?


  • SeariderSearider Posts: 290
    edited July 2011 Vote Up0Vote Down
    Check this out for your Button. I used one last halloween, put it on a plain metal box with the lable "DO NOT PRESS". The fun was watching people try to decide how bad it would be if they did press it.
    anyway it took a lot of abuse and worked great. Has a built in LED and mounts via a simple hole. Might fit nicely on top of the PVC stuff that was mentioned.

    http://www.seeedstudio.com/depot/the-nevergoingtomiss-glaringdevileye-huge-red-push-button-p-378.html?cPath=156_160
    -Hobbyist-
    Michael Boswell
    "Searider"

    "One problem with the internet is that you can never tell if a quote is real or not" -- Abraham Lincoln 1842
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Searider wrote: »
    Check this out for your Button. I used one last halloween, put it on a plain metal box with the lable "DO NOT PRESS". The fun was watching people try to decide how bad it would be if they did press it.
    anyway it took a lot of abuse and worked great. Has a built in LED and mounts via a simple hole. Might fit nicely on top of the PVC stuff that was mentioned.

    http://www.seeedstudio.com/depot/the-nevergoingtomiss-glaringdevileye-huge-red-push-button-p-378.html?cPath=156_160

    The only difference I can see between that one and this one is the SparkFun button says the lamp is 1.2W instead of SeedStudio's 3W.

    I wonder if one of them has the incorrect power spec. on the lamp and they are actually the same button. They sure look the same.

    I ordered two from SparkFun last Friday. They should be here tomorrow.

    I'm not sure if these are the best option to use as a panic button for elderly people but I couldn't resist buying them since I had a great excuse.

    As I mentioned earlier in this thread, these might be a good choice for this project since something important has got to happen when it is pressed.

    Thanks for taking time to share your idea.

    Duane
  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    I've been working on the programs for these units.

    I've pretty much decided to keep things as simple as possible for now. I wont bother with adjusting the brightness of the LEDs based on ambient light. I don't think I'll even use a SD card. There are several tech savvy family members who live relatively close to my in-laws. If I need to update the firmware one of them could borrow the base station and load a program, I emailed them, onto the EEPROM.

    I still plan to be able to update the firmware on all the other units wirelessly.

    Now I have two related big concerns. Batteries and minimizing power use.

    An initial idea was to use one of Parallaxes Lion batteries in each unit. I'm not so sure about this idea now. I don't know how frequently the batteries will need to be charged but I don't want anyone down there to have to deal with charging Lions.

    I'm starting to think the easiest way of keeping these things powered is to use NiMH AA batteries. I think I could connect the power from a set of four of these batteries directly into the Vin on the QuickStart board.

    I'm leaning toward buying several more sets of Eneloops. Hopefully if I provide one extra set of batteries then the batteries can be charged in rotation by whomever happens to be staying with my in-laws.

    It would be nice if I could include some sort of reminder so people will know which set of batteries to charge on which days.

    I also wonder about including some sort of charging circuit. If I do include a charging circuit it will probably just be in the base station.

    I have a bunch of these battery holders.


    Battery-Holder-Rectangle.jpg

    I tried to fit a holder with batteries into the PVC pipe cap. If I distorted the cap, I could squeeze the batteries into the cap. The wires were pinched between the holder and the cap so tightly I'm concerned the wires are likely to be damaged.

    I don't think I want to wait for a new mail order shipment so I will probably look for battery holders at Radio Shack.

    In trying to figure out the power requirements I wrote this little test code for the QuickStart board.
    CON
      _CLKMODE = RCSLOW
    PUB Main 
      repeat
        waitcnt(cnt)
    

    After loading the above code into the EEPROM I monitored the current while powered by four AA NiMH cells. The current measured 9.98mA.

    Apparently the Nordic modules can draw 90uA powered down. I will want the Nordic modes listening to each other so I probably wont be using the "power down" mode. I found the figure 13.5mA for receiving.

    It looks like I should expect about 25mA of continuous draw. The AAs I have here are rated 2500mAh. If I use batteries of these capacity I can expect somewhere around 100 hours between battery changes. I suppose charging the batteries every three days should be doable.

    Hopefully the 13.5 mA figure is when the unit is actively receiving not just listening.

    I'm starting to wonder about using wall-warts for these units.

    I think a lot of the power drawn by the QuickStart board it to power it's LED.

    Ug!! I had this form open on my computer overnight and added to it this morning. When I went to "Preview Post" I lost the new portion. I had the old portion backed up as text document. The new portion (which I hadn't backed up) was the part that was lost.

    Okay what did I just write?

    The Eneloops are 1,900mAh. I don't trust the Energizer even though they are 2,500mAh.

    I'm going to look at the thrift store for wall warts. I think I'll use wall warts with some of the units.

    I wrote some about using in-circuit chargers but I don't have time to do this.

    I think the QS boards' LED uses 6mA. I will probably remove the 220 ohm resistor.

    I plan to test the current draw of the listening Nordic modules. This is probably the largest unknown power requirement.

    I'm hoping to keep the units in RCSLOW mode and use a waitpxx to wake up the unit from a button press or from the Nordic Transceiver's IRQ pin.

    I don't think I will have any LEDs that stay oncontinuouslyy on the battery powered units.

    I'm hoping some of you have experience with these type of things and will share what you've learned. I'm I missing something?

    Thanks for all the previous ideas. I hope there are more.

    Duane
  • Ron CzapalaRon Czapala Posts: 2,159
    edited July 2011 Vote Up0Vote Down
    Duane,
    Since the SparkFun Nordic transceiver board has a voltage regulator to handle more than 3.3V and I believe the nRF24L01+ has an internal one, bypassing the one on the PCB might make it draw less current.


  • Duane DegnDuane Degn Posts: 9,079
    edited July 2011 Vote Up0Vote Down
    Ron, Thanks for the suggestion. I'll try it.

    Duane
Sign In or Register to comment.