power supply to microcontroller and related electronics through solar panel or battery?

Thread Starter

amitele

Joined Jul 30, 2016
21
Hi,

I am trying to design solar charge controller. Can anyone tell me whether to provide power to microcontroller and other IC, through solar panel or through battery.
I got stuck as If we provide power through solar panel, then how microcontroller will get power during night and if we provide power through 12 volt battery then obviously circuit won't work if battery voltage goes down to 10 volt or less. (INA138 current sensor requires minimum 10 volt to work).

NOTE: Ground for panel and battery is not same. Both the ground are separated by MOSFET switch as MOSFET works as a PANEL reverse current protection.

Can anyone help me on this???
 

nsaspook

Joined Aug 27, 2009
6,255
Obviously you need to power your circuit with the battery if you need 7/24 operation without an external power source. A DC/DC converter with wide input voltage range can provide the needed stable circuit supply voltage and isolation if needed.

Do you mean you're switching the - or + panel wire internally in your charge controller for reverse current protection because the 'Ground' (green on the diagram) connection should be solid on all touchable metal parts of the system even if the -+ terminal are isolated from ground at the panel.

 

Thread Starter

amitele

Joined Jul 30, 2016
21
Obviously you need to power your circuit with the battery if you need 7/24 operation without an external power source. A DC/DC converter with wide input voltage range can provide the needed stable circuit supply voltage and isolation if needed.

Do you mean you're switching the - or + panel wire internally in your charge controller for reverse current protection because the 'Ground' (green on the diagram) connection should be solid on all touchable metal parts of the system even if the -+ terminal are isolated from ground at the panel.

I am switching the -ve panel terminal. the panel ground will be connected to battery ground only when panel voltage is greater than the battery voltage.
So, my question is whether to source circuit (microcontroller etc.) from solar panel or from battery.
Most of the reference circuit i have seen online is sourcing power from the panel end. I am attaching on reference design by Texas instrument. You can very well see that they are providing power to electronic circuit from panel. Similarly there are so many other circuits too online which is doing the same. Please go through the power supply design in tidr393 based schematics. I have also attached snapshot of the part of the circuit and please let me know your finding.
 

Attachments

Last edited:

ArakelTheDragon

Joined Nov 18, 2016
1,264
Noone provides power directly from the panel, there will be spikes and you need a battery in order for your system to work properly and the buttery acts like a buffer, instead of burning the MCU.

You need a "14V" panel, "12V" battery and after the battery you need a regulator for powering the MCU at "5V", you might be able to power the sensor directly, but I dont know, so an "LM7810" might be a good idea. I suggest this circuit: Even if you put a "12V" battery the circuit will not change.
 

Attachments

Thread Starter

amitele

Joined Jul 30, 2016
21
Noone provides power directly from the panel, there will be spikes and you need a battery in order for your system to work properly and the buttery acts like a buffer, instead of burning the MCU.

You need a "14V" panel, "12V" battery and after the battery you need a regulator for powering the MCU at "5V", you might be able to power the sensor directly, but I dont know, so an "LM7810" might be a good idea. I suggest this circuit: Even if you put a "12V" battery the circuit will not change.
I guess you have not gone to the schematic attached in my previous reply to this thread. Obviously i will use some voltage regulator, let it be 7805 or any other low power regulator but my original question was whether to power that regulator (input) through panel or through battery. if i power through regulator then how microcontroller or other relevant electronics will work during night and if i power through battery then there is a current sensor ina138 being used which require minimum 10 volt to operate and if the battery voltage goes down to let say 10.5 volt then regulator won't function and hence the problem will arise. hope you understand my point.
 

ArakelTheDragon

Joined Nov 18, 2016
1,264
I guess you have not gone to the schematic attached in my previous reply to this thread. Obviously i will use some voltage regulator, let it be 7805 or any other low power regulator but my original question was whether to power that regulator (input) through panel or through battery. if i power through regulator then how microcontroller or other relevant electronics will work during night and if i power through battery then there is a current sensor ina138 being used which require minimum 10 volt to operate and if the battery voltage goes down to let say 10.5 volt then regulator won't function and hence the problem will arise. hope you understand my point.
I understand, I saw your schematic, but you need a battery no matter what. If you dont use a battery you will need a capacitor to filter the spikes and the "high-low" production depending on the sun light (if your panel is unmovable). Otherwise the whole current produced will go into the load (MCU and etc.) and the load might burn.

The battery will be charged to "14V" about (assuming that its a car battery), depending on the battery, if it gets discharged to "10.5V" than you will need a new battery! At "11V" its considered deeply discharged. I dont know how much current you will drain from this battery so it might be a different one, but normally you can buy and old accumulator from a junk yard and use it for holding a charge 1 day.
 

Thread Starter

amitele

Joined Jul 30, 2016
21
I understand, I saw your schematic, but you need a battery no matter what. If you dont use a battery you will need a capacitor to filter the spikes and the "high-low" production depending on the sun light (if your panel is unmovable). Otherwise the whole current produced will go into the load (MCU and etc.) and the load might burn.

The battery will be charged to "14V" about (assuming that its a car battery), depending on the battery, if it gets discharged to "10.5V" than you will need a new battery! At "11V" its considered deeply discharged. I dont know how much current you will drain from this battery so it might be a different one, but normally you can buy and old accumulator from a junk yard and use it for holding a charge 1 day.
Hi,
I understand your point but i am already using battery in my project and using multiple filter capacitor too in parallel to the panel. Can you please go through the schematic, the one which i have attached and let me now whether texas instrument based design have used the power source through panel or through battery. I agree with you and "nsaspook" but i got confused after seeing the reference design of texas instrument.Can you please let me know whether they have sources from panel end or from battery end. May be i have done some mistake while reading the schematic. According to me they have sourced from panel and not through battery. Please correct if i am wrong.
 

ArakelTheDragon

Joined Nov 18, 2016
1,264
I know I am blind, but I couldn't see anything on the circuit, only "J1" connectors.

As for the combiner box, that may be missing the battery, but the battery is used.
Normally its like this:
Solar panel, maybe regulator, battery, invertor.
 

dendad

Joined Feb 20, 2016
2,977
It seems odd to switch the -Ve side. That makes it harder to measure the battery volts and the solar panel volts. If it were me, I'd have the solar panel and battery -Ve connections commoned together and do all the switching on the +Ve lines.
You need to have a common connection between the solar panels, battery and processor otherwise you will have to do some trickey stuff like commoning all the +Ve lines, and having various -Ve levels. It will work, but it is normal to common the -Ve side.

And As the processors normally run on 5 V or 3.3V via a regulator, it will not matter much if the current sensor needs 10.5V as you should turn off the load long before the battery gets that low to protect it. But as far as I can see, the INA138 will be running on the 5V or 3.3V (processor) supply, not 10.5V anyway. That is how I use them. Maybe I'm missing something but I don't see where you got the 10.5V from. The data sheet says 2.7V to 36V.
And you need to source the control power from the battery so you can have a disconnect of the load when the battery gets below the minimum voltage. If you don't have this control function you can easily kill your battery by over discharging it, so the processor needs to be powered all the time so it can monitor the battery and turn the load off.
 
Last edited:

Thread Starter

amitele

Joined Jul 30, 2016
21
It seems odd to switch the -Ve side. That makes it harder to measure the battery volts and the solar panel volts. If it were me, I'd have the solar panel and battery -Ve connections commoned together and do all the switching on the +Ve lines.
You need to have a common connection between the solar panels, battery and processor otherwise you will have to do some trickey stuff like commoning all the +Ve lines, and having various -Ve levels. It will work, but it is normal to common the -Ve side.

And As the processors normally run on 5 V or 3.3V via a regulator, it will not matter much if the current sensor needs 10.5V as you should turn off the load long before the battery gets that low to protect it. But as far as I can see, the INA138 will be running on the 5V or 3.3V (processor) supply, not 10.5V anyway. That is how I use them. Maybe I'm missing something but I don't see where you got the 10.5V from. The data sheet says 2.7V to 36V.
And you need to source the control power from the battery so you can have a disconnect of the load when the battery gets below the minimum voltage. If you don't have this control function you can easily kill your battery by over discharging it, so the processor needs to be powered all the time so it can monitor the battery and turn the load off.
Yeah you are right i am really facing problem in finding the correct solution to measure panel voltage and battery voltage as the ground are not common. I Guess i have to switch from the positive side as you said and yes it was my mistake that i mentioned about INA138. It is not INA138 that requires 10 volt minimum but it is IRF2104 MOSFET driver IC that requires it. Anyway your answer seems to be the correct explanation of all my worry. Thank you for this.

I thought to choose negative side switching because i can use N channel MOSFET with minimum component as a reverse current protection. If i go for positive side switching i have to use P-MOSFET (with minimum component) whose ON resistance is comparatively more then N-mosfet and hence it affects efficiency and more power loss. If i use N-MOSFET at positive side then i have to use additional component in that case. what do you suggest, which one is better ??. whether to go for N-MOSFET or P-MOSFET for positive side switching of panel. Does the same circuit holds good for LOAD switching (cut off) as well.

Do you have any solution to measure both the battery voltage and panel voltage while keeping negative panel switching. I am attaching the screenshot. Can you verify whether this solution will work. Here panel and battery negative is separated by a MOSFET DRAIN and SOURCE but the drain and source are at common platform with the help of p type BJT. Don't know whether it will work for sure, i got this method from the internet long back but not able to remember the source. Hope you can put some thought on this if possible.

Thank you so much for your time and reply. It really helped me.
 

Attachments

dendad

Joined Feb 20, 2016
2,977
Measuring the battery volts will be ok as the controller must be permanently connected to the battery and only the load is switched.
One way to read the solar power volts would be to switch the FET on first then read the volts.

To use N MOSFETs to switch the +v side, a boost gate supply could be made to supply drive volts above the system voltage level.
Or you could use a relay to do the switching.

On your circuit, the SP is connected to power ground. That will not work as it will bypass your switching. It is a bit hard as only part of your circuit is shown bt I would assume power ground is connected to your load and battery??
 

splud

Joined Jun 30, 2013
12
I am trying to design solar charge controller. Can anyone tell me whether to provide power to microcontroller and other IC, through solar panel or through battery.
I got stuck as If we provide power through solar panel, then how microcontroller will get power during night and if we provide power through 12 volt battery then obviously circuit won't work if battery voltage goes down to 10 volt or less. (INA138 current sensor requires minimum 10 volt to work).
I haven't reviewed your design, but would like to offer some thoughts nonetheless:

1. Presuming "battery" means one specifically for the controller, and not simply switching to run off of the managed battery, a battery will eventually need replacement, and/or could fail in a damaging way. Different chemistries will necessitate different charge circuits.
2. If your solar charge controller is charging connected batteries (which is what a charge controller should be doing), and you have need to continue to run logic (say for monitoring battery draw) for an extended period after loss of solar, you could automatically switch between solar and battery for driving your uC, and your uC could ride out the switchover with a capacitor (doesn't even need to be an ultracap). Bear in mind that your charge controller is then a load on the battery.
3. Depending upon total current demand for for the uC, you could use one or more ultracaps. I can hear someone groaning, but fact is, if you are not running external loads (LEDs, motors, sensors), a fairly small ultracap will have no trouble driving a small uC, especially if you make use of low power and sleep modes. Charging a cap is trivial compared to batteries.
4. In the absence of solar, what purpose does the current sensor serve? Are you measuring current from the solar, or discharge from a connected battery bank? If the uC can determine that the solar isn't providing power, it could power off the current sensor (or if the current sensor can handle low Vcc, but simply doesn't operate, ignore it).
5. Rather than a linear regulator, consider a switchmode regulator.


The first generation of a microinverter product produced by a former employer of mine ran all the logic off of the mains side, permitting communications (including device firmware upgrades) during the night, but they were then a constant parasitic load (albeit very small). Subsequent generations powered all the logic off of the solar side, so no sun, no comms. Due to capacitor buffering in them (not ultracaps), the uC was capable of continuing to operate for a good 15 seconds after total loss of power (like unplug the module, not just cloud cover).
 
Top