So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Sille
#62072 HI Jeffas,

I really have to consider using a different module. I chose it because it was much easier to plug it to a usb port instead of using a ttl cable, pushing buttons for example for mainteneace purposes but it seems that it brings some problems with it. I guess that it would be the same with feather huzzah because it has a regulator on board too but I do not know maybe I have try this version later. But it is still strange that my module is not racting on power saving options for the sleep mode when they are programmed.

I see that there are two solar cells, how do you do the power point tracking and regulation in case the cell heats up or the sunlight is weak?

Best regards

User avatar
By chrismyers81
#62083 Something you should consider -- use a super capacitor instead of a battery. I'm doing something similar; I wanted to log insolation and temperature values but didn't have a reasonable way to run power to the outdoor logger, since it needs to pretty much be away from everything else. I looked at several different battery technologies, and the only one that can handle the low temperatures of winter here (which can get well below 0 degrees F) is lead acid. (You can't charge lithium or NiMH batteries below freezing, or you risk destroying them.) But, lead acid is big, bulky, inefficient, expensive, has a short cycle life, and can release hydrogen gas. Definitely not ideal.

So I started playing around, and ended up just getting a 400F Eaton PowerStor XB3560-2R5407-R capacitor from Digikey for $13, and two el cheapo 1W solar panels from eBay (they're still available too, item 112037618068). So basically, the power goes from those two panels to a "super basic pseudo-MPPT" module that I built out of a TL431, BC557 transistor, and trimpot (with the TL431 reference tied to the panel side in order to keep the solar panels above 5v so that they hit as close as possible to their Vmp of 6v7 without wasting the early morning low-output ranges.) From the pseudo-MPPT, power flows into a DC buck supply that takes the voltage down to 2v4 for the super cap. Then it goes from there into a DC boost converter to take it back up to 3v3 for the ESP 201 and sensors.

The buck converter is built around an MC34063 IC (using their provided reference design in the datasheet,) and the boost converter is built around a MAX756EPA+ IC (again, using their provided reference design.) I found that the load of the ESP 201 and its associated boards (BMP180 temperature, INA3221 voltage/current, and TSL2561 light sensors) consumes around 70mA when it's running (I removed both of the LEDs from the ESP to save the ~8mA they consume.) The MAX756 will support that load, and keep the output voltage above 3v, down to a 1v input level from the capacitor. So that gives me around 1.4v to work with.

PLUS, going the super cap route, this particular capacitor is rated for 10 years (at a reasonable temperature) and 500,000 cycles. Try finding that from any battery technology.....

Long story short, I know that the double-conversion might not be the most efficient in the world, but it works really really well. Even on days like yesterday when the sky was super cloudy, the cap was recharged from its overnight drain in less than an hour. (Here's an output graph from my emoncms account of the last three days of cap voltage (first day was all sun all day, second was partly cloudy, and the third was super cloudy until around 2pm, then partly sunny until dusk around 5pm) :

I have the data logger run once an hour when it's dark outside, and every 15 minutes when the sun comes up. In between those, it's in deep sleep. Based on the logging I've been doing, the cap loses about .02v/hour at night (with one sample per hour (70mA for around 20 seconds,)) so that could basically do one reading per hour and run for two days straight with no light at all.

Some notes:

I'm programming using the Arduino IDE.

I found that I had to put this in the setup function:
and then before I put the board to sleep, I had to do:
Without these, the board wouldn't reconnect when it woke back up, because apparently the ESP8266 caches its wireless connection details.

This is what I'm doing to put it to sleep:
ESP.deepSleep(1800000000, WAKE_RF_DEFAULT); //Sleep for 1 hr
and made the requisite wiring connection between the XPD and DTR pins ::
User avatar
By jeffas
#62091 @chrismyers81: That's certainly an interesting idea. I do wish I understood all the electronics straight off, but your description looks really thorough, so I should be able to figure it out.
Regarding sleep:
1. WiFi.persistent(false); is a really good idea for other reasons (security). See viewtopic.php?f=160&t=13583
2. I'm calling ESP.deepSleep with only the time parameter (and no call to WiFi.disconnect), and it wakes up and reconnects just fine. I have no idea why your experience is different.