Author Topic: Mailbox Notifier using reed switch - running at 26 uA  (Read 15205 times)

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Mailbox Notifier using reed switch - running at 26 uA
« on: December 09, 2015, 08:42:03 PM »
My partner and I just finished the first day of testing our version of the "Felix-famous" mailbox notifier.  We played around with a PIR and LDR as other options but ended up using a reed switch and magnet.  The Moteino is powered by 4 AA's and is currently purring at 26 uA.  When the mailbox is opened a message is sent from the Moteino to a gateway Moteino in the house.  The indoor gateway is connected to the Internet via an ENCJ2860 wired into the cable modem.  This provides access to the Internet and is used to send an SMS message via ThingSpeak and Twilio.  The home gateway will expand as other sensors are added, including weather, security, environmental and convenience (lights, outlets) devices.

With any luck the whole thing will be in production this Saturday.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #1 on: December 09, 2015, 11:22:27 PM »
We played around with a PIR and LDR as other options but ended up using a reed switch and magnet. 
Is the reed switch closed or open when the mailbox door is closed?  If closed, what is your circuit to keep from drawing power?

Also, how to you deal with the mail person in a hurry who doesn't close the door all the way?

Tom

BBF

  • NewMember
  • *
  • Posts: 4
  • Country: us
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #2 on: December 10, 2015, 07:06:11 AM »
Is the reed switch closed or open when the mailbox door is closed?  If closed, what is your circuit to keep from drawing power?
Also, how to you deal with the mail person in a hurry who doesn't close the door all the way?

Hey Tom,

The reed switch contact is closed when the mailbox door is closed.  We apply 3.3v to the reed switch which is connected to D3 with a resistor from D3 to ground.  We found that the lower the resistor value, the higher the current so, through trial and error, using a 1M resistor yields 26 uA when the door is closed, and 23 uA when open.

We don’t yet have a solution for when the postal carrier leaves the door open, but at least we only use 23 uA when he does.

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #3 on: December 10, 2015, 08:06:39 AM »
Is the reed switch closed or open when the mailbox door is closed?  If closed, what is your circuit to keep from drawing power?
Also, how to you deal with the mail person in a hurry who doesn't close the door all the way?

Hey Tom,

The reed switch contact is closed when the mailbox door is closed.  We apply 3.3v to the reed switch which is connected to D3 with a resistor from D3 to ground.  We found that the lower the resistor value, the higher the current so, through trial and error, using a 1M resistor yields 26 uA when the door is closed, and 23 uA when open.

We don’t yet have a solution for when the postal carrier leaves the door open, but at least we only use 23 uA when he does.
I'm glad you've got it working and I'll bet that Felix has plenty of stories about what postal carriers do or don't do!

As a general rule, I try to optimize for the longest operating state which, for a mailbox door, should be closed.  Using 1M reduces the load to 3uA, which is good, but it might be better if the 3uA is drawn in the shortest duration state, ie, door open - tough to do with a reed switch however, which why I asked.

Thanks for the quick response!  Doing anything more probably would be over optimizing your design since you have 3000mAH to play with!  On this note, FYI, 3 AAs would give you the same life as 4.

Tom

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #4 on: December 10, 2015, 08:36:38 AM »
TomWS,

We were aware of the 3 vs. 4 battery supply.  The only reason we used four is that was what we had on hand in a side-by-side layout.  I did have a 3 AA case but it was waterproof with an on/off switch and it didn't fit well into the enclosure we wanted to use. 

Thanks for the suggestions.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #5 on: December 12, 2015, 10:46:53 AM »
Successful installation.....awaiting first customer.

Along with the "mailbox open" text message we also get the battery voltage for good measure.

Currently sitting at 6.36v for four AA.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #6 on: December 12, 2015, 12:40:11 PM »
Nice work syrinxtech,
I can say that my mailbox is often not closed all the way, they just shut it towards close position and it requiring a little more effort to actually completely close it, that inertia is not enough to close it.
However I am using a PIR sensor to detect motion. So unless the door is half way or completely open, the motion sensor pretty much never gives a false positive. When the weather gets really cold thats when the LiPo starts to just be unstable and die and thats when I get false positives because the voltage will fluctuate as the cheap chinese LiPos cant handle the cold, switching to 3xAAA alkalines for the cold season solves that issue.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #7 on: December 12, 2015, 12:44:49 PM »
Felix,

Must be the profession because I've noticed that a lot of the mailboxes around my neighborhood have their doors partly open.  I have also had mine open during rainstorms.  Hopefully this new box will encourage the mail person to shut the door!

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #8 on: December 13, 2015, 04:00:05 PM »
While eating lunch today my partner and I thought of a potential energy savings for the Moteino in the mailbox.  Currently he is sleeping all the time and gets woken up by a reed switch/magnet connected to the front door.

What if we moved the reed switch from an interrupt to in-series with VCC?  In other words, while the door is closed, there is NO power to the Moteino.  When the door opens, the reed switch allows VCC to reach the Moteino and the unit powers up.  It's only job at that point is to grab the current battery voltage from the AA's and send a message to the internal Moteino gateway.  The internal gateway then sends a text message indicating that the door has opened and also provides the battery voltage.  When the door closes the power is once again disconnected.  In the event that the mailbox door isn't closed the unit will go back to sleep at 23 uA.

Would this draw more current stopping and starting the Moteino as opposed to simply putting it to sleep?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #9 on: December 14, 2015, 01:49:47 PM »
I guess that could work.
You would then not know if anything is wrong and the unit cannot power up any longer.
Hence in my setup at the expense of some current draw, I prefer the unit to be alive and give periodic updates so I can know whenever it stops sending that something is wrong, or the door is open (repeated motion).
Sorry to digress but I think people are too stuck on the idea that everything has to be uber ultra low power or else... Yeah even my website has Low Power in the name although maybe I'd name it something else if I were to start over :)
Keeping the lights on has some benefit sometimes :)
And yes smart engineering and coding can achieve low power and "lights on". But there's always a tradeoff. Often it's not worth the tradeoff (effort and money and time spent).
Everyone has to decide if that tradeoff is worth to bother.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #10 on: December 14, 2015, 01:53:59 PM »
Good points.  I know for us it's always a tradeoff between the design, the desire to push things to the limit and what's practical.  Current measurements on a bare bones 328p with 3-4 other components on the board is interesting from an electrical engineering perspective but useless to me when I'm trying to stuff as many sensors into the box as possible.  So, while it is fun seeing how frugal you can be, as you said there is always a practical limit.  Knowing when you've reached that point is up to each individual.

We were just throwing the concept out there to see if anyone had any thoughts or had actually tried it.  As you said, the obvious drawback is if you don't get a reading one day you won't really know what's going on.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #11 on: December 15, 2015, 08:29:21 PM »
Swapped the indoor ENCJ2860 with a Wi5100.  Thanks to "kiwisincebirth" for his great changes to the Ethernet library to allow me to change the CS pin on the Wi5100 using a function call instead of hacking the .h file.

Also changed the logic of the reed switch to provide both an "open" and "close" door message.  That way I'll know if the postperson has left the door open.  When the ISR fires to wake the Moteino, I do a quick digitalRead of the pin connected to the reed switch and set a variable.  Back in the main code I use the read results to determine if the switch is open or closed and print the appropriate message.

Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #12 on: February 03, 2016, 05:06:20 PM »
That's a great idea about using switch to power the board!
BTW I'm using slightly different approach in my notifier. I use two magnets, one always behind reed switch, second one in the door. When door is closed both magnets cancel each other and reed switch stays off, thus saving tons of power. When door is opened, switch triggers as there's nothing to pull it another direction. This works very well, and I found it wasn't hard to position magnets correctly. I had to safe every ounce of power since I'm using coin cell and my transmitter is tiny...
I might combine both techniques (turning power off with reed and using 2 magnets) in my next version! :)

BTW here's a video of it in action :)
« Last Edit: February 03, 2016, 10:37:28 PM by Lensdigital »

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #13 on: February 05, 2016, 09:55:00 AM »
@LensDigital,

Nice video and project!  What type of hardware are you using inside the box?  Is it a Moteino, Arduino, PI, etc?

Also, what type of hardware are you using to illuminate the mailbox outline in what appears to be Lexan or glass?

Oh, I heard that there are also normally closed reed switches that might negate the need for the magnets.
« Last Edit: February 05, 2016, 09:56:31 AM by syrinxtech »

Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Re: Mailbox Notifier using reed switch - running at 26 uA
« Reply #14 on: February 05, 2016, 10:04:45 AM »
@LensDigital,

Nice video and project!  What type of hardware are you using inside the box?  Is it a Moteino, Arduino, PI, etc?

Also, what type of hardware are you using to illuminate the mailbox outline in what appears to be Lexan or glass?

Oh, I heard that there are also normally closed reed switches that might negate the need for the magnets.
Thanks! :)
I'm using a board I created (SquareMote). It's similar to Moteino but larger and with sensors onboard as well as coin cell battery. I have more info about it and mailbox setup on my blog post, I hope it's ok if I share it here :)
For mail sign I use 1/8" thick acrylic that I cut and engraved with laser. It has short LED strip on the bottom which lights up the sign. LED strip uses 12V so I'm using Transistor with my Squaremote to switch it on.
I looked for closed reeds, but had hard time finding anything that doesn't cost too much or too big in size..