MarkusXL
lvl.4
United States
Offline
|
gpvillamil Posted at 8-9 14:34
And you connect straight to the PWM port?
Do you use power & ground (always on) or signal & ground (controlled through PWM)?
Oh its working pretty well - if you plug it in one way, it's full brightness on all the time, no software control.
Plug it in the other way, PWM = 0% = 90% or better of full brightness, down to 100% = Off with software control. Yeah, it's counter intuitive. But to get close to 4.9 Volts you need 0% duty cycle. At 100% duty cycle your RMS voltage is close to zero. Plug it in the other way to get a solid 5.1V on all the time.
Sadly, the default PWM is 0% so the default for these simple lights is always on, but you can code them to flicker or flash or fade as you like.
At full brightness, they represent a measurable battery drain at almost 330mA at full 5.1V input. That current was also too much for those 1/4 watt resistors so I upped them to a 1/2 watt. They still get a bit warm. Wasted power but this is a cheap and simple circuit.
When I get time I will wire my cheapo o-scope so we can all see the diff between 0%, 50%, 100% |
|