Author Topic: LED driver dimming  (Read 1924 times)

0 Members and 2 Guests are viewing this topic.

Offline TantalumTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: 00
LED driver dimming
« on: August 04, 2019, 09:09:01 am »
Hello

I 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.pdf

According to the datasheet it could be done by using a PWM signal or a DC voltage (0-2.5V).
Quote
dedicated DIM input accepts either a DC voltage or a
wide range of pulsed dimming. Applying a voltage of
0.3V or lower to the DIM pin turns the output off

The pin is internally pulled-up:
Quote
The DIM pin is pulled up to the internal regulator (5V)
by a 200KΩ resistor. It can be floated at normal
working.








Using 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???




 

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 793
  • Country: ca
Re: LED driver dimming
« Reply #1 on: August 04, 2019, 05:26:04 pm »
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.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: LED driver dimming
« Reply #2 on: August 04, 2019, 11:58:02 pm »
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.
 

Offline TantalumTopic starter

  • Regular Contributor
  • *
  • Posts: 92
  • Country: 00
Re: LED driver dimming
« Reply #3 on: August 05, 2019, 09:30:18 am »
Yes ok I know, but want to UNDERSTAND how it works in DC mode although it has an internal pull-up restistor to 5V.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4364
  • Country: gb
Re: LED driver dimming
« Reply #4 on: August 05, 2019, 02:48:14 pm »
Yes ok I know, but want to UNDERSTAND how it works in DC mode although it has an internal pull-up restistor to 5V.

If 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: LED driver dimming
« Reply #5 on: August 05, 2019, 02:55:24 pm »
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.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7195
  • Country: fi
    • My home page and email address
Re: LED driver dimming
« Reply #6 on: August 05, 2019, 03:00:00 pm »
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 R1 is 10 kOhm, and R2 is 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf