PIC Controlled Current Source


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2007
    Posts
    53

    Default PIC Controlled Current Source

    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

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Post

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,935


    Did you find this post helpful? Yes | No

    Default

    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...
    Attached Images Attached Images  
    Last edited by Ioannis; - 29th June 2007 at 10:42.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Default

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,935


    Did you find this post helpful? Yes | No

    Default

    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.
    Last edited by Ioannis; - 29th June 2007 at 11:49.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Wink

    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
    Attached Images Attached Images
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,935


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    ...
    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

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Post

    Hi, Ioannis

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

    no surprise ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Apr 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Thank You

    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

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,935


    Did you find this post helpful? Yes | No

    Default

    OK, thanks. I'll check them out. Glad was of any help.

    Ioannis

Similar Threads

  1. Reducing PIC current to as low as possible...
    By FromTheCockpit in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th November 2009, 04:28
  2. PIC conducting signal current when off
    By Viberer in forum Off Topic
    Replies: 0
    Last Post: - 28th May 2009, 17:27
  3. Mesuring current with pic
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 4th December 2008, 08:06
  4. Replies: 22
    Last Post: - 9th April 2007, 15:25
  5. Replies: 0
    Last Post: - 15th December 2006, 19:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts