Simple voltage cutoff schematic for solar charger, any tips? - Page 1
Forum section: electronics / general

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 04:00:19 am
content: Hi,I'm building a simple circuit to disconnect a 18V solar panel from a 12V SLA once the SLA is charged.The main requirement is that it has to go into a very small plastic case and may receive quite hot ambient temps. 50C etc.So burning off excess solar panel power isn't really an option.eg I tested a simple zener (18V-12V = 4V @ 350mA = 1.4W of heat) and it started to melt the plastic.So I created this circuit to have the panel connected across the SLA only until the voltage hits 14V at which point the pfet opens and disconnects the panel.I would appreciate and tips or bugs you can see with it.-I'm aware I wont get the full power from the panel due to no MPTT, doesn't matter for this. Just needs to be as simple as possible.-I'm aware there will be some slow SLA discharge through R3, R2 if the panel is producing enough voltage to turn on M3 and M1 but not enough voltage to charge the SLA. But that's only 200K across a 30Ah SLA so not of any concern.-D2 zener obviously sets the cut-off point. D3,4,5 are just to protect the fet gates.-The exact part numbers used in the LTSpice schematic are not what i will actually intend to use, just examples for testing.Thanks.LTSpice file attached below if anyone wants it.Green= Current into batteryBlue = power in PFETAqua = Voltage across panelRed = Voltage across battery

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2022, 07:45:20 am
content: Why not use the TL431, or TLVH431, for lower current consumption?

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 08:23:56 am
content: Quote from: Zero999 on April 18, 2022, 07:45:20 amAny solution using a regulator/zener is going to burn off excess energy as heat once the SLA is charged. The tight design constraints wont handle that much heat dissipation.I don't want to go down the DCDC route at this stage, need to get something out quickly to fix a problem.

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2022, 09:00:20 am
content: Quote from: Psi on April 18, 2022, 08:23:56 amThe TL431 can be used as a comparator, which turns off a transistor, thus disconnecting the battery from the solar cell.

author: mikerj
author_rank: Super Contributor
timestamp: April 18, 2022, 09:31:43 am
content: Why not use a basic PWM solar regulator which is designed for this purpose? The lower current (5-10A) devices are very inexpensive, maybe $5.

author: Gyro
author_rank: Super Contributor
timestamp: April 18, 2022, 09:38:47 am
content: Quote from: Zero999 on April 18, 2022, 09:00:20 amYou'd probably need to implement current sensing too for that to work. The battery needs to sit at around 13.6 - 14V for long enough for its charge current to drop off to a low level, otherwise it won't reach 100% charge.In an ideal world, a 14V shunt regulator (TL431 and shunt transistor) would work best for the battery health - hopeless from the heat dissipation perspective of course.EDIT: At an ambient of up to 50'C, thermal compensation of charge voltage is probably a must-have too.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 10:08:17 am
content: I'm beginning to think the easiest/quickest solution it to use a cheap 4pin MCU to control a NMOS load switch based on an ADC reading every 30 sec. But using a MCU for this just makes me sad.The current analog circuit design has some issues with switching speed. Takes too long to move through the transition from on to off and needs a comparator, but as soon as I add a chip I might as well replace lots of it with a MCU can call it a day.

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2022, 10:22:50 am
content: Quote from: Gyro on April 18, 2022, 09:38:47 amThe end of charge voltage should be set higher than the float voltage to ensure it fulling charges.You should set the cut-off voltage to 14.5V.Quote from: Psi on April 18, 2022, 10:08:17 amThat's a reasonable solution. It would make it much easier to add a temperature sensor to make the cut-off voltage temperature dependant. I'd probably do something crude with a switch, case statement, but no doubt the C gurus here will know a better way to do it.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 10:42:50 am
content: The more I think about it the more i like the MCU option. That was until I looked at stock levels of sub $1 MCUs at digikey.

author: Gyro
author_rank: Super Contributor
timestamp: April 18, 2022, 11:03:53 am
content: You could factor in a thermistor adc input then, thermally coupled to the battery.P.S. Splash out and treat yourself to a $2 MCU.

author: Gyro
author_rank: Super Contributor
timestamp: April 18, 2022, 11:12:48 am
content: Quote from: Zero999 on April 18, 2022, 10:22:50 amBy the time you get to 50'C, the cyclic charge voltage would probably a fair bit lower than that. Even with a cyclic charge, you need to allow the current to decay to get to 100%. If you set the end of charge too high then you'll end up with venting SLAs or bubbling flooded LAs as applicable.

author: Zero999
author_rank: Super Contributor
timestamp: April 18, 2022, 04:11:22 pm
content: Quote from: Psi on April 18, 2022, 10:42:50 amHow many do you need?Quote from: Gyro on April 18, 2022, 11:12:48 amThen you need to adjust the cut-off voltage depending on the temperature.

author: SeanB
author_rank: Super Contributor
timestamp: April 18, 2022, 04:47:55 pm
content: Simplest is to use the isolation diode to actually do work, and have your voltage comparator on the input operate a nice beefy MOSFET to short the panel output to ground. Diode isolates the battery from the short, and the panels do not mind running into a short circuit, they are energy limited anyway. Low on state resistance, so low dissipation, and so long as you put a few seconds of delay into the output of the comparator, ie a nice RC delay to a second comparator, with a lot of hysteresis, so the output is going to have to stay in one state or the other for the first one, before the output changes state. Battery gets fully charged, then gets a pulsed charge that compensates if you have any load that pulls charge off it.Comparator and such fed from the battery side, and you can also add in a third comparator, to disconnect the load on low battery voltage as well. Another low Rds mosfet there. Can be done with a small MCU or some low power comparators and some CMOS schmitt trigger inverters, and a TL431 as voltage reference, and some high value resistors to divide down battery voltage to them.

author: floobydust
author_rank: Super Contributor
timestamp: April 18, 2022, 05:11:14 pm
content: Not advocating but there are shunt-regulator solar charge controllers out there, also some just using a relay to disconnect the panel.Why such a primitive charge controller still exists i.e.Specialty Concepts ASC-12:No PWM EMI*Will initiate charging into a dead battery (hear that Morningstar, your crap runs entirely off the battery side). This is important!OP I would only include temperature-compensated charging voltage, add a couple diodes to a TL431 orTLV431(At -3% month self-discharge that's about 1.25mA steady drain.)Power dissipation on a shunt reg at 1.4W is not much for a power transistor or mosfet with a small heatsink. For linear series-pass, it's the same actually when charging full tilt.I think a 8W panel paired with 30Ah SLA is a bit weak for charging, but I'm not sure what sun and ambient temps, load is like for the project.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 09:32:51 pm
content: Yeah, i've been looking at options for driving a N-FET low side switch using a comparator with hysteresis. Which is looking like it should work fine and be small enough to fit in the tight space.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2022, 09:36:02 pm
content: Quote from: Zero999 on April 18, 2022, 04:11:22 pmNot that many. Maybe 1000 a year, but I like to design products using a MCU that digikey/mouser stock at least 30k of, which is getting very hard of late.I just really hate having to redesign a product every few months to use a new MCU, its starting to get annoying.

author: thm_w
author_rank: Super Contributor
timestamp: April 18, 2022, 11:34:33 pm
content: Digikey only has stock of ancient MSP430 and Cypress parts, so I think that methodology doesn't work so well anymore, for MCUs at least.https://lcsc.com/product-detail/ST-Microelectronics_STMicroelectronics-STM32G030F6P6TR_C529330.html

author: nctnico
author_rank: Super Contributor
timestamp: April 19, 2022, 12:06:08 am
content: Quote from: Psi on April 18, 2022, 09:32:51 pmMaybe an NE555 can be used for such a circuit

author: Zero999
author_rank: Super Contributor
timestamp: April 19, 2022, 12:03:00 pm
content: I was thinking of something like this.Part of, or all of R1 or R2 can be a thermistor.It's a crude model so don't take it seriously. CL is the battery, which I know doesn't look like a battery in real life. There's diode to prevent self-discharge, but that's often integrated into the panel.

author: mikerj
author_rank: Super Contributor
timestamp: April 19, 2022, 03:52:54 pm
content: Quote from: Zero999 on April 19, 2022, 12:03:00 pmOnce it's switched off it wouldn't switch on again during the day if the battery voltage drops, though it would (probably) reset overnight. Maybe that's ok for the OP?

author: Psi
author_rank: Super Contributor
timestamp: April 21, 2022, 11:29:18 am
content: Thanks for the circuit.Yeah, it's an option, but i think just disconnecting the panel has more advantages.Most likely using a comparator setup with schmitt trigger to control the fet.Need enough hysteresis so when you cut off charging the voltage doesnt drop enough to turn it back on again

author: snarkysparky
author_rank: Frequent Contributor
timestamp: April 21, 2022, 11:58:40 am
content: https://www.digikey.com/en/products/detail/microchip-technology/ATTINY412-SSNR/8594943Do the MCU route. It's handy when you determine you need more function from the circuit after building.

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 21, 2022, 12:32:55 pm
content: Quote from: mikerj on April 19, 2022, 03:52:54 pmConnect the load on the same side of the MOSFET as the solar panel, then it will supply the load from the panel once full charge is reached.

author: Zero999
author_rank: Super Contributor
timestamp: April 21, 2022, 12:37:31 pm
content: Quote from: NiHaoMike on April 21, 2022, 12:32:55 pmExactly. When it gets dark, the MOSFET's body diode will conduct, allowing the battery to power the load.Quote from: snarkysparky on April 21, 2022, 11:58:40 amQuote from: Psi on April 18, 2022, 09:36:02 pmQuote from: Psi on April 21, 2022, 11:29:18 amWhich is exactly what the circuit I posted does.Do you need to switch the positive side of the panel for any reason?

author: Psi
author_rank: Super Contributor
timestamp: April 23, 2022, 04:18:51 am
content: Quote from: Zero999 on April 21, 2022, 12:37:31 pmSorry, i got confused and thought your circuit was one that shorted out the panel.Yeah, i've been thinking about this and doing some testing but the main problem with the comparator + nfet idea seems to be that it will need quite a bit of hysteresis added.Which is doable, it just makes it more complicated as it probably needs a second opamp to buffer the input so the hysteresis feedback can be added to the comparator without needing a low impedance threshold source that needlessly uses up the battery.Without 1-2V of hysteresis it will oscillate due to the voltage falling as soon as charging stops which turns charging on again.That oscillation will likely settle into a state where the mosfet is conducting 'just' enough to dissipate the unwanted voltage as heat, which is back to the initial problem we're trying to solve.The MCU idea will work great, and is simple.I also like that idea of using a 555 timer that nctnico suggested, maybe somewhat jokingly.Have the voltage cutoff threshold trigger 555 to do a 30sec fet disconnection period repeatedly. Technically it is still charging just a very short pulse every 30sec which is just long enough to retrigger the 555. But i think that is fine. It solves all the problems I can think of, only downside is it needs more parts to setup the 555 compared to using a MCU.

author: Zero999
author_rank: Super Contributor
timestamp: April 23, 2022, 07:26:49 am
content: Quote from: Psi on April 23, 2022, 04:18:51 amIt should disconnect the battery nice and cleanly, without the need for hysteresis. When the MOSFET starts to turn off, the voltage on the solar panel will rise, causing the voltage on the TL431's reference to increase further. This positive feedback results in latching action, disconnecting the solar panel from the battery until the of the day, when it's reset. A night the battery powers the load via the MOSFET's body diode. It might become unstable, when resetting, but I doubt that much hysteresis is required. You really need to test any solution with a real battery, load and panels.Try a feedback resistor between M1's drain and the TL431 reference? That should provide positive feedback, as the TL431 is an inverting amplifier and so is the MOSFET.You'll probably need another resistor between the TL431's output and the MOSFET's gate. I forgot the minimum voltage across a real TL431 will be around 2V, which could exceed its threshold voltage.

author: Zero999
author_rank: Super Contributor
timestamp: April 24, 2022, 02:34:09 pm
content: Quote from: Psi on April 18, 2022, 09:36:02 pmQuote from: Psi on April 23, 2022, 04:18:51 amHow about the ATTINY10? Digi-Key has >50k in stock and they're cheap. The only downside is it only has 4 IO pins, but that should be enough for this application. A thermistor could be used to measure the battery temperature and perhaps a look-up table could be used to simplify calculating the cut-off voltage?https://www.digikey.co.uk/en/products/detail/microchip-technology/ATTINY10-TSHR/2051008

author: Psi
author_rank: Super Contributor
timestamp: April 28, 2022, 02:23:50 pm
content: The constraints put on me for this project have been changed.I can now locate the circuit somewhere else and so burning off the excess voltage as heat is doable. I'll probably just go with an LM317 or similar and a PCB large enough to heatsink it.Thanks for all who helped and put forward ideas.

author: Psi
author_rank: Super Contributor
timestamp: April 29, 2022, 05:25:45 am
content: Out of intertest, D1 is only there for protection from the solar panel being connected backwards, correct?It's not doing anything special other than that?

author: Zero999
author_rank: Super Contributor
timestamp: April 29, 2022, 06:46:26 am
content: I've used that circuit before, in the same application and it works.Yes, D1 can be removed, if you can guarantee the solar panel won't be connected backwards. How much current can the solar cell produce? If it's >1A, use a larger diode, as the LM317 might not current limit until 2.2A.I would also recommend adding a 33V zener diode across U1. I had problems with the LM317 failing, which I put down to lighting strikes and the zener fixed it. Obviously it doesn't protect against a direct strike, but it will suppress shot spikes, capacitively or inductively coupled from a nearby strike.I thought you wanted to vary the battery voltage, depending on the temperature? You could make part of R1 or R2 a thermistor.

author: Psi
author_rank: Super Contributor
timestamp: April 29, 2022, 09:14:17 pm
content: Quote from: Zero999 on April 29, 2022, 06:46:26 amPanel is only 18V 350mA, so no problems spec'ing the diodes.My currently design includes a 36V TVS diode on the battery side to handle any spikes.However I do wonder if that maybe better located between INPUT and OUTPUT, since ADJ to OUTPUT is kind of current limited due to the divider resistors.

author: Zero999
author_rank: Super Contributor
timestamp: April 29, 2022, 09:23:56 pm
content: Quote from: Psi on April 29, 2022, 09:14:17 pmThat's no good. The battery doesn't need any protection. It's the LM317 which needs protecting against spikes.

author: Psi
author_rank: Super Contributor
timestamp: April 29, 2022, 09:26:20 pm
content: Quote from: Zero999 on April 29, 2022, 09:23:56 pmyeah, you're right. Thinking about it more i agree. Needs to be between input and output.