Managing ESP32 & 18650 solar charging?

Hi,

I’m planning on adding a node to a beehive to send stats to a nearby gateway, It’ll be remote so solar powered seems the best option. What do you think of these two options?

Option 1 - Quick and dirty:
Hive Solar 1
Using a 50W (site experiences shade unfortunately) 12V panel and connecting the panels built in 5V output directly to the USB interface of the ESP32 and letting it manage charging etc.
It has a AXP192 Charge IC built in (Charging current 500mA)

Option 2 - CN3791 charge controller:
Hive Solar 2
Connect the solar panels 12V output to a CN3791 board and then directly to the 18650 battery housed on the back of the ESP32.

Option 2 seems much better as far as capturing as much energy as possible with the MPPT to regulate the voltage and current, the oversized solar panel should help during the winter (Northern climate).

My question is, will connecting the battery to the charge controller like this cause any problems, considering it’s connected to the ESP32’s own charge controller?

The key thing to look for is the open circuit max Vout from the panel - and even then allow a bit of safety margin c/w the VMax input limit for either charger input option. MPPT is usually that bit more efficient but really only comes into its own at higher power levels - a 50W panel getting full sun yes maybe, if only ever/mostly shaded so not really runnng at 50W but likley <30 or even 20W - say >70% of winter daylight hours perhaps not unless cost of MPPT controller small - though another way to look is that extra bit of efficiency may make different of 365/24 operation or loosing a few hours - best advice is do the maths! :wink:

Thanks Jeff, I was hoping to avoid the maths by oversizing everything! :laughing:

There’s no tech specs for the panel, other than DC12-18V being the 12V output, guessing it’s capped to 18V as it’s designed for car battery charging (directly).

The MPPT circuit is £2 so cost is not an issue, I’d expect a massive variance for solar, more light in the winter (no leaves on trees near the hive) but less in the summer so as you say, it should help.

I’m not 100% sure on sensors etc, probably internal\external temperature and humidity to start with. In the future I may use Espressif’s ESP-Now feature to allow other hives in the apiary to pass sensor data to this master hive. I’ll use some deep sleep and adjust usage based on available power (Much less data is required in the winter).

This is the panel I was looking at, it’s cheap, waterproof and is the same dimensions as the hive roof so I can securely attach it directly on top. It’ll be flat, so a slight loss there but will make securing it easy. I’m guessing the 12V output is directly from the panel (through the diodes) but the 5V is probably via a cheap\inefficient regulator.

Solar Panel:

MPPT Circuit:

The panel you show ships with dual USB port/voltage regulator (missed that in you OP) which itself looks rated to ~>24Vmax as far as I can tell from picture - suggests VoutMax of panel is below that :slight_smile: More importantly just take that to the USB input of of your sensor module with the on board rechargeable battery - board then takes care of everything and any middle many item (Vreg/Charge controller) is redundant - you’ve just saved your £2 :wink: That suggests you are looking at option one above…

Hi Jeff, thanks for your help - would there be much efficiently lost in not having the MPPT manage the battery charging and doing it “dirty” :joy: These parts are so cheap it seems easier to just oversize the hell out of it (a 50cm square solar panel is also a bonus as it’ll act as a roof cover).

Remember each intervening convertor adds its own inefficiencies & losses so you dont want to layer these…if going (2) you need to ignore the existing USB convertor (waste of money? - also disconnect it from panel to remove its losses even when not loaded) and take feed directly to external charge controller - I see that has a 12V input buy option…but then you come back to my 1st advice - check the VinMax of the charge controller - if no data on/from panel then play safe and assume it needs to be same as the USB adaptor/convertor - 24V? If I recall (last used quite a while back) the CN3791 IC is good to raw Vin Max 28V, allowing up to 4A chargiing current max (more than battery will need) so should be golden - but check with supplier if there is anything that may limit (caps, diodes, external MosFets etc.) - cant tell from the link provided. Note dont connect battery when charger running - as inrush can be significant and may blow something! Hook battery then add panel connection or keep panel covered until battery ready.

One additional hint concerning the solar-module:
The rated power is given in Chinese Watt. Depending on where you are, I won’t expect more than 20W.
0.14 qm x 800W/qm x 0.2 = 22W peak.

LOL Would that be rather like the 1024Gb SD Card I can buy on eBay for a fifth the price of main stream brands??!!

1 Like

LOL Would that be rather like the 1024Gb SD Card I can buy on eBay for a fifth the price of main stream brands??!!

I’ve been there too many times in the past :crazy_face: I figure if you divide the chinese value by 10 you get roughly the right one!

Had already factored that in as was going to say 50W overkill for ESP32…then I figured Chinese/Alibaba (no jingoism intended - just previous buying history) so figured real/op likley 20-30W in part contributing to my

comment earlier! :rofl: - I can get GW’s running of good quality 50W panels let along a sensor nodes!

Good luck!

What information are you going to collect and what is the power consumption of the sensors?

The current proposals seems quite a bit overbuilt - you can get a lot of runtime out from a typical well-designed LoRaWAN node (which an ESP32 solution may not be) from a few alkaline cells, and it’s not clear that this is an application that’s ever going to use enough power (other than by wasteful design) to redeem the resources embodied in that rather large panel.

Essentially, I’d argue to make it efficient first (even if run on disposable cells) and only then worry about alternative power sources.

2 Likes

I had a ESP8266 based hive monitoring system running with a 0.5 W / 6 V solar panel and update intervalls of 5 minutes and it worked from March on to autumn good. Also a GSM based system with 20 min updates worked till early winter with this 0.5 W panel.

So with your solar panel and LoRa it should be no problem at all, it is at least double oversized, I think. :slight_smile: I assume that your system will be sleeping most time. So focus on the deep sleep phases and use hardware that supports a good deep sleep consumption. Seems like you will use a TTGO T-Beam variant. For different a TTGO LORA32 / T-Beam module I found incredible low deep sleep numbers at aliexpress, unfortunately no information from TTGO itself. So I assume the mentioned 0,2 uA deep sleep is “Chinese uA” also or mA or whatever. It could not be the real consumption because ESP32 needs 8 uA in deep sleep alone.

So I would first check if your board has a ~ 50 uA deep sleep current (the ESP32 based LoPy can do this or the DFRobot FireBeetle, but last one has no LoRa), and optimize that in case you want to. I think both variants above should work. I would count on simplicity and use your Variant 1 first, track the battery voltage over a season and you can allways switch to Version 2 in case this is insufficient.

I had really bad experiences with the T-Call (SIM800 board) from TTGO, it has also the AXP192 as power management chip. So I hope the LoRa board has a better power design than the T-Call.

Keep in mind what your optimization could be in the future. A smaller panel, other power hungry sensors, LTE as telemetry option …

Btw. what sensors are you using? Weight, temperature, humidity or more advanced things like sound? Feel free and feel invited to join the Hiveeyes community, a tec beekeeper and maker group: https://community.hiveeyes.org

So option 1 was a failure, the 5V output from the 12V (50 chinese Watts) panels controller could only provide enough power to charge the battery in strong direct sunlight. I’ve removed it:

image

And replaced it with the CN3791. I’ve also removed the 1 cell battery pack from the T-Stream, replacing with a 2 cell holder. It seems to be charging significantly faster, even with heavy clouds at the moment.

@Clemens_G Thanks - I’ve posted there about developing a hive scale recently :slight_smile:
I will be capturing bee count (in\out via IR LED gates) temp, humidity (inside and out), GPS, motion (theft alarm), sound (only current frequency & volume to to low data bandwidth) and weight.

Does the angel of the panel have much affect on energy conversion? I would like to keep it flat against the beehive roof, but could tilt it towards the south if there’s much of an improvement.

I have used 1s cells only because the charger I used are 1s charger. As far as I know, you should not use 1s charger for 2s / 3s LiPos. In case you changing the battery holde from a single LiPo to two, I would say it is a 2s setting and you need specail load balancer and it could be dangerous or at leas unefficient to use the 1s chartger for a 2s LiPo. But this is my basic understanding with no guarantee. Or is 1s, 2s, … and balancing only needed with LiPos in series and it is an other case with LiPos in parallel? Perhaps someone other can jump in and enlight us or you have to do more research on this.

The batteries must be identical (Same age, type, voltage rating, size and capacity).

@chinswain The angle of the sun definitely affects power from the panel. The basic theory is that the light is spread out by the cosine of the angle (where perpendicular/directly on the panel is 0 degrees), so for a 45 degree angle of incidence, expect cos(45 deg) or about 0.707 (70.7%) of the maximum.
For what it’s worth, I suspect that the original circuit was designed for bright light only (meaning its minimum input voltage from the panel was relatively high, perhaps 15 V or more). The circuit was probably not running well in the shade. Your new solution sounds better.
I’ll also echo what others have said, with well-written firmware the module will be in sleep mode most of the time and the total consumption should be low enough to require a much smaller panel and battery, but I understand the approach of over-designing so you just don’t have to worry about it. Cheers on the great project!

I’m actually doing it in reverse - I wanted a panel that covered the majority of the flat hive roof, and the cost is not much more than a properly sized panel. I can now adjust the data collection frequently based on the (hopefully) excess power, it would be nice to have more frequent updates. The weather is extremely unpredictable here so another level of insurance!

I don’t think the mechanics of a tilting system will be worth the extra gain, the oversized panel should compensate I hope.

May I ask how often your node should send data?
I use a MKR WAN 1310 with a 1800mAh battery to controll the amount of food left in my bird feeder - it sends every 4 hours (deep sleep in between) and runs with the battery for over a year until I need to recharge. Maybe the solar cell is not necessary for you?
When using a 26650 you can get cells with 5000mAh…

Or is it necessary that your node is awake all the time?

It has a lot of sensors, some are extremely time sensitive so the controller will be on all day, with sleep periods at night. I will be counting bees entering and leaving via IR sensors, so constant processing for this. Most other sensors can record every 10 minutes without any impact on the data. (Actual data only needs to be sent back a few times a day so the radio can stay off).

Ahh - ok. Under these circumstances my suggestion is complete obsolete :wink: