+ Reply to Thread
Page 1 of 8
1 2 3 4 5 ... Last
Results 1 to 15 of 119

Thread: Help:Digitally controlled current source

  1. #1
    abicash Newbie
    Join Date
    Feb 2007
    Posts
    173

    Default Help:Digitally controlled current source

    Hello

    I am in the thought process for a new project where one of the modules is to design a Digitally controlled constant current source (50mA-1A in steps of 10mA).
    I am thinking about using the Silab's C8051F021 with a 100ksps sampling rate 12-bit-ADC and 12-bit-DAC.

    I am looking for some starters/pointers on designing the CC Digital control.

    Please help as usual.

    Thanks and regards


  2. #2
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    This has come up before here, with a full circuit no less.

    Digital current source.

    The DAC is fed into a voltage divider that feeds the opamp, as my DAC output was fixed at 5 volts, but if you have a controllable reference you can scale the DAC itself directly without the need for the attenuator.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  3. #3
    abicash Newbie
    Join Date
    Feb 2007
    Posts
    173

    Default

    Hello again Sceadwian

    Thank you so much.I will take a look

    Thanks and regards

    EDIT:

    After taking a look at the ckt I have a few questions (if you may )

    1)If the Load is a short ckt,what is the profile of the current.(i mean whats the response time)..I see you raised a question of frying the LED's

    2)Is it linear over 8bit?
    3) Whats the resolution of o/p current..

    All these q's based on presumption that you built this one...

    Thanks and regards
    Last edited by abicash; 28th April 2009 at 12:42 PM.

  4. #4
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    It's linearity is that of the opamps+DAC (should be nearly perfect)

    The frying the LED was only a theoretical question, I have built the analog version of this (No DAC it uses a POT instead) and it works fine.

    The resolution from a 12 bit DAC at 1amp max current is going to be 240µ amps. At 8 bits it'll be 3ma
    Last edited by Sceadwian; 28th April 2009 at 01:31 PM.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  5. #5
    abicash Newbie
    Join Date
    Feb 2007
    Posts
    173

    Default

    I asked about the frying thing since I am going to use this as a switched (not SMPS) current of set currents for a set time (50msec to 500msec) ...one time only..

    So i was thinking about the response...Will it settle in that time?

  6. #6
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    The settling speed will be determined by the opamp you use and any delay in the feedback loop, though I'm not sure how it'll react to highly reactive loads. What will you be feeding the current into? Actually, as was pointed out to me technically this is a current sink, so what will you be pulling it out of?
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  7. #7
    abicash Newbie
    Join Date
    Feb 2007
    Posts
    173

    Default

    Yes thats the idea ..i mean current sink

    And the load would be a low ohms nichrome wire (1-5ohms)

    I want to give a preset current for a preset time impulse.

    Say if i set it at 50msec for 50mA...the load should get just that.

  8. #8
    MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent
    Join Date
    Mar 2009
    Location
    Utah
    Posts
    2,852

    Default

    Quote Originally Posted by abicash View Post
    ...
    After taking a look at the ckt I have a few questions (if you may )

    1)If the Load is a short ckt,what is the profile of the current.(i mean whats the response time)..I see you raised a question of frying the LED's

    2)Is it linear over 8bit?
    3) Whats the resolution of o/p current..

    All these q's based on presumption that you built this one...

    Thanks and regards
    I reran the sim with a "short" (1mΩ) as a load.

    Note the dissipation in the FET.

    Note that V(s) follows V(c).

    I(R1) {your load} is equal to I(R2) {because FET's gate current is ≈ 0}.

    The voltage divider R4-R3 scales the DAC's voltage to 1V at V(c).

    The linearity is as good as the linearity of the DAC itself.
    With an 8 bit DAC, you would be able to produce 2^8=256 steps. If you need higher resolution, get a 10bit or 12bit DAC.
    Attached Images

  9. #9
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    Why do you want variable current and pulse width?
    You're better off simply PWM'ing the nichrome at the maximum voltage/current you can provide and changing the duty cycle to adjust heating. Losses in the fet are less then, and it's FAR more effcient.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  10. #10
    MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent
    Join Date
    Mar 2009
    Location
    Utah
    Posts
    2,852

    Default

    Quote Originally Posted by Sceadwian View Post
    Why do you want variable current and pulse width?
    You're better off simply PWM'ing the nichrome at the maximum voltage/current you can provide and changing the duty cycle to adjust heating. Losses in the fet are less then, and it's FAR more effcient.
    He will still want something like my circuit unless his primary power supply provides the current limiting. He can do the PWM by loading the DAC with a finite current value followed by a "zero" value at a rate determined by the controlling processor. Reducing the duty-cycle using processor-controlled PWM would proportionally reduce the dissipation in the NFET.

  11. #11
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    I don't get it, the only thing using a variable current source (like the one posted so far) is to limit current, but it DOES NOT limit current, it bypasses it to the FET, it's still used. Straight PWM to a heating element actually reduces power consumption. If it's nichrome wire, it's a heater, the thermal constant of the element will act as a 'low pass' So there's no reason to adjust the current at all, you just adjust the PWM width.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  12. #12
    MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent MikeMl Excellent
    Join Date
    Mar 2009
    Location
    Utah
    Posts
    2,852

    Default

    Ok, lets make up some numbers. Suppose the resistance of his nichrome wire is 0.01Ω. Suppose his primary power supply is 12V. Based on Ohm's law (other thread ), the peak current would be 12/0.01 = 1200A. If you consider the on-resistance of a large NFet, it might add 50mΩ so that would reduce the current to 12/0.06 = 200A.

    Seems to me, you want some current limiting somewhere

  13. #13
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    No. Just pulse the led VERY shortly.
    The power supply itself will limit the current. You're assuming wrongly that a power supply will supply infinite current.
    Last edited by Sceadwian; 28th April 2009 at 05:31 PM.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

  14. #14
    Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent Roff Excellent
    Join Date
    May 2003
    Location
    Idaho, USA
    Posts
    6,721

    Default

    Quote Originally Posted by MikeMl View Post
    Ok, lets make up some numbers. Suppose the resistance of his nichrome wire is 0.01Ω. Suppose his primary power supply is 12V. Based on Ohm's law (other thread ), the peak current would be 12/0.01 = 1200A. If you consider the on-resistance of a large NFet, it might add 50mΩ so that would reduce the current to 12/0.06 = 200A.

    Seems to me, you want some current limiting somewhere
    Our OP said:
    And the load would be a low ohms nichrome wire (1-5ohms)
    Ron


  15. #15
    Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent Sceadwian Excellent
    Join Date
    Oct 2006
    Location
    Rochester, NY U.S.
    Posts
    9,825
    Blog Entries
    1

    Default

    Which isn't bad at all, even worst case (1ohm) that's only 12 watts. Might not even need to heatsink the fet.
    Last edited by Sceadwian; 29th April 2009 at 02:28 AM.
    "Because I be what I be. I would tell you what you want to know if I
    could, mum, but I be a cat, and no cat anywhere ever gave anyone a
    straight answer, har har."

+ Reply to Thread
Page 1 of 8
1 2 3 4 5 ... Last

Similar Threads

  1. source current and sink current measurement in 741 op-amp
    By ureshii_hana in forum General Electronics Chat
    Replies: 6
    Latest: 8th September 2009, 08:51 AM
  2. Voltage controlled current source
    By Analog2008 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 2nd January 2009, 07:54 AM
  3. Digitally controlled oscillator (DCO) design help required.
    By cyberheater in forum General Electronics Chat
    Replies: 37
    Latest: 17th December 2008, 12:06 AM
  4. current drop at lm317 const current source
    By kermit in forum Electronic Projects Design/Ideas/Reviews
    Replies: 9
    Latest: 31st October 2008, 03:36 PM
  5. Analog gauge digitally controlled
    By padu in forum General Electronics Chat
    Replies: 16
    Latest: 16th July 2008, 10:02 PM

Tags for this Thread