Thursday, August 20, 2015

On The Other Hand...

In my prior post I implied it was OK to start building the Gate Monitor using an ESP-01 and 3 AA batteries.  I was wrong.

I had neglected to include the difficulty of disabling all the handshakes and timeouts inherent with WiFi and TCP.  While it is certainly possible, it would take lots of work to figure out, implement, and debug.  In fact, I found no evidence that anyone has ever done it!  To me, this means the project could be much more complex than just wiring up a switch and batteries, then writing a few lines of code.

A possible halfway position would be to place the AP in RTS-CTS mode and set the AP DTIM value to 3, then deep sleep between DTIM intervals.  While this would work well for the node, it would wreak havoc with other WiFi users, possibly reducing overall throughput by up to 80%

This would be practical only if the ESP-01 nodes were all on their own private WiFi network, separate from all other traffic.  While cheap $20 b/g/n APs are available, it would still be overkill if all we want is a single simple gate monitor.

So, let's say the ESP-01 is most easily used when it's WiFi is operating normally, which means an average ~70 ma consumption with minimal transmission.  Which means disposable batteries just became a greater cost.

There is an alternative: Piggyback the ESP-01 on a much larger battery-powered host.  In my case, I have some PIR-activated 60-LED solar security flood lights.  Adding the ESP-01 should not significantly affect flood light activation.  And I've been thinking about improving the lighting at the gate, so moving a solar flood there makes sense.

We'd need to add a $5 switching regulator for the ESP-01, since the LEDs are connected directly to the battery.  The PIR sensor is powered separately, but it's supply couldn't also power the ESP-01.

This would have the added benefit that the PIR sensor could also be monitored, permitting a message to be sent whenever someone approached the gate.  And we could also monitor the battery voltage, to warn of a dying system (solar floods have a habit of dying young).

So, for quick and easy ESP-01 nodes, either use a wall wart, or piggyback them onto larger systems that won't notice a 60ma load.

No comments:

Post a Comment