LED driver dimming - Page 1
Forum section: electronics / beginners

author: Tantalum
author_rank: Regular Contributor
timestamp: August 04, 2019, 09:09:01 am
content: HelloI wanted to dim the led drove by a PT4115 controller. The chip has a DIM input for that purpose.https://people.xiph.org/~xiphmont/thinkpad/PT4115E.pdfAccording to the datasheet it could be done by using a PWM signal or a DC voltage (0-2.5V).QuoteThe pin is internally pulled-up:QuoteUsing a PWM (OC) is ok.Question:How can a DC voltage/signal regulate the brightness of the led, when the DIM pin is internally pulled-up to 5V???

author: Kasper
author_rank: Frequent Contributor
timestamp: August 04, 2019, 05:26:04 pm
content: It is pulled up through a 200kohm resistor. That means it is only lightly pulled up. You can overcome that and pull it down in a variety of ways.If you try connecting various resistors between dim and gnd, you'll see. Resistors between 0 ohm and 200 kohm should work.

author: james_s
author_rank: Super Contributor
timestamp: August 04, 2019, 11:58:02 pm
content: Driving it directly with a microcontroller PWM pin works fine too. 200k is not going to require much current at all, it's just pulled up so you can leave it floating if you don't need dimming.

author: Tantalum
author_rank: Regular Contributor
timestamp: August 05, 2019, 09:30:18 am
content: Yes ok I know, but want to UNDERSTAND how it works in DC mode although it has an internal pull-up restistor to 5V.

author: paulca
author_rank: Super Contributor
timestamp: August 05, 2019, 02:48:14 pm
content: Quote from: Tantalum on August 05, 2019, 09:30:18 amIf you put 2.5V on that pin your circuit will sink a tiny bit of current to hold the pin down at 2.5V. The other 2.5V will drop across the pull up resistor.

author: james_s
author_rank: Super Contributor
timestamp: August 05, 2019, 02:55:24 pm
content: Use Ohms law to calculate it out, 200k is enough resistance that the voltage involved will result in practically zero current being drawn. The pullup resistor is like a thin rubber band, it will stay in place on its own but can easily be stretched with the slightest pull.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 05, 2019, 03:00:00 pm
content: When an MCU pin is an output, it is pulled to +V when high, and to GND when low, using a transistor-based circuit.When an MCU output pin is connected to an input with a pullup resistor, the input will be pulled to GND if the output pin can sink enough current to overcome the pullup.When the MCU output pin is high, the current flows from +V at the MCU output pin, to the other input, and from there to ground. No current flows through the pullup resistor.When the MCU output pin is low, the current flows from +V through the pullup resistor, and to the MCU output pin and ground.You can also model the situation roughly with a resistor divider, by assuming that there is a resistor in series with the MCU output pin. Then, that resistor and the pullup resistor form a voltage divider. Let's say the pullup resistor is R1, and the MCU output pin has resistance R2.When the MCU output pin is high, the two resistors are in parallel to +V, and the input is at +V.When the MCU output pin is low, the two resistors form a resistor divider, and the voltage at the input is V×R2/(R2+R1).For example, if R1is 10 kOhm, and R2is 500 Ohm, then the voltage in the input is V×500/10500 ≃ V × 0.047.This means that the pullup resistor must be weak (high resistance), so that the MCU output pin can overcome it (low resistance), or the voltage in the input will remain too high to ever become low.