Moderators: Dave Moll, Andrew Davie, Steve Anderson
Klaas Robers wrote:If you have 4 series of 5 LEDs, and the max currend for one LED is 25 mA, then for one serie it is too 25 mA and for 4 series (in parallel) it is 100 mA.
I don't know if your PWM generator can easily be installed for 9 bits (or 10 bits) precision.
Klaas Robers wrote:Then I can advice you to control the LED array by CURRENT. That is:
- connect the base of the darlington (yes?) TIP 22 directly to the Arduino PWM output pin,
- you get there a square wave of 0 ... 5V,
- The Darlington needs 2 x 0.7V = 1.4 volt to the emitter,
- so the emitter will go to 5 - 1.4 = 3.6 volt.
- For a current of 100 mA you need a resistor of 3.6 / 0.1 = 36 ohm to ground.
- 36 ohm is two resistors of 18 ohm in series.
- The voltage at the bottom of the LED array may not come as low as 5 volt at full brighness,
- check that with your multimeter while you put a steady 1 to the output pin of the Arduino.
- So you might need at least 24 volt DC as a supply voltage for 5 LEDs in series,
- no need to have this stabilized, 28 volt mean value with ripples is OK.
- The CURRENT is defined by the 5 volt, the TIP22 and the 36 ohm resistor,
- NOT by the supply voltage, as long as it is high enough.
- For 4 LEDs in a row the supply voltage should be 4 x 3.5 = 14 volt + 5 volt = 19 volt, or more.
- So may be, remove one LED from each serie (or short circuit that LED).
Klaas Robers wrote:- For a current of 100 mA you need a resistor of 3.6 / 0.1 = 36 ohm to ground.
- The CURRENT is defined by the 5 volt, the TIP22 and the 36 ohm resistor,
Andrew Davie wrote:It seems that writing to analog pins on the Arduino is effectively changing the duty cycle of a PWM signal on that pin. There's no "voltage adjust" - the pins are just modulated to give the "effect" via PWM. This page discusses the issue and suggests a low-pass filter to convert the PWM signal into an equivalent voltage. So it's essentially smoothing the output by use of a capacitor to reduce the ripple and in effect convert a PWM frequency into a voltage. Choice of capacitor is going to be key. I think I understand that.
So, to drive a LED array with current I believe I need to vary the voltage going to the TIP122 base. That variation in turn allows varying current because the resistance is constant. I think at this stage that's what I need to do; place a "low pass filter" between the arduino analog pin and the TIP122 to convert PWM to a voltage. I should be able to easily change the frequency of the PWM signal, so I'd choose a frequency that made sense with regard to the resolution of the scanline and potential changes. But that relates to the frequency of the signal anyway (~10kHz) so if I chose a (for example) 62.5kHz PWM then I should be fine after "filtering" the PWM back to a voltage. Right?
gary wrote:That would work Andrew but you shouldn't have to do that, it is precisely the changing of the duty cycle that causes the LEDs to vary in brightness, the shorter the duty cycle the dimmer the led and vice versa.
Klaas Robers wrote:You can control the LEDs with PWM, you are then switching them. Then the transfer characteristic is linear, and you cannot change that to quadratic, needed for gamma correction. However you can do gamma correction in software too, matter of a translation table, but then you need to have more bits in the PWM than 8.
gary wrote:The ultimate point is, if you are going to replicate the analogue waveform why not drive the LEDs directly using Klaas' one transistor circuit?
gary wrote:(There would be some benefit in producing test patterns from the arduino however).
Andrew Davie wrote:
Because I need to get the NBTV video signal into the Arduino so that I can process the synch pulses which will give me the ability to do frame lock.
gary wrote:Andrew Davie wrote:
Because I need to get the NBTV video signal into the Arduino so that I can process the synch pulses which will give me the ability to do frame lock.
Well do you? All you really need are the sync pulses themselves, and you don't even need to sample those, all you need to do is detect the leading edges, it's just a matter of counting pulses.
Return to Andrew Davie's Arduino Televisor
Users browsing this forum: No registered users and 4 guests