Arduino-Based Power Failure Alert System

arduinoPowerFailBox

When the power went out at his parents’ shop and ruined the contents of their fridge, [Lauters Mehdi] got to work building a custom power failure alert system to prevent future disasters. Although some commercial products address this problem, [Lauters] decided that he could build his own for the same cost while integrating a specific alert feature: one that fires off an SMS to predefined contacts upon mains power failure.

The first step was to enable communication between an Arduino Micro and a Nokia cell phone. His Nokia 3310 uses FBus protocol, but [Lauters] couldn’t find an Arduino library to make the job easier. Instead, he prototyped basic communication by running an Arduino Uno as a simple serial repeater to issue commands from the computer directly to the phone, and eventually worked out how to send an SMS from the ‘duino. [Lauters] then took the phone apart and tapped into the power button to control on/off states. He also disconnected the phone’s battery and plugged it into an attached PCB. The system operates off mains power but swaps to a 1000mAH 9V backup battery during a power outage, logging the time and sending out the SMS alerts. A second message informs the contacts when power has been restored.

Head over to [Lauters's] project blog for schematics and photos, then see his GitHub for the source code. If you want to see other SMS hacking projects, check out the similar build that keeps a remote-location cabin warm, or the portable power strip activated by SMS.

Comments

  1. pff says:

    “The system operates off mains power but swaps to a 1000mAH 9V backup battery during a power outage”

    …Then what is its power source when there is no power outage?

    • Josh Marsh says:

      I’m not sure I understand the question: the usual power source = adapter plugged into mains. When the power fails, it detects the outage and swaps to the 9V battery. Did I type something incorrectly? (a serious question, no intended sarcasm here)

      • trndr says:

        Apparently pff in his/her infinite wisdom was unable to parse the summary due to an extra f.

        (You wrote “off mains power” instead of “of mains power”)

        • Zac says:

          actually, ‘off’ is a perfectly good substitution for ‘from’ in this case. maybe ‘off of’ would have been better, though.

          • pff says:

            being off something means you are avoiding it.
            being off food means you aren’t eating
            being off grid means you aren’t connected
            being off-line means you aren’t on line
            being off mains power means you are disconnected
            being/existing/running can all be swapped in without changing the meaning
            ‘off of’ means exactly the same, disconnected. are you serious? now who is trolling?
            wow you guys are so rude, maybe you should ‘learn some damn english’ yourself.

            if you are looking for substitutions for ‘from’, maybe you should start with ‘on': ‘runs on mains power’.

          • Blue Footed Booby says:

            @pff
            You are incorrect. What he has is informal, but it’s completely acceptable. I’m finding it really hard to believe you’re a native speaker if that sentence was incomprehensible to you. There’s nothing wrong with that, but it means you should avoid trying to play grammar police.

            Also, grow a thicker skin.

          • Josh Marsh says:

            Ah, I see now.
            I can see how you might interpret “off” as disconnected. Perhaps it’s colloquial to me (and I should strive for clarity, obviously) but my intention was use “run off” as a transitive verb, implying that it “runs from” rather than “runs without”.

            Second section, transitive verb form: 9th entry.

            http://www.thefreedictionary.com/run+off

            Though, “technically correct” usage does not forgive a lack of clarity, and I can understand the confusion. I’ll be specific in the future, particularly in regards to discussions of power sources: the context is a bit unforgiving.

          • pff says:

            Judging by the other comments I seem to be the minority colloquialism wise!
            I expect what it boils down to is the origins: ‘it runs on electricity from the mains’ or ‘it runs on electricity off the mains’. you have subtracted the electricity from the mains and are using it to power the device. I would expect shortening both to yield ‘it runs on mains electricity’, ‘runs off mains electricity’ to me gives the impression that it is the device that has been subtracted!
            Clearly however this seems normal to everyone else, so perhaps i should have kept my mouth shut! sorry!

    • mehdi says:

      The main power comes from a 220v to 9v electric transformer and a relay make the power source selection

    • Tjb1 says:

      Reading comprehension is not very strong with you is it?

    • Sudos says:

      the 3310 is the power source, isn’t it obvious? that thing is still going to have 100% battery capacity in 2062.

      http://knowyourmeme.com/memes/indestructible-nokia-3310

    • pff says:

      off mains power = not connected to mains

  2. Temo says:

    Do you just keep paying $50 bucks a month to keep a cell phone ready for this emergencies?

    Are there any other cheaper ways?

  3. NiN says:

    He uses Arduino as “serial repeater”. I think that’s a bit overcomplicated. First of all, get rid of that Nokia because it doesn’t support AT commands, it uses FBUS protocol. Then find some old Simenes x35 phone, you can get them for about 2$. With Siemens you can use AT commands. Since number and message are predefined in this example all you have to do is generate PDU string (you can do it on your PC), store it in uC’s EEPROM and when power outage happens just send AT+CMGS command (send SMS), and that PDU string. Done.
    Mobile phones have Li-ion batteries and charging circuitry. So you can use phone’s battery to power Arduino board, no extra battery is needed.

    • mehdi says:

      The serial repeater was used only to debug the FBUS protocol.
      For sure if you need a computer to send an sms when a power failure raise it is really overcomplicated.
      Contacts to alert in this project are already on the EEPROM memory.
      But I agree with you with the fact that not supporting AT commands for old nokia is something which is missing to these phones.
      For this project I already had several old Nokia so instead of throw them to by “new” phones…

  4. wsi says:

    Mehdi thank you very much for your new n61sms.c library. it worked (sending sms) with my nokia 2100!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,027 other followers