News:

;) This forum is the property of Proton software developers

Main Menu

Digitally adjustable constant current source - ideas?

Started by trastikata, Oct 26, 2021, 03:02 PM

Previous topic - Next topic

trastikata

Hi all,

For my home lab I'd like to make an adjustable constant current source with digital control. The constant current output should be up to 20A and I am planing to use one of those Chinese switching power supplies that give out 12V/30A as power supply.

Any suggestions of suitable modern power ICs that can simplify the design or I have to go analog for the control and power part of the design?

John Lawton

I would probably go for analogue for the current source but it would depend on the resolution, bandwidth and noise requirements. This is because I like quiet power supplies, and cheap switching ones aren't like that.

trastikata

It is actually for a small aluminum anodizing project I have at home, so resolution and noise isn't really an issue. For something that I'd probably use only few times I didn't want to complicate things and were looking for a simple solution. 


John Lawton

Quote from: trastikata on Oct 26, 2021, 03:36 PMIt is actually for a small aluminum anodizing project I have at home, so resolution and noise isn't really an issue. For something that I'd probably use only few times I didn't want to complicate things and were looking for a simple solution. 
Well simplicity and switching don't go together :)

For simplicity I'd use a load of LM317 linear regulators in TO-220 package, delivering safely up to 1A each if properly heatsinked. With insulating washers you could use one (large) heatsink for them all. Each device needs a resistor to set the constant current so admittedly a pain to have to adjust all of them together, so maybe just switch in a number of fixed regulators for a specific current and then use one variable current device to fine tune the current.

The datasheet shows how to wire in constant current mode.
https://www.ti.com/lit/ds/symlink/lm317.pdf

top204

I did something similar a few years ago for my copper plating bath.

I used a large MOSFET for the current handling, a very large 0.1 Ohm resistor to measure the current from, and a rail-to-rail Op-Amp acting as a x10 non-inverting amplifier to measure the small voltage across the resistor that represents the current with a very simple Ohm's law calculation. And a small fan to keep them cool. LOL I used the 0.1 Ohm resistor so that it did not waste current and get hot because the resistance is so low, and the calculation was simple because it was a base 10 division of the actual voltage/current. A very simple circuit indeed!

The voltage across the resistor, amplified by the op-amp, is then fed into the ADC of the microcontroller and the PWM's duty is constantly adjusted to keep the current across the MOSFET at the required value, via its Gate. I tried a simple PID mechanism for stability, but it wasn't required and slowed down the initial stabilisation of the current while it was performing its calculations over iterations, and all that was needed was the microcontroller running at 64MHz, and a tightish loop reading the ADC, converting it to volts then current, and altering the PWM output so the current across it is what is set. A type of simple feedback, the same as an analogue circuit, but I could then add other items to the unit. The MOSFET actually acts as a big adjustable rheostat. :-) You may need to use a buffer from the PWM output and the Gate of the MOSFET because they can sometimes draw too much current and pull the pin down if it is controlling larger currents. I used an 8-pin dual Op-Amp, and used one for the amplifier and one for the MOSFET Gate buffer.

I had a rotary encoder to set the size of the board being plated and the current per inch required for the chemistry of the bath displayed on an LCD, and the software automatically calculated and set the current required and the time required for a smooth copper plating of through holes on a PCB. :-)

JonW

If you look carefully its actually very simple and efficient, it uses the same principle as a switching reg but there is no closed loop feedback path to cause instability.  As the load is constant its a simple control loop and should generate very little heat as its efficient.



joesaliba

Quote from: trastikata on Oct 26, 2021, 03:36 PMIt is actually for a small aluminum anodizing project I have at home, so resolution and noise isn't really an issue. For something that I'd probably use only few times I didn't want to complicate things and were looking for a simple solution. 

Trastikata,

Why are you bothering with constant current for anodizing? I know it could be better, but all I used was a 12v car charger which off load gave me 17v. Not the electronic one, the old one with a transformer and a simple rectifier. Current draw will be according to surface area of object, well you know that.

Best solution I found was 16% of 99% pure sulphuric acid and the remaining 84% distilled water.

See images before and after. I got extremely well results, at least for my needs. You can clearly see the difference. The red one was the first one I did for trial.

trastikata

joesaliba, those pics look great. Studying the process, I'd like to have better control which constant current source will provide.

Les, thank you for the idea, simple current feedback through the ADC and PWM should be sufficient.

dr-zin

Constant current will give you better results for plating or electro-polishing.  The LM317 you can try to find, if still made, is the LM317K in a TO-3 case.  It's all metal with 2 mounting holes to bolt it onto a chassis for maximum heat dissipation.  Even then, it is not made for much more current than the TO-220 style.  You will need several in parallel, or one bolstered with a couple of 2N3055 power transistors (also TO-3) to get your 20A.  Could tune using a u-processor controlled digital pot using the aforementioned sub-ohm current sense resistor in series, if you prefer digital control or automation.

John Lawton

The LM317K (STEEL) TO-3 is available from suppliers on findchips.com but for silly money. The LM150 / 350 is a higher current alternative, so you'd not need so many.

dr-zin

Yes, John L., a quick check for stock shows crazy prices.  Obviously the 317K isn't made any more, and suppliers are just gouging industrial businesses who MUST replace existing units in machinery.  I was running off memories from the time when you could pick them up from the corner Radio Shack (Tandy for some) for $3-4.  The 317 in TO-220 case is still around, and the 2N3055 (with 15 Amp Icc) in a TO-3 case can be obtained for $1-2.  There are many circuits on the internet showing how to run 2 or more 2N3055(s) in parallel, using the 317 to control them using a resistor or potentiometer.  Just use plenty of heat sink metal and silicone grease for dissipation protection.  It might help warm your garage or work shed this winter...   :D

atomix


trastikata