Maker Pro
Maker Pro

how to control current digitally?

F

Frank Birbacher

Jan 1, 1970
0
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
 
A

Andrew Holme

Jan 1, 1970
0
Frank said:
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

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.
 
J

John Fields

Jan 1, 1970
0
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?

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
 
F

Frank Birbacher

Jan 1, 1970
0
Hi!

Andrew said:

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
 
Y

yigiter

Jan 1, 1970
0
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
 
A

Andrew Holme

Jan 1, 1970
0
Frank Birbacher said:
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?

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.
 
A

Andrew Holme

Jan 1, 1970
0
John said:
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?
 
K

Ken Smith

Jan 1, 1970
0
Frank Birbacher said:
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.
 
F

Frank Birbacher

Jan 1, 1970
0
Hi!

Andrew said:
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
 
F

Frank Birbacher

Jan 1, 1970
0
Hi!

Ken said:
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
 
K

Ken Smith

Jan 1, 1970
0
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!

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

Frank Birbacher

Jan 1, 1970
0
Hi!

Ken said:
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
 
Top