Author Topic: Interrupt Driven Gate Status Monitor  (Read 875 times)

kni

  • Newbie
  • *
  • Posts: 24
  • Country: us
  • The Knight who says Ni
Interrupt Driven Gate Status Monitor
« on: October 20, 2017, 02:24:42 PM »
As the name implies, this is a gate status monitor which uses interrupts. The moteino will send an update the moment the gate is opened or closed. In addition, gate status is sent on regular intervals, just to confirm the device is still alive. I also added a bme280 for no good reason whatsoever. The bemo280 extends below the moteino inside the fence post, which has been vented using a couple of small, round soffit vents.

SMS alerts are configured to send a text if the gate opens.

In order to use less power, an SPDT magnetic contact was used as discussed here by joelucid:
https://lowpowerlab.com/forum/low-power-techniques/interrupt-driven-reed-switch-circuit/msg14241/#msg14241

Check out the photos below. I discovered one can embed a Moteino completely inside a vinyl fence fairly easily. The only thing exposed is the Sentrol 2507A status contact. So now I hate vinyl fences a little bit less!

Sketch is here:
https://github.com/knnniggett/moteino/blob/master/gatemote/gatemote.ino

This project proved its usefulness just days after completion. I got a text message telling me the gate mysteriously opened early one morning. I noted the time, then checked my surveillance camera and sure enough, the guilty party was caught on camera:


I am very glad I discovered this before I let the dogs out into the yard!

Unknowns:
While the moteino is protected from the rain, wind, and snow inside the post, it is not airtight at all. It will be interesting to see if any problems develop over time.

Future Improvements:

Due to my success duplicating Felix's supercpacitor project, I have a couple, narrow solar panels on order which are no wider than the top of the fence rail. Once these arrive, I will convert from lipo to super capacitor. Since the speed at which parts arrive from China seems to be inversely proportional to how quickly I want them to arrive, this might not happen until next year.

Configure the Moteino Raspberry Pi gateway to forward selected alerts to a ZoneMinder surveillance system. This, in turn, would trigger the appropriate surveillance camera to record and send an email with an attached video clip of the event.

Project Photos






Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6007
  • Country: us
    • LowPowerLab
Re: Interrupt Driven Gate Status Monitor
« Reply #1 on: October 20, 2017, 03:50:23 PM »
Quite excellent. Would love to see the solar/supercap followup. If you make this in article form I would love to put it up on the blog or make it a guide.

kni

  • Newbie
  • *
  • Posts: 24
  • Country: us
  • The Knight who says Ni
Re: Interrupt Driven Gate Status Monitor
« Reply #2 on: November 07, 2017, 02:32:12 PM »
The gate status monitor has now successfully been converted over to solar cell + super capacitor!

I spent a few weeks experimenting with different solar cells and two different super capacitors.

This is the first, and largest, solar cell I used, along with the same supercapacitor from Felix's blog:

https://www.amazon.com/gp/product/B00CBT8A14/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

This 2.5W 5V panel was wayyyyyyyy too big. What was I thinking? Oh right, Amazon prime shipping. While it would rather quickly charge the supercapacitor, it would have driven it over 6 volts in full sunlight, had I not been monitoring it.

The second solar cell was rated at 1W:
https://www.ebay.com/itm/5V-1W-Solar-Panel-Solar-Cells-Battery-Phone-Charger-Power-Outdoor-Portable/112522210896?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

This panel drove the capacitor to 5.6v in full sunlight. Still too much for my liking.

I downsized again to a 0.5W solar cell:
https://www.ebay.com/itm/2-5-5-5-6-9V-DIY-Solar-Panel-Module-System-Toy-For-Battery-Cell-Phone-Charger/291658177207?ssPageName=STRK%3AMEBIDX%3AIT&var=590692352643&_trksid=p2057872.m2749.l2649

This cell was much better, but it still drove the voltage over 5v, though not nearly as often.

In order to ease my conscience, I changed to a 5.5v supercapacitor:
https://www.mouser.com/Search/ProductDetail.aspx?R=SCMT32F755MRBA0virtualkey58110000virtualkey581-SCMT32F755MRBA0

The ESR is higher (90 vs. 55), but that does not seem to matter.

As you can see, the little 99 cent, 0.5W panel charged the capacitor from 4.2v in the morning all the way up to 5.05v by noon. This was on a completely overcast day too. I think we have a winner.









I know. I know. Nice mold. I gave up cleaning my vinyl fence.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6007
  • Country: us
    • LowPowerLab
Re: Interrupt Driven Gate Status Monitor
« Reply #3 on: November 08, 2017, 08:40:31 AM »
Very nice followup and project conclusion!
I think you could only wish solar cells would come in white too  ;)