Solar only sometimes charging, Electron

Hi there,
I am testing some low current solar charging on the Electron.
My solar panel is quite small. .7w 4.5v.
I have it connected to the VIN pin on the electron.

I have been testing under laboratory conditions with solar lights (instead of the actual sun as it is too unreliable here in Washington State).

With a consistent light hitting the solar panel and the electron in DEEP SLEEP, sometimes my battery will charge a few percent over a couple of hours. And then it just stops charging.

So my question is, does the PMIC automatically turn off and stop charging for some reason? If so, how do I keep this from happening? Obviously I would like for the PMIC to take whatever it can get to keep the battery charging and topped off.

Some notes :
I am running in SYSTEM_MODE(SEMI_AUTOMATIC). Not sure if that matters.
For this test, I am waking the system up manually to report the battery level via a particle publish of the battery level.
I am getting the battery level with this function.

float getbatteryLevel(void)
{
FuelGauge fuel;
float battLevel = fuel.getSoC();
return battLevel;
}

The fuel gauge charging LED will go out if the incoming current drops below 50mA. It keeps charging through even though the light is OFF If I remember correctly.

Thank you, sir.
That would be expected, however, my tests are with a steady input of light from the source and I am reading the same voltage and current going into the Electron. But it only accepts current seemingly when it wants to. Then it just shuts off. I haven’t been able to find a rhyme or reason for it and have tested several units at different battery levels with different batteries (all the liPo that comes with the Electron).

I have also noticed that when plugged into a good usb source, while in DEEP SLEEP, the same behavior is happening. Even though the SOC shows a battery level of, say 35%, the red LED will shut off after a while and no current will be going into the PMIC.

It’s almost as if something just decides “hey, I could use some juice” and then opens the floodgates. Then says “alright, I’ve had enough” and closes them, even though the battery is not full.

how full is it reporting? they seem to top off in the low 80% range

As low as 33% so far in testing.

To give you an example, yesterday, one of the devices was at 36%.
It was pulling in about 100mA of current and appeared to be charging fine.
A couple hours later, it just stopped charging. Nothing changed. Nothing moved. Still sitting in DEEP SLEEP.
So I hit reset to let it run a particle publish. It reported in 39%.
I’ve left it sit under the light all night and ran it again a bit ago. Still at 39%. Still not pulling in any current.
Now, if it does what I think it will do, eventually it will start taking a charge again and then stop again. At least, that’s what they have been doing.

Keep in mind, these are currently indoors, stationary, no change in ambient light. Meter shows steady voltage and current (when charging).

how much current?

About 100mA.

and USB charging brings is all the way up?

USB charging seems to have the same results.
I have looked down on my bench test unit and realized that the red indicator has since shut off while it was plugged into power over USB, even though the SOC was reporting a battery level of under 50%.
I thought perhaps it was because it was plugged into a USB hub on my PC so I switched to a 2.4amp plug in a 120v socket. Using the original cable in the kit.
Eventually, it will kick back on and charge again, though. And obviously charges significantly faster over USB.

Am I thinking of how this charging from the PMIC is supposed to work? Should it continue to charge until current can’t flow because of equal voltage?

If your solar panel is a 4.5v panel it’s on the low size of the voltage range. What is the VOC of the panel under your indoor light?

My guess is the panels output voltage being low under load may be causing the voltage to drop below the input voltage limits which causes charging to stop. Artifical indoor lighting is not a good representation of the sun, I’ve tried solar panels under 1000w HID lights that are tweaked to mimic sunlight and still it couldn’t compete with outdoor sunlight.

The charging will stop when the battery voltage hits around 4v and then after the battery voltage drops some it will go back into charge mode. You can see this on charging graphs if you send your battery voltage to an online dashboard and graph it out over time.

Sometimes the JST connector for the battery is not tight and needs to be wiggled around to get a better more solid connection for the PMIC charging chip to see the correct battery voltage and to charge quicker.

I would recommend going with a higher voltage 6.5v solar panel since it’s will work better for what you’re trying to accomplish and that’s what most people on here are using successfuly.

So, under these testing conditions, my 4.5v panels are outputting about 4.35v when the Electron is pulling around 100mA. I haven’t seen them drop below that voltage.

But your reply is interesting because that’s where my brain was headed as well. Perhaps there was some imperceptable voltage drop that I wasn’t picking up on my meter (or happened when I look away), so I have also been testing 9v .7w panels.
As would be expected, the 9v panels give less current (below 50mA). But they still exhibit the same behavior.

The really confusing part is that this behavior exists when charging over USB. I would full expect this to be an issue with charging over solar that was a result of fluctuating voltage, but the USB thing has me stumped.

At any rate, it sounds like this is not typical behavior of the PMIC on the Electron. So perhaps I just got a bad batch. I will purchase some more and take another crack at it.

I’ve tested solar extensively and it for sure works great, I was using a 6v panel.

The 9v panel is not in the sweet spot for voltage because the higher voltage gets wasted. The 6v panel will give a strong 4.5-5v output and you can run code that prevents input voltage from dropping below a certain voltage which will keep the voltage of the solar panel from dropping out under loads it can’t support, it’s a cheap version of Power Point Tracking and it does a good job.

Jiggle the JST battery connector and see if that makes charging happen when it’s currently not, could be a loose connection causing the PMIC to see a higher voltage than the battery is really at.

Trying another Electron and battery is not a bad idea, you shouldn’t have any problems.

What is your application if you don’t mind me asking.

1 Like

I will give a 6v panel a try. Thanks for the advice.
Out of curiosity, how do you prevent input voltage from dropping with code? Do you set a minimum on the PMIC? I’ve just started digging into PMIC libraries. I haven’t found much for documentation yet.

I’m just doing the typical solar powered water level checker with an i2c pressure sensor.

Here is some of the PMIC functions that you can run in setup or in other functions.

  power.begin();                                                  // Settings for Solar powered power management

  power.setInputVoltageLimit(4840);                               //Set the lowest input voltage to 4.84 volts. This keeps my 5v solar panel from operating below 4.84 volts (defauly 4360)
  
  power.setInputCurrentLimit(900);                                // default is 900mA
  power.setChargeCurrent(0,0,0,0,0,0);                            // default is 512mA matches my 3W panel
  power.setChargeVoltage(4112);                                   // default is 4.112V termination voltage
1 Like

Sweet. Thanks!

1 Like

sorry @dcliff9 for jaming this question in…

@RWB,

what panels would you recommend… how many amps?

Not at all. It’s all about learning for me, too.

I just bought a half watt 6v. I know I’m a glutton for punishment here but I’m pushing for the minimum limit. I’ll let you know how it goes.

My code sets it’s sleep time on a sort of inverse proportion to the amount of battery the device has. Hoping it reaches an equilibrium over time, even if that means several hours between each loop. It’s actually been working on some of my devices for months near Seattle of all places. I’ve just been trying to eek out every little bit I can. :slight_smile:

These are good for outdoor use and longevity. Expensive but rugged. Good output voltage.

https://www.voltaicsystems.com/solar-panels

I run code that puts the Electron into deep sleep soon as the battery SOC hits 20%. Then it wakes every hour to see if the SOC has been solar charged above 20% before it goes back to sending data regularly. This keeps the Electron from going into a full discharge that has caused some Electrons from losing memory due to Low Voltage Brownout.

Sleeping at 20% gives you about 3-5 days for the solar panel to bring the SOC above 20%. The 20% can be adjusted to any SOC you want via code.

1 Like

Something that may be a factor, is that solar cells are current sources, not voltage sources. They produce current proportional to illumination and, while they have a maximum open-circuit voltage, the voltage will fall off a cliff if your load allows more current to flow than the level of illumination will provide.

What this means for a charging circuit, is that it will see rapidly falling input voltage if it tries to pull more than the panel’s available output current. This may confuse it, if it’s expecting a voltage source (ie. reasonably constant voltage regardless of current - within the limits of the source, of course!). Most supplies, including batteries, are voltage sources.

I would suggest it may be worth ensuring the PMIC chip cannot draw more than the short-circuit current of your panel under whatever you consider minimum ‘normal’ illumination.

1 Like