Newbie alert - How to effectively power my ESP8266 in a remote location

Hey everyone.

Introduction:
I’ve only been around DMS for a couple months, and my attendance is sporadic, as I reside in Fort Worth. However, I did get the opportunity to take Brady’s Arduino Sensors class, led by Nick. I have since done a beginner project (wifi-enabled power outlet) based off an Instructable and Brady’s curriculum for Blynk (I have a standing conflict on Thu nights during football season, when Brady seems to teach most of his classes, so I just took the material and worked it out myself).

I have another project in mind, and I have contacted Brady. However, I wanted to get any/all brains I can. WARNING: I an a total novice when it comes to circuits, electronics, etc. I am currently auditing an intro to electronics course on Coursera to help expand my very basic understanding.

Project:
I want to use ESP8266 and the Blynk app to be able to use an app button to control a servo to lock/unlock my gate. I have an elementary idea sketched up using a servo, clevis, pushrod, and steel dowel to push through the lock hole in gate latch. However, the ESP8266 needs pretty constant 3.3v supply to always be “listening” for a lock/unlock request. I have found a similar project that uses a solar panel and Li-Ion batteries, although the comments seem to indicate others have not had success… Any thoughts?

Thanks in advance. I am really enjoying DMS, and I hope to make more use of it in the future.

1 Like

My route for estimating on solar powered setups is to measure how much power the device uses and then try to calculate how much money you’d spend on batteries and panels. After that I choose to wire it up somehow instead of using solar.

Let’s say your device uses 3.3V, and at an average of 200mA. You’d need 15.8 watt hours (3.3X0.2X24) to make it through a 24 hour period.

Assuming 5 hours of solid sun during the day on your panel you’ll need a ~3W panel, but since that’s small I’d spring for a few more watts because they’re cheap and you’ll want to cover the charging inefficiency. (for example: https://www.amazon.com/ECO-WORTHY-Solar-Panel-Watt-Module/dp/B00OZC19AY)

After that, you’d need a battery to cover the night times and that would need a few days capacity for a rainy week. You’d need ~80 Watt hours (15.8 watt hours X 5days) which should be pretty easily covered by a 12V 7 Ah (like so: https://www.amazon.com/ExpertPower-EXP1270-Rechargeable-Lead-Battery/dp/B003S1RQ2S/)

And finally, you’d need to get the “glue” to hold the system together, a charge controller (or a diode) for the solar panel to charge the battery, and a 3.3V down-converter for the 12V battery.

3 Likes

Check out this article.

If you want to come by my place in Allen tonight I will give you 2 things if you would like them.

Notably you can control your clock speed as well for less power consumption or raise it if you need faster speeds.

3 Likes

Spec sheet says average 80mA. 2.5 - 3.6V range accommodates the lower half of Li-ion but not the ~4.2V peak so you’ll need some sort of power regulator - probably 3V.

3V * 80mA = 240mWH per hour or 5.76 WH per day. 5 hours noon-grade sunlight is a reasonable average estimation, but you want to overprovision to ensure that you collect during the winter or periods like we’ve been through the last month so I’d assume two hours. Go with the 10-watt panel and realize perhaps 20 WH/day during lulls and 50 WH/day during the summer. All this is on the DC side of course so you’ll need to account for charging efficiency of whatever battery you choose.

Li-ion in 18650 format coupled with a buck/boost converter to provide 3V offers great power density and efficient charging, but might not be convenient with your solenoid/charging and might not be appreciative of summer heat. Lead-acid is cheaper per faceplate W-H, but suffers from two problematic halves: you won’t realize much lifespan if it’s routinely drawn down to 50% of faceplate Ah and they’re also ~50% efficient on charging.

1 Like

How far away from power is your gate ?

1 Like

Still not available in every corner store.

1 Like

@Robert_Davidson Thank you for the article. I have only skimmed it, as it appears to be quite a bit more complicated than sketch in the Arduino IDE… I’ll dig in. Sorry, I couldn’t get from FW to Allen tonight. Perhaps another time – or maybe we could meet at the space.

1 Like

Thanks to all for the input. Much to digest and consider.

One workaround (based on something mentioned to me in email from @bpamplin) would be to utilize NRF24L01 transceiver modules. Have the ESP8266 w NRF24L01 transceiver inside the house on wall wart and have the gate device powered by an Arduino Nano w NRF24L01 transceiver. Seems the NRF24L01 has a much lower power appetite. So the hungrier device gets constant power and I could still utilize solar/LiPo for the leaner device… the Blynk requests would simply get “forwarded” from the ESP8266 to the Nano to actuate servo.

3 Likes

I built a solar-powered weather station to use at my cabin in Colorado. The basic station is based on the ESP8266 chipset and would likely have similar, if not somewhat higher, power requirements. FWIW, this is the same weather station DMS installed on the roof last year.

I used this solar panel kit to charge the batteries and monitor the voltage. The system is designed to cut off power if the voltage gets too low, then restart once it is above the minimum voltage. The system has been running for over a year, in a variety of weather conditions, without an outage.

The charging kit and panels (about 1 amp total) runs about $85. Here’s the battery pack I am using (about $30):

3 Likes

Until Tanner Electronics starts carrying the @zmetzing radioisotope gadget, I think there are only two possible approaches.

  1. Solar panel - Lots of good info above. I cannot add any info here.

  2. Sleep at extremely low power and wake up occasionally to check requests. I want to do a somewhat similar project to run a couple of months on a rechargeable battery. This will work for our projects because mine will wake up only when an event occurs. Yours is not real time so it could wake up every minute and check for requests.

A problem with MCUs with radio modules and hobby boards is that even in sleep mode they will drain batteries in hours or days.

I want to build a board with an ATtiny85 on the front end which can sleep consuming on a few microamps. When an event occurs or time to wake up, it will turn on a microcontroller with NRF24L01, ESP8266 or whatever for only a few seconds.

Using an ATtiny is not as convenient as an Arduino but it is a very reasonable hobby project. I did a class a while back that I need to offer again.
https://calendar.dallasmakerspace.org/events/view/5841

Jeelabs is a fascinating blog that I have followed occasionally which has excellent info on low power. If you start with the oldest entries, the writer did not know much about sleep modes and such but experimented a lot and documented all the ups and downs. I have a number of his modules that I need to pull out and use.
https://jeelabs.org/tag/lowpower/

1 Like

@bpamplin Thanks for clarifying comments. I’m challenged, given my use case, to determine a “sleep/wake” schedule, given the requirement to respond to requests when issued… Reporting weather data can be scheduled on intervals without much concern. Responding to unscheduled virtual invocation makes things more… interesting?

I hate to admit defeat, but I’ll likely figure out a solution which includes plug into household :angry:

I need to secure time to peruse the Jeelabs info. Thank you for linking.

EDIT: And I hope to get to attend more classes of yours in the coming months (once HS football season winds down).

1 Like

Found this guy/video today. He provides the code to be able to put Arduino in deep sleep, during which it is pulling some 5μA. This may get me where I want to be. Have an ESP8266 Wemos in the house to catch the smartphone Blynk requests via WiFi. Equip it also with NRF24L01. Set up a Nano with NRF24L01 outside at the gate with servo. Use the watchdog timer to wake up every x seconds to check the indoor unit to see if there is a request to do work. Then go back to sleep.

2 Likes

Seconded!

98765431

You don’t need a sleep/wake cycle: you need a wakeup trigger.

You could “wake on magnet” - embed a magnetic sensor under the driveway to look for a vehicle. When one triggers the magnetic switch, move to active mode (turn on radio circuit, start listening, et al) as long as magnetic switch is engaged (plus X seconds/minutes?).

Magnetic switches such as these (“Gate exit sensors”) are used to trigger opening a gate for exiting an area w/out needing a remote/password/key/etc. Kinda pricy, though.

A cheaper lightbeam interrupt sensor (like are used at the bottom of garage doors) could also be used as the initial latch (and could be triggered by a human rather than a requiring a large metal vehicle) but would be more visible. A south-facing sensor can also get fooled by the sun and not detect the beam interrupt in full sun. The lightbeam itself has its own power requirements as well.

2 Likes

I had a Mule 150 gate opener which used a 10 watt solar panel and a single 12V battery to detect the radio signal AND open the gate. Perhaps you could learn from their design? It was something like this one:

https://www.tractorsupply.com/tsc/product/mighty-mule-rsck360-automatic-gate-opener-rancher-solar-combo-kit?cm_vc=-10005