S
ScottM
Guest
I know I answered this, but it's been a few hours and it hasn't shown
up.
The ULN2003 pulling down on a +12v supply - if the dimmer is to be off,
which is a common state for hours a day, doesn't that put the power
supply entirely across one resistor? Other that that, yes, I think I
like this. It involves parts I understand.
What about this?
+12V
|
|
|
/
5V PWM --[R 1k]--[2N2222]
\
|--------[R?k]------>
| |
R4.7K C1
| |
Gnd--------------+
I'd like to avoid having to run the PWM "upside down", and this way,
the resistor at ground only takes current when the lights are on (less
common than off). But I confess to having no design skills and mostly
getting by with trial and error (which I'm not doing this time because
the parts are too expensive.) And yes, I can tune the PWM to keep the
max voltage to 10v.
As to why the PWM is sometimes "slow" - the PWM generator is a Diamond
GPIO board, with 10 timers which can be configured to produce PWM.
There are two counters, used to manage ON and OFF times, they are 16
bit and they increment at 4Mhz. The worst case scenario (which my
code's not going to allow) would be on for a count of 1, off for a
count of 65535. That's 64 pulses a second. I'm going to aim to keep all
the frequencies much higher than that, in part to avoid any possibility
of flicker and in part because I don't want this part of the circuit to
generate anything in the audio frequency range. But depending on what I
use for on and off, the frequency will vary; for a 50% duty cycle, ON
for 1 and OFF for 1 would be ideal, I'm thinking.
I was also looking at an optoisolator (PS2501) to handle this - but it
looks like they don't like high frequencies.
up.
The ULN2003 pulling down on a +12v supply - if the dimmer is to be off,
which is a common state for hours a day, doesn't that put the power
supply entirely across one resistor? Other that that, yes, I think I
like this. It involves parts I understand.
What about this?
+12V
|
|
|
/
5V PWM --[R 1k]--[2N2222]
\
|--------[R?k]------>
| |
R4.7K C1
| |
Gnd--------------+
I'd like to avoid having to run the PWM "upside down", and this way,
the resistor at ground only takes current when the lights are on (less
common than off). But I confess to having no design skills and mostly
getting by with trial and error (which I'm not doing this time because
the parts are too expensive.) And yes, I can tune the PWM to keep the
max voltage to 10v.
As to why the PWM is sometimes "slow" - the PWM generator is a Diamond
GPIO board, with 10 timers which can be configured to produce PWM.
There are two counters, used to manage ON and OFF times, they are 16
bit and they increment at 4Mhz. The worst case scenario (which my
code's not going to allow) would be on for a count of 1, off for a
count of 65535. That's 64 pulses a second. I'm going to aim to keep all
the frequencies much higher than that, in part to avoid any possibility
of flicker and in part because I don't want this part of the circuit to
generate anything in the audio frequency range. But depending on what I
use for on and off, the frequency will vary; for a 50% duty cycle, ON
for 1 and OFF for 1 would be ideal, I'm thinking.
I was also looking at an optoisolator (PS2501) to handle this - but it
looks like they don't like high frequencies.