CC/CV dummy load - Page 1
Forum section: electronics / projects

author: JS
author_rank: Frequent Contributor
timestamp: June 06, 2018, 03:46:37 am
content: Hi, I've designed a constant current and constant voltage dummy load, I'm here to share.The thing has thermal shut down using an LM35 on the heatsink, a comparator with a diode and some hysteresis, it should cut down at about 70ºC at the heatsink and go back up at about 50ºC. The PCB also has all the necessary pin headers for sensing the set and output values, leaving out the voltage reference and the pots, a set signal could be fed via the set pins.Works as constant voltage at the set voltage till it hits the set current when it starts working in constant current, CV can be disabled by removing a jumper (also CC but you shouldn't do that). It uses an IRF540 and a 0.22Ω 2W sense resistor, with the values I selected should be good up to 2.5A CC and up to 30V CV, with the power limitations of the thermal management, haven't fully tested at high power but seems to behave at lower powers at least. Swapping a few resistors the ranges could be adjusted to your needs, the 0.22Ω resistor is quite low for low currents.I run some simulations, I decided to go quite slow on the CV mode as it would minimize the current overshoot when fast voltage step is applied, hence the 10nF capacitor in the loop. If faster voltage control is desired it could be lowered one or two orders of magnitude but current overshoots will be higher, I should play a bit further with the loop compensation to get a faster response and with less overshoot, but as it is seems quite nice for the simplicity of the design.Some low power, real world testing has been done, the circuit behaves as it should. I tested it over the same 9V battery it was running, directly in CC mode it started to oscillate pretty funny but that's probably due to the battery voltage going down as it was loaded. Then I added a 360Ω resistor in series between the battery and the input, CC and CV works as it should.Scope capture, turning down the CV pot (I used log pots for better control in the lower range and because they were in the bin, couldn't find any 10k linear ones of as most of my projects are audio related, might be better for the voltage but I'm happy with the log for the current) Blue trace is the voltage, yellow is current, purple the current after a filter. CC was set to about 20mA (360Ω resistor with a fresh 9V would go up to 25mA)I leave the schematic and a picture of the thing, now it has the ICs installed and the heatsink screwed and greased.Hope you enjoyed it, regards!JS

author: enut11
author_rank: Super Contributor
timestamp: June 06, 2018, 09:08:34 am
content: Congratulations @JS. Very innovative and all done with easy to used linear controls! I like the idea of the log pots. The 10-turn pots that I use are good for fine adjustments but sometimes take too long to change output. Also like the thermal shutdown feature. Well done.enut11

author: JS
author_rank: Frequent Contributor
timestamp: June 06, 2018, 09:19:35 am
content: Thanks, just kind of a toy to have around and test some things, I can scale things up when I need a real one.I'm closer to use a µC than a multiturn pot I guess, single turn pots are ok for rough testing, but if more is needed a µC can offer so much more, do setting and sensing, the option for com, as many features as you are willing to program. I already have a rough code which could very well serve a PSU or a dummy load (set voltage and current, measure both, show calculated power and resistance for now)I tested the µSupply tonight as well, it didn't turned out so well, I missplaced a few components, once that solved, Dave's rev C just doesn't do current limiting, I thought I could get it to work with a rail to rail opamp but not even then. Then I tested using a low side current sensing, worked a treat. I'd just need to bodge a resistor and a jumper wire to compensate the output voltage for the sense resistor and that would be it. I guess it's going in a small box to have as a small PSU at hand, probably just labeled single turn pots to know where it's setted. I was planning to build a bigger and more appropriate one as well but wanted to start small.Having the scope now is soooo much better to do all this things, it would take me days to do the testing I did tonight and even miss quite a few things.JS

author: larsdenmark
author_rank: Regular Contributor
timestamp: June 06, 2018, 09:27:42 am
content: I'm curious: why did you choose the LM358 opamp? Did you consider the LMV358 or LMV358A or something entirely different?

author: JS
author_rank: Frequent Contributor
timestamp: June 06, 2018, 09:41:49 am
content: Quote from: larsdenmark on June 06, 2018, 09:27:42 amI can only source lm358 or tl072 locally, It workswell enough and doesn't need much voltage to work. For the simulations I did, the lower the better (less overshoot) so from a 9V should work till last day of the battery.Also, I wasn't aming for precision but something anyone can build with parts from the bin. The LM35 might be the most expensive part and somehow I have quite a few on the drawer.JSPs The bjt on the schematic is the lm35 and the reference the LM385, 1.24V rather than 2.5V of the LM336.JSEnviado desde mi LG-M250 mediante Tapatalk

author: Kleinstein
author_rank: Super Contributor
timestamp: June 06, 2018, 07:05:48 pm
content: Part of the overshoot problem comes from the LM358 of the regulator that is not active will run all the way to it's positive limit. So it will take quite some time for the regulator to become active. So the cross over from CC to CV and the other way around can be quite slow. Especially the CC to CV transition will be slow. The lower the supply voltage the faster the transition.As shown the circuit might turn unstable in CV mode, if there is a highly capacitive source, or a constant current / high impedance source. It might help to have some resistance in series to the 10 nF capacitor at the CV regulator.The circuit is rather similar to the usual floating lab supply circuits, just without the raw power source. So many of the tricky points from those circuits also apply here. Not having an "output" capacitor makes things tricky.

author: JS
author_rank: Frequent Contributor
timestamp: June 06, 2018, 08:08:47 pm
content: Quote from: Kleinstein on June 06, 2018, 07:05:48 pm@Kleinstein thanks for your comments.I know the overshoot comes from there, but adding a derivative compensation might also help, but hard to get it stable. I intended the current to be faster as the current overshoot is worse for the DUT, over voltage not so much. That would be different in a PS, as both could be bad, hence the simplicity of this.Even with this problem, the current overshoot with this is smaller than the CC mode only, and that scheme (CC only) is widely used on the web.The oscilations I observed were in CC mode, put most likely the bat not capable to handle the current.I want to design a lab PS and this was my first experiment as they are quite similar indeed.JSEnviado desde mi LG-M250 mediante Tapatalk

author: JS
author_rank: Frequent Contributor
timestamp: June 07, 2018, 10:05:36 am
content: New design, simulated really nice, very little overshoot, very stable under various loads and fast!I did add a negative supply so I didn't have to mess with opamp problems, I'll see how I come around it. This might very well end up being a power supply and in that case shouldn't be a problem to have many rails anyway.It was a long night running simulations, I leave you a rough schematic directly from the simulator, I'll make a cleaner one tomorrow and update the pict!JSPS, edited, more readable schematic.

author: JS
author_rank: Frequent Contributor
timestamp: June 07, 2018, 11:03:49 pm
content: Now it's a power supply. Inverted the PS set polarity and referenced to the high side supply. Just 3 extra resistors (and the power source)PSRR isn't great, though. About 25dB for a 100Hz triangular wave as my ripple most likely be, so you might want to start with a clean power source. Any thoughts in how to improve this other than massive capacitance on the power rails? even if not directly on the output this hits a point where isn't practical, and getting it low noise would be THE thing is missing from the circuit.Haven't simulated much about stability on the PSU mode, on the dummy load seemed very nice.One thing I like about this circuit is the possibility of using low voltage opamps to do all the work, and never seeing the high voltage, only the mosfet, output cap and feedback networks see the high voltage. This means it can work up to pretty high voltages even using fixed 12V or something going to the opamps. Feedback networks should be scaled accordingly to accommodate so.Would you give me some negative feedback?JS

author: enut11
author_rank: Super Contributor
timestamp: June 25, 2018, 10:00:16 am
content: Quote from: JS on June 07, 2018, 10:05:36 amHi JS. Interesting design. Would you mind explaining how the Constant Voltage section works? Also, how important is the neg supply in your circuit?I am currently playing with a CC Load and trying (unsuccessfully, so far) to mod it for CV operation. Once I hit the voltage setting the output latches on until I repower everything. So I am trying to understand how CV circuits work.enut11

author: JS
author_rank: Frequent Contributor
timestamp: June 25, 2018, 04:29:19 pm
content: Negative supply is there not to deal with opamp limits, but while some negative voltage is probably needed is not much and using a diode or two between -V and ground could be enough, so generating a 0.7V negative rail.R14 is a pull down, for the CV mode a ref voltage is fed to ic1b as a pullup voltage follower, meaning it will only set the voltage if it's the lower voltage of the three settings. The diode inside tge loop so I don't care about the diode drop.When load current is lower than set current and the thing is running cool voltage set drives IC4C setting the ref voltage. IC4C and the mosfet is a voltage amplifier with a gain of 10. C6, C8 and R23 form a 2 pole one zero compensation, to be fast and stable with different loads. C5 and R12 is a snubber, JP6 a pinheader to measure voltage and current.When over temp is detected by the comparator IC3A goes high turning off the mosfet. When current gets higher than set current IC1A does it's thing. You can think it as a comparator but the cap keep it slower, working like a fast integrator setting an output voltage that makes the current match the set current.Stabilization is tricky, I wouldn't recomend to play a lot with any particular value, ubless knowing what you are doing but the reference section could be tweaked to get the desired ranges, that shouldn't be a problem.JS