PDA

View Full Version : PIC Controlled Current Source



Andy Wood
- 29th June 2007, 07:47
Hello Group,

I am wanting to make an adjustable current source within the range of 0-100ma using HPWM. It doesn't matter if the driver is on the high or low side of the load. Load resistance is approx. 20 ohms and the nominal supply voltage is 12 volts. The PWM cannot appear at the output - i.e. it must be smooth DC through the load.

There is probably an easy solution but I just can't see it!

Thanks,

Andy

Acetronics2
- 29th June 2007, 08:00
Hi,

As the current measured has to pass through the variable sensor resistor ...

I only see a voltage generator (PWM well filtered will do it ) followed by a Voltage/current converter ( 1 OPA with the sensor resistor in the feedback loop ... and, of course, a power transistor !!! )

Alain

Ioannis
- 29th June 2007, 10:37
Here are two schematics for the current control. Hope it helps. Also this applies to battery chargers also since the charging can be controlled by the PIC with the help of an LCD/keyboard or PC serial port.

Ioannis

P.S. By looking again the schematic I noticed that the I equation is not very clear. The numerator is R4+R3. Sorry for my writing...

Acetronics2
- 29th June 2007, 11:07
Hi, Ioannis
Hi Andy,

That's it !!!

and remember you'll have to use a real Rail-to rail OPA ... input one is easy to find ( 358,324 ...) ... but the rail to rail output is abit trickier ... ( Ov output is reached @ 0 current output ... if ever reached !!! )

so, it would be convenient to power the power V- of the OPA with a little negative voltage ( -1.2 v would be nice ... and easy ).

a diode or two in series with the Transistor base ??? ... not so good ,Yeah !

... If you want real Zero current ( Vce leakage current ???) ... of course !!!

Alain

Ioannis
- 29th June 2007, 11:45
I think Alain that the 358 and 324 are too far away from the rails.

I would suggest the LMC66x series that are really Rail to Rail, low consumption op-amps. Used them alot. And since the output of the op-amp would always be above ground at least 0,7 volt (Vbe drop), there is no worry about 0 current. It is obtainable (almost!). Enjoy (life, circuits, software, whatever!)

Ioannis

P.S Note that transistor and may be the op-amp might have to be supplied with seperate supply above 5V according to the current you would like to obtain.

Acetronics2
- 29th June 2007, 12:28
Hi, Ioannis

LMC 662 is fine ...

358 and 324 are only able to follow a 0v INPUT ...

I juste reported my own experience with a CdNi home made charger based upon the ICS 1700 ...

The current sources and sinks were designed around a ... LMC660 !!!

but I used Darlington transistors to get rid of Rail-to-rail issues ...

Alain

Ioannis
- 29th June 2007, 13:10
...
The current sources and sinks were designed around a ... LMC660 !!!


Hmm, what a surprise!

The only problem that I had with the LMC66x was with +5V supply and near 5V input. They tend to lock the output like a switch even when they were connected as buffer. With a supply of 6 or more volts from seperate source, everything was just fine.

Ioannis

Acetronics2
- 29th June 2007, 13:26
Hi, Ioannis

If you have a look to the Input common mode voltage range ...

no surprise ...

Alain

Andy Wood
- 30th June 2007, 01:30
Hello Ioannis and Alain,

Thanks for your replies - exactly what I was after. I was having one of those days where I couldn't think straight and I was overlooking the obvious solution.

BTW - I have had success using the TS951/952/954 series of RRIO op-amps. The data sheet states "latch-up immunity", so they may be a suitable device in your application Ioannis. I haven't experienced any problems with them. Pricing and specs are are similar to LMC660.

Regards,

Andy

Ioannis
- 30th June 2007, 18:15
OK, thanks. I'll check them out. Glad was of any help.

Ioannis