Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Display backlight using PIC PWM and MOSFET

Status
Not open for further replies.

Andy2018

Newbie level 4
Newbie level 4
Joined
Jan 21, 2018
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
59
Hi everybody, need little help.

I have a small 1.77" TFT LCD that uses 3.2V / 20mA backlight that I want to have a variable brightness.
Circuit controlled by PIC18F26K40 and n-channel MOSFET 2N7002 (2N7002P,215 Nexperia) with Rds On = 1.6 Ohm.
Device power is regulated 3.45V (can't be changed).

Questions:
Do I need a resistor between PIC and MOSFET gate?
Do I need a current limiting resistor between drain and LCD?

It works now without both, but I want to make sure I will not damage LCD or MOSFET in the long run.
I have jumpers instead of resistors now.
I can put a different MOSFET with Rds On up to 3 Ohm if necessary, not sure if this will help.
 

Without knowing anything about your display, it's ABSOLUTELY IMPOSSIBLE to answer your question. Can your display tolerate 3.45 volts applied to it directly? I sure don't know.

You don't need a gate resistor.
 

I am sorry, I did not provide enough information.
Unfortunately I don't know if it can tolerate 3.45V on the backlight side.

Display is off-brand TFT177F254FPC based on ST7735S driver
It's similar to this:
https://www.adafruit.com/product/618

I have few variations from different vendors and their datasheets, none of them is listed Max backlight voltage.

Here are variations that I see:
3.2V x 20mA
3.3V x 30mA
3.0V x 30mA

After I posted my question, I have connected display 3.3V x 30mA
I tried it with 7.15 Ohm resistor and without.
I have limited PWM duty to 90%.

This is all information that I have.

Thank you.
 

Well, if you don't know, who does? They MAY have a built-in current limiting resistor so that you're allowed to just connect a 3.45 voltage without damage. Maybe not. You should probably just measure the current and convince yourself that you're not over stressing the backlight.
 

Do I need a current limiting resistor between drain and LCD? ...

Usually you will control the brightness not by changing the voltage but by current and you can reduce the current by (i) reducing the voltage applied to the backlight or (ii) by using PWM at constant voltage.

You can use a MOSFET to do either.
 

Usually you will control the brightness not by changing the voltage but by current and you can reduce the current by (i) reducing the voltage applied to the backlight or (ii) by using PWM at constant voltage.

You can use a MOSFET to do either.
Read the original post:
1) OP is using PWM
2) voltage is fixed
3) OP is using MOSFET
 

Thank you for your patience with me.

Here is what I got:

- 3.3V 30mA backlight,
- Zero Ohm drain resistor
- PWM is set to 0.80 duty cycle, 66 KHz Frequency

Measuring current 29.95 mA (calibrated DMM)

From this point, I can gradually reduce PW and current proportionally going down.

Few things I am not sure about:

1. Is measuring current like this accurate since I have 66 KHz pulses 80% Duty. My guess DMM is not fast to see these pulses.

2. Assuming that BL is rated for 3.3 V only, can I clamp PWM at 80% or I should add a 3.4 Ohm resistor and use 100% PWM?

Resistor calculations:

3.45V-3.3V = 0.15V
0.15V/30mA = 5 Ohm
5 Ohm - 1.6 Rds On = 3.4 Ohm

Thank you
 

Hi,

Measuring current 29.95 mA (calibrated DMM)
It seems you want to measure very accurately.
Then you need to know the DMM's measurement method...and the operation of your load (LED).
* in a LED brightness mainly depends on average current
* in a LED the power dissipation mainly depend on average current
(With an incandescent light bulb for example it's not average current, but RMS current)

Thus with a PWM without storage inductance the efficiency is worse than with DC and resistor...
(Brightness to power consumption). But it's only marginal here.

Often good DMMs use true RMS calculation, but for your case you should use average value.
With 80% duty cycle the RMS value is about 9% higher than the average value.

If your aim is just to control the brightness, then everything is fine. The 9% deviation won't harm.
I recommend to reduce switching frequency. No need for 66kHz. 1kHz will be fine. This reduces EMI.

Klaus
 

Just a sanity check:
If I have an LED that is listed 3.3V x 30mA, can I safely connect it directly (no resistor or MOSFET) to a 3.3V power supply and expect 30mA current draw?
Thanks
 

Hi,

I'd not do it.

The 30mA is the expected max operating point.
But the I-V graph is very steep at 3.3V.
Thus a small change in V causes a high change in I.
But V changes.
* it varies with the production lot. Look into the datasheet about the 3.3V tolerance (min max values)
* it changes with temperature
* it may change with time

...and expect that your supply voltage varies, too. With production lot, with time, with temperature, with load...
And what happens to the LED if there is a switch_on_overshot?

--> A LED should be treated as a current controlled device.

And imagine what happens in the other direction:
* when the power supply voltage drops (time, temperature, load...)
* and the (30mA) LED voltage rises
--> your LED wil be dimmed.
It will flicker during operation...and if you have a couple of your devices next to each other everybody will recognize the uneven brightness. This looks like a low cost development.

Klaus
 

can I safely connect it directly (no resistor or MOSFET) to a 3.3V power supply and expect 30mA current...

In principle yes, but even a 1R resistor will get you some peace of mind. They are diode and they are non-linear devices. If you have a cheap power supply it may itself have some internal resistance that will come into play.

It is better to be safe.
 

Thank you everyone for replies.

From what I see, there is a very little brightness difference between 25mA and 30mA.
I will add 7 Ohm resistor plus Rds
That should have about 0.3V drop and limit the current.

I also changed PWM to ~1 KHz and I don't see any difference - thank you for the tip.
 

there is a very little brightness difference between 25mA and 30mA...

It is very difficult to figure out the intensity differences visually (at that level). For the naked eye, that is close to the saturation limit and you cannot make out the difference between 90% and 99% (of the max brightness) just by looking at it.

You can get some idea if you look through a neutral density filter: static sensitive plastic bags make a decent filter. But variations smaller than 10% may appear almost the same visually.
 

You selected a 2N7000 Mosfet. Its "typical" on-resistance is 1.2 ohms when its gate-source voltage is 10V that you do not have. Its max resistance is 5 ohms when the Vgs is 10V.
Its max "threshold" Vgs is 3V when its current is only 1mA. A 2N7002 is slightly better.
If you buy thousands of them then one "might" work with your Vgs of only 3.3V.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top