0
\$\begingroup\$

I'm trying to control the back-light of a TC1602A-09T 16X2 Character LCD by using an output pin on a Teensy 3.2 microcontroller. This is the circuit I have at the moment:

enter image description here

The LED- pin would be connected to the backlight ground pin of the LCD and it would be pulled to ground via a signal from the teensy microcontroller. R1 limits the current into the base of the NPN transistor while R2 will pull the base to ground when the backlight should be off. My question is about R3. I put R3 into the circuit so that the LED- pin on the LCD would not be floating when Q1 is turned off. Is this necessary to do? Is there any harm in just leaving the pin floating?

Regardless of whether or not R3 is necessary in this particular application, I was trying to determine what the best value of R3 should be such that the power dissipated through it when Q1 is on would be at a minimum. Using the data I obtained from LTspice I created this graph:

enter image description here

LTspice clearly shows that the higher the resistance value, the lower the power dissipated in the resistor. If this is the case, is there any reason not to choose the highest value resistor that one can get in order to minimize power consumption? Are there any other considerations when choosing a pull-up resistor that help in determining the correct value of the resistor?

\$\endgroup\$
1
\$\begingroup\$

The datasheet clearly states that the LED+ and LED- signals are a direct connection to the LED. The LED is rated at 30mA maximum.

There is NO current limiting provided in the display module and you need to do this externally.

  1. The LED Vf is stated as 3.2V (+/-0.15V), so trying to drive it with 3V is likely to produce variable results ….either too dim or burn out the LED due to overcurrent. It's hard to say what would happen, but likely due to the saturation characteristics of the transistor you show it will be too dim.

  2. You CANNOT connect the LED directly to a 5V supply since there is no current limit. You must provide this externally.

If the Vf for the backlight LED is 3.2V (+/-0.15) this gives you the range of Vf …. 3.15V - 3.35V. If it's on the high end, it simply won't work on a 3.3V system (or be very dim). If it's at the low end then you need to drop 0.15V at 30mA for full brightness which would require a series resitor of 5 Ohms. To adjust the backlight you either need current control or PWM (with PWM being much easier).

I'd suggest as shown below you use 5V to drive the LED and use a PWM via a FET to set the backlight brightness. If you don't want to use PWM then you'd have to select R1 to set the LED current.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

From the datasheet, the LED is not a logic control input, it is direct power supply pins to the internal LED(s). So, getting rid of R3 is not an issue.

R3 probably does not serve any purpose in this circuit, anyways. When the transistor is cut-off, being a non-linear device by itself, the LED itself is turned off. Hence, R3 does not serve any purpose. When the transistor is driven to saturation, the LED is turned on, and R3 is just in parallel with the LED. serving no purpose.

On the pull-up question, you generally need pull-up usually only on logic pins or pins that have a defined behaviour that is unwanted when floating. The selection of pull-up value depends upon the leakage current on the pin being pulled-up. It could be obtained from the manufacturer's datasheet.

\$\endgroup\$
  • \$\begingroup\$ This answer is just plain wrong, There is no attempt to set the current limit for the LED. You are likely to damage the LED if you use this answer. \$\endgroup\$ – Jack Creasey Dec 20 '18 at 4:56
  • \$\begingroup\$ @Jack Creasey The answer addresses the very questions asked very specifically: "is there any reason not to choose the highest value resistor that one can get in order to minimize power consumption? Are there any other considerations when choosing a pull-up resistor that help in determining the correct value of the resistor?" The question is not about how to control the backlight. Instead about pull up resistors and power consumption. \$\endgroup\$ – Vasu Jan 9 at 7:36
  • \$\begingroup\$ Yes there are other considerations. The first being that you NEED current limiting for the LED so removing or adjusting the value of R3 does absolutely nothing. The OP clearly did not understand the display configuration. Folks asking questions on this forum don't necessarily understand the whole problem they have. They depend on the experience of those on the forum to fill this gap. Telling the OP when a pull up resistor is needed in this case was absolutely no help to solving the fundamental issue. It's presence or absence made no difference. \$\endgroup\$ – Jack Creasey Jan 9 at 18:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.