Hello all,
I'm working on an LED driver using this chip:
http://www.diodes.com/zetex/?ztx=3.0/product_portfolio@pno~ZXLD1362
The ZXLD1362 from Diodes Inc aka Zetex. The chip has an "ADJ" pin that supposedly allows for dimming via analog or PWM signal.
However, it doesn't look like a typical digital logic-level pin. Instead, it appears that it's a true analog input pin, in that the LED current varies proportionally to the voltage applied to that pin. In other words, it's not as simple as "on" above X voltage and "off" below that voltage.
The datasheet has these relevant notes:
Multi-function On/Off and brightness control pin:
? Leave floating for normal operation.(VADJ = VREF = 1.25V giving nominal
average output current IOUTnom = 0.1/RS)
? Drive to voltage below 0.2V to turn off output current
? Drive with DC voltage (0.3V < VADJ < 2.5V) to adjust output current from
25% to 200% of IOUTnom
? Connect a capacitor from this pin to ground to set soft-start time.
Soft start time increases approximately 0.2ms/nF
Adjusting output current
The device contains a low pass filter between the ADJ pin and the threshold comparator and an
internal current limiting resistor (50k
nom) between ADJ and the internal reference voltage. This
allows the ADJ pin to be overdriven with either DC or pulse signals to change the VSENSE
switching threshold and adjust the output current.
The nominal average output current in this case is given by:
IOUTdc = (VADJ /1.25) x (100mV/RS) [for 0.3< VADJ <2.5V]
Note that 100% brightness setting corresponds to VADJ = VREF. When driving the ADJ pin above
1.25V, RS must be increased in proportion to prevent IOUTdc exceeding 1A maximum.
The input impedance of the ADJ pin is 50k
±25% for voltages below VREF and 14.2k
±25% for
voltages above VREF +100mV.
Another possibility is to drive the device from the open drain output of a microcontroller. The
diagram below shows one method of doing this:
If the NMOS transistor within the microcontroller has high Gate / Drain capacitance, this
arrangement can inject a negative spike into ADJ input of the 1362 and cause erratic operation
but the addition of a Schottky clamp diode (cathode to ADJ) to ground and inclusion of a series
resistor (3.3k) will prevent this. See the section on PWM dimming for more details of the various
modes of control using high frequency and low frequency PWM signals.
My head is spinning. Can I just directly connect this chip's ADJ pin to a PWM pin on an Arduino? Do I need the series resistor and diode mentioned in that last quote?
Also, my understanding is that the Arduino "generates" 5v when a PWM pin is ON. Does this mean I need some sort of voltage divider or other circuit to knock the voltage down to the 2.5v max. this IC is expecting? Forgive my lack of proper terminology, but phrases like "open drain output" and "high gate/drain capacitance" are over my head, so I really don't know how to proceed.