how to control current digitally?

F

Frank Birbacher

Guest
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
 
Can you do PWM?


"Frank Birbacher" <bloodymir.crap@gmx.net> wrote in message
news:2u1hqgF251bujU1@uni-berlin.de...
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
 
Hi!

Andrew Holme wrote:
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
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.

Pulsing is more energy efficient.
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
 
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
 
On Mon, 25 Oct 2004 05:52:56 -0400, "yigiter"
<e.yigiter@denker.com.tr> wrote:

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.
---
Without the base-to-emitter capacitor I've shown in my post it will
surely oscillate at _some_ output current point.

--
John Fields
 
John Fields wrote:
Without the base-to-emitter capacitor I've shown in my post it will
surely oscillate at _some_ output current point.
Isn't it more likely to oscillate with that extra RC, since the op-amp also
has a pole?
 
In article <2u3q23F25ab4fU1@uni-berlin.de>,
Frank Birbacher <bloodymir.crap@gmx.net> wrote:
[...]
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?
If you bit reverse the counter, you will get an easier signal to filter
with the same averages.

--
--
kensmith@rahul.net forging knowledge
 
Hi!

Andrew Holme wrote:
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.
Yes, agreed.

Alternatively, you could compare a DAC output to a triangle or
sawtooth waveform using an analogue comparator if you prefer an
analogue solution.
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
 
Hi!

Ken Smith wrote:
If you bit reverse the counter, you will get an easier signal to filter
with the same averages.
"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
 
In article <2u9iq8F26vvdbU2@uni-berlin.de>,
Frank Birbacher <bloodymir.crap@gmx.net> wrote:
Hi!

Ken Smith wrote:
If you bit reverse the counter, you will get an easier signal to filter
with the same averages.

"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!
I'm not sure you do need to filter. I had imagined the system with an
inductor between the switching stuff and the LED.

--
--
kensmith@rahul.net forging knowledge
 
Hi!

Ken Smith wrote:
I'm not sure you do need to filter. I had imagined the system with an
inductor between the switching stuff and the LED.
Why would that inductor help? Would it smooth the switching?

Frank
 

Welcome to EDABoard.com

Sponsor

Back
Top