Thanks Robert, but please don’t bother. I assume the circuitry in powerbanks will depend on the brand & model, so my results will probably differ from yours anyway.
As it happens, the last couple of days I have noticed that when I plug in my powerbank it immediately starts charging - in which case the latching switch is all I need (and to personally make sure I charge the powerbank after each cycle).
The better long-term solution is (a) to invest in a solar panel which outputs more current, to reduce the likelyhood of the main Li-Po running so low; and (b) to sort out deep_sleep to reduce the time in which power is being used.
Yes we did So many threads of thought that link together. I will get that DFRobot latching relay in my next payday’s order - in the meantime I “just” have to research the way to program in ESPHome the two GPIO pins to drive it … but that’s over in the ESPHome forum.
Hi Dan
A band aid solution. That is not addressing the fact that this device (Power Bank) is being used as a power SUPPLY which it is never designed to be. Might be OK to experiment but I don’t think OK for a longer term permanent or semi permanent use.
Cheers Bob
I am a bit of a believer of the Horses for Courses saying
Update re using a powerbank as a backup connected to USB-IN on the Sunflower Solar Power “Manager” …
I was rather impressed that my cheap 4A solar panel generating 0.3A was fully charging the 6600mAh LiPo during summer.
Unfortunately in winter the solar panel rarely generates more than 20mA, which serves only to reduce the amount of current drawn from the battery while the ESP32 is awake. At least while the ESP32 is asleep there is no load, so even a small current generated does seem to be going into the battery. Reducing the awake time and increasing the deep_sleep period has a noticeable improvement on battery life … but there are limits - specifically I don’t want to wait 60 minutes for the next 2 minute window in which to update firmware OTA.
Having a Powerbank attached to the Sunflower’s USB-IN has been effective - but with a major caveat. The Sunflower draws enough current to top up the LiPo battery, without shutting down until the powerbank is exhausted.
The problem is that switching a Latching Relay ON is not sufficient to start the powerbank charging. I have to physically go out to the greenhouse to press the powerbank’s button or plug the USB cable into the powerbank
It seemed like a good idea at the time, using a powerbank I already have. But having used the powerbank 3 times this past week, its time to go for a better solution - a bigger solar panel.
The Sunflower SPM 5V board states Max Charge Current 900mA (Solar/USB), which suggests that a 1A solar panel would be best fit.
The cheap panel I bought from aliExpress was advertised as 20W - but in the product description it says 4W - however even in summer I have never seen it output more than 0.3A, and most often it is lucky to reach 0.02A. Maybe that’s just AliExpress vendors selling dodgy product …
In practice (like so many IT specs) a solar panel’s rated current is measured under specific optimal lab conditions … and I have seen other comments that actual real-world output is significantly less than the official specification. So maybe I need a 15W panel to actually generate real-world 1A in summer (and Ghod knows how many Watts in winter).
Fortunately current is pulled (rather than pushed) and so providing more amps than the Sunflower SPM board is designed for should just mean the extra amps are not used and most importantly it shouldn’t hurt the sunflower board. The strategy therefore should be to go for the highest amperage 5V solar panel that I can afford … which isn’t very impressive
Which solar panel ?
Well the short answer is that there aren’t any 5V 15W panels (in my price range anyway).
So… looking at solar panels with 5-6V output, >1A and <$150 … I find no correlation between price and wattage. The cheapest is FIT0601 at $19.10 yet is best value at 52.4mA per dollar - but it’s one obviously designed to sit on a backpack and top up a mobile phone when out hiking and not to live outside in the rain.
I need something to sit outside every day in the rain, which cuts out the best value panels; and my >1A cuts out most of the others
OR … I could use the FIT0573 (5V 2A) flexible panel (highest amperage and a respectable 39.9mA/$) and protect it in an acrylic or glass enclosure.
Thanks for the detailed update, it’s been really interesting following your progress with the Sunflower SPM and your solar setup!
Your observations about real-world solar performance are absolutely spot on. Unfortunately, those optimistic panel specs from some vendors rarely reflect actual output, especially under non-ideal conditions (clouds, angle, temperature, etc).
I recall running some experiments on solar panels for a bunch of smart signs to be placed around Newcastle, and even a few degrees of tilt made a noticeable difference in output, so your results resonate.
I can see you’re thinking of experimenting with the FIT0573 flexible panel (5 V 2 A). It’s a reasonable choice given that higher current gives you a buffer for the SPM’s 900 mA input limit. Pairing it with the Sunflower board and protecting it from the elements in a clear acrylic or glass enclosure seems like a practical path forward.
I switched to the larger sunflower solar power manager 9v 12v 18v which allows a much larger range of panels. I have a 2000mAh LiPo connected to this and charge via a 20W 12V panel.
Jaycar 12v 20w solar panel, it says 12V but the measured voltage is 18v with nothing connected. The panel has been on my roof for about 2 years and works really well, every so often I go up to wash the dust and dirt of it.
I do agree Jim that the 5-6V solar panels are a limiting factor. I have ordered one of the flexible 5V 2A solar panels, now just have to arrange some weatherproofing for it, and will see how it goes.
As i went along I thought about the possibility of adding some 12V valves, motors and/or fans in my greenhouse; and that boosting from 3.7v to 12V would be quite a drain on the LiPo battery. Consequently thinking of the Solar Power Manager For 12V Lead-Acid Battery.
But thinking further, I decided the 12V devices will be used in mid-summer on hot days, when there is no shortage of solar power to drive those 12v devices directly from the 12V output on the SPM 9V 12V 18V board.
It’s been online for 20 days, emailing reports to me each hour with Wi-fi shut down over night. Rain the last few days so the battery is down to 4%, 3.5v according to the questionable data I get from the Adafruit LC709203F Battery Monitor.
Continuing my power saga … incidental info which may be interesting …
That was using an old 10,000mAh powerbank which seems to jump from 30% down to 0%.
I recently bought a Bauhn 27000mAh powerbank and used it yesterday, even though the LiPo battery still held a reasonable charge. It was a bit fiddly to work out my logic to have my USB-IN relay switched on long enough for me to go out and connect the powerbank, but I managed it and it started feeding power to the Sunflower SPM 5V’s USB-IN socket at about 8:20am (shown in red).
I assume the powerbank was supplying only 0.06-0.08mA until 5:20pm because the solar panel had a higher voltage but bugger-all current (the orange line) until sunset. It was however sufficient to charge the LiPo battery, as indicated by the blue line going negative to indicate nett power flow into the battery.
After sunset the powerbank was able to supply significantly more - though still well below the SPM’s stated “Charge current(USB/SOLAR IN): 900mA Max trickle charging, constant current, constant voltage three phases charging” or even USB-A’s nominal 500mA.
A bit after midnight the LiPo reached 4.18V and the current gradually reduced to a trickle until it cut off at 2:29pm - presumably because the powerbank turned itself off because the load dipped below its threshold. When I recovered the powerbank it still indicated 29% remaining, which suggests it was the sunflower and/or LiPo battery which terminated the charging. I am very happy with this result, despite it taking about 30 hours … but it still leaves the big issue …
Most consumer USB power banks don’t immediately apply 5 V to their output when a load is connected. Instead, they periodically “pulse” the output to detect whether a device is drawing current.
One potential workaround is to add a small dummy load (for example, a 100 Ω resistor) to the USB output. While this does consume a bit of power continuously, it can help the power bank stay active and may resolve the wake-up issue.
If this approach works, you could further refine it by switching the keep-alive load on only when the relay engages, minimising unnecessary energy use.
I was wondering whether the USB KeepAlive - Power Bank Adapter suggested previously by Dan would be appropriate for this scenario … but I was hoping to attach the powerbank mid autumn and just leave it as a backup until either it gets used or the weather improves. I am wondering how long even a small load would take to consume the powerbank’s charge.
But I now have a 5V 2A solar panel, which I anticipate will top up my 6600mAh LiPo battery much quicker even on overcast day - I don’t expect anywhere near 2A, but still better than the current small panel. This should significantly reduce the number of times I need to resort to the powerbank, to the point I can live with it.
Now I just need to figure out a weatherproof mounting for the solar panel which will hold it pointing in the right direction .
Power banks are convenient but they are designed to charge a mobile phone not to be used as a power supply. In my experience a dedicated power supply always works better. Cheers
Yes, we have had a lot to say about that. About time some of it started to sink in. Horses for courses. In my experience if you deviate too far from a design use for just about anything you are asking for trouble. In most cases if you have trouble and go looking for warranty service you find your use has probably voided it.
I suppose it could be likened to towing a 3 tonne caravan with a Mini Minor car. You would not expect to be able to do that successfully so what is the difference??
Cheers Bob
Too true ! But where did I suggest I am using it to power my microcontroller ?
Also true … but I find that a dedicated power supply doesn’t work so well if there is no mains power for it to plug into.
Unfortunately the people who design things tend to be siting in a lab with all the best tools to hand … and no experience of how their things will be used outside in the real world. Like assuming that a mains-powered USB charger is
going to be available at a remote location; or that the customer is happy for power to suddenly cut off without warning.
And yes Robert, I think you were very lucky to be working in a lab where the focus was on effective custom solutions - rather than being driven by sales and marketing only interested in how many buzzwords they can shoehorn into the marketing material while bringing the cost of the product below the cost of its packaging.
I used the wrong words, “dedicated power supply”, which implies a mains connection.
The subject of this thread is the Sunflower DFR0559. It is a great little board and its only fall down in my opinion is it can only accept 6V solar panels. It big brother is better but more expensive.
It accepts a solar in and 3.7V LiPo in and produces 5V out, ideal for a remote connection if current drain is not too much. This type of device is what I was referring to in my previous post and I should have said so, apologies.
As you have detailed previously the Sunflower also has a 5V in which you have a power bank attached but does not start charging automatically after stopping. This is what @Robert93820 and I are referring to, the design of the power bank needs something else to keep it alive. I think the original idea of incorporating a 5V USB IN was for it to be provided from a mains supply or something. It makes the sunflower more flexible.
How the system works with the 5V 2A solar panel will be good to see.
Anyway, your experience has been a valuable contribution to this thread.
Thanks for sharing with us.
Cheers
Jim
I’m new to all this, so apologies if this has been answered before. I have a solar panel and a battery connected to this 5V SPM, which is then connected via USB to an ESP32-C3 board (WS-25532). Can I read the battery voltage through the USB connection, or do I need to wire something else up to my ESP32-C3? I’m using ESPHome and HA, if that helps.
No. If your ESP32-C3 can read its input voltage (I use ESP32-S3’s so not sure about C3) it will be reading the voltage supplied through the USB connector. One of the main purpose of the SPM is to provide a steady controlled 5V output from whatever input is available.
Your LiPo battery is nominally rated at 3.7V - but when fully charged can be expected to supply 4.2V, dropping as the charge is used up. The trick is to detect when the battery voltage drops too low (like 3.3V).
You will need to add something between the battery and SPM to measure the batterys voltage. This can be a simple voltage divider made from a couple of resistors, or a discrete device. I personally have used DFRobot’s Digital Wattmeter, MAX17048 and Adafruit’s INA3221 - all of which connect easily to your ESP32 via i2c.
FYI, the INA3221 lets me monitor the SPM’s solar panel and USB input as well as battery - but honestly the battery is the only one to be concerned about.
((sorry it’s not an actual circuit diagram but it helps))
Measuring voltage is done by creating a parallel circuit before and after a component so that one calculates the drop, or in this case the output, of the voltage. So you would need to put the voltmeter or multimeter like so in order to measure the voltage: