Connect with us

how to control current digitally?

Discussion in 'Electronic Design' started by Frank Birbacher, Oct 24, 2004.

Scroll to continue with content
  1. Hi!

    I just ordered the IOWarrior (
    http://www.codemercs.com/IOW40KIT_E.html ) for 32bit IO at USB
    port. I want to attach some 1Watts LED to it, so that I can
    adjust their intensity. I want to control three different colors
    independently. I thought of three 8bit DAC. But I don't know how
    I can control the intensity. I think the intensity of the LEDs is
    determined by the current throu them. But the DAC only gives some
    voltage. Now since LEDs are not U=I*R, how can I use a DAC to
    control the current throu the LEDs?

    Or do I need something else? Maybe I should pulse the LEDs?

    Frank
     
  2. Andrew Holme

    Andrew Holme Guest

    Pulsing is the way to go. Try http://www.google.com/search?q=pwm+led+dimmer
    Also http://www.atx-netzteil.de/pwm_mit_ne555.htm

    To control current, you need a voltage-controlled current source. This
    usually involves placing a transistor and current sensing resistor in series
    with the load. The transistor is controlled by a negative feedback loop
    which compares the voltage across the resistor with a control voltage which
    could be fed from a DAC. Here's an example using a pot
    http://radiolocation.tripod.com/LEDdimmer/LEDlampDimmer.html

    Pulsing is more energy efficient.
     
  3. Jeff

    Jeff Guest

    Can you do PWM?
     
  4. John Fields

    John Fields Guest

    V+
    |
    [LED]
    |K
    +---+ |
    COLOR1>--/8---|DAC|----|+\ C
    +---+ | >--[R]--+--B
    +--|-/ | E
    | [C] |
    | | |
    +-------------+---+
    |
    [R]
    |
    GND



    V+
    |
    [LED]
    |K
    +---+ |
    COLOR2>--/8---|DAC|----|+\ C
    +---+ | >--[R]--+--B
    +--|-/ | E
    | [C] |
    | | |
    +-------------+---+
    |
    [R]
    |
    GND


    V+
    |
    [LED]
    |K
    +---+ |
    COLOR3>--/8---|DAC|----|+\ C
    +---+ | >--[R]--+--B
    +--|-/ | E
    | [C] |
    | | |
    +-------------+---+
    |
    [R]
    |
    GND
     
  5. Hi!

    I looked at it. How am I supposed to replace the poti by dac? So
    far the circuit posted by John Fields seems simple. It controls
    current.
    Ok.

    An idea of mine:
    What about having a 8bit counter counting endlessly at some
    frequency >1kHz. Then have 8bit comparator for each channel
    compare the counter to the register of IOWarrior. If the count is
    less, then turn on the led (via transistor), otherwise turn it
    off. This seems simple pwm. Is this an alternative?

    Frank
     
  6. yigiter

    yigiter Guest

    if you want to control current digitally, you can use a voltage controlled
    current source. you can find a drawing at
    http://paralleltransistors.com/drawings/ed0-2_fin.jpg
    as it explains, you can use a lot of stage to increase the current. but i
    think the only one stage is adequate for you. i hope it will be useful for
    you.
    Erkan
     
  7. John Fields

    John Fields Guest

     
  8. Andrew Holme

    Andrew Holme Guest

    That would work. You may get extremely narrow glitches on the
    comparator output when the bits change but it doesn't matter in this
    application.

    Alternatively, you could compare a DAC output to a triangle or
    sawtooth waveform using an analogue comparator if you prefer an
    analogue solution.
     
  9. Andrew Holme

    Andrew Holme Guest

    Isn't it more likely to oscillate with that extra RC, since the op-amp also
    has a pole?
     
  10. Ken Smith

    Ken Smith Guest

    If you bit reverse the counter, you will get an easier signal to filter
    with the same averages.
     
  11. Hi!

    Yes, agreed.
    Isn't this more expensive? As I observed so far, DAC are
    expensive (4EUR) compared to counters/comparators (1EUR each).
    Did I just read the wrong pricelists? And how do I generate a
    sawtooth waveform? I think I'll stick with the counter.

    Frank
     
  12. Hi!

    "easier to filter"? Why do I need to filter? What does "filter" mean?

    Well, the high/low-periods will change more frequently if I
    reverse the bits. I think I'll do this. Good idea, Thanks!

    Frank
     
  13. Ken Smith

    Ken Smith Guest

    I'm not sure you do need to filter. I had imagined the system with an
    inductor between the switching stuff and the LED.
     
  14. Hi!

    Why would that inductor help? Would it smooth the switching?

    Frank
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-