[solved] 3.5" TFT LCD Shield Backlight control ?

I've recently bought a display 3.5" TFT LCD Shield for Arduino Uno/Mega (controller: ILI9481).

I used this supplier:

but it looks also like this:

It appears to me that there is no backlight control, either through software or hardware. Neither is there a comprehensive schematic for either the screen part or for the circuit board. The controller chip, the ILI9481 does, however, appear to be well documented.

Anyway, what I am hoping is that it is possible to disconnect the backlight leds at the 24 pin socket on the board, to which the screen is attached by ribbon cable. The pins numbered 1 to 6 look the most promising, with pins 1 & 3 being visibly connected to ground and pins 2,4 and 5 being connected together. If so, then I would use an appropriate transistor and PWM to regulate the light.

Of course, I am aware that this exercise would be hopeless if the backlight leds and the controller share both a common ground and common Vcc the wrong side of this connector.

Before I start experimenting and unsoldering pins etc to see what happens, I'd be happy to hear from anyone who has any comments about this or the best way to proceed.

20170720_152737.jpg

20170720_152816.jpg

Edit:
I also found this picture which appears to imply you may be able to make a neater job by making 2 cuts on the board without disturbing the 24 pin connector. Cut the 2 visible traces to connector pin 1 at the point above the "1" on the silk screen and to the left of the chevron "<" then make your connection to the pad of the connector. Before making the connection, check with a meter (or by confirming that the back light no longer works) that pin 1 is really then isolated from the ground plane.

20170720_152737.jpg

20170720_152816.jpg

I can partially answer my own question.
There is a pinout for the connector in a customer question about this device: https://forum.banggood.com/forum-topic-178260.html

So it now looks quite straight forward. I've only to decide whether I use a high side or a low side transistor to control the PWM.

I finally succeeded in getting the backlight controlled by pwm.

I hacked into the cathode connection to the backlight led (pin 1 on the connector) and made a tiny patch board out from a fragment of vero board with a pair of header pins soldered horizontally. This assembly is glued onto the top one of the bus control chips.

One header pin is connected to the backlight cathode, the other to ground. I have the option of shorting the two pins with a jumper, or for PWM control, using an npn transistor (2n3904) with a 1k base resistor to ground the cathode.

I use pin 10 on the arduino which is free because I'm not using the SD card. It is not a pretty sight but it works fine.

If you do tackle this, I suggest you detach the ribbon cable and practice first on pin 24 (which is not used) and be prepared for some very delicate work.

20170721_224847.jpg

Hi, what about display without 24pin connector?


Is resistor R1 used for backlight?

JumalIO:
Hi, what about display without 24pin connector?


Is resistor R1 used for backlight?

A good question. The chances are good in that I can hardly imagine what else it could be used for. What is its value ? Measure it with a multimeter and also state what is written on it.

While you are at it with the multimeter, attempt to discover if one end of the resistor is connected directly to Gnd, 3.3v (the middle pin of the regulator) or 5v

I attempted to find another picture of the same thing and found this. It could be the same, but it is still not possible to draw any firm conclusions.

You will need to check for yourself. R1 is probably 2R0. With one side connected to AMS1117-3.3 output pin. And the other side connected to backlight anode.

So you could remove R1. Connect a PNP transistor via an appropriate series resistor to the backlight anode. e.g 47R for 5V PWM or 2R0 for 3.3V PWM.

I can understand a backlight off switch for battery applications. It seems pointless for anything mains or USB powered. A5 is available as a digital GPIO pin for backlight on/off.
If the backlight is too bright with R1 = 2R0 replace with a higher value resistor.

Untested.
These Blue shields seem to be properly designed i.e. LVC245, AMS1117. I would not alter them.

The Red "mcufriend.com" 3.5 inch shields have no AMS1117 and use HC245 which means that they will damage Uno or Mega2560.

David.

Yes, R1 is 2R0.

Its connected to AMS1117 Vout pin:

Yes, backlight is too bright for me, so would like to control it. At day time it might be ok as is.

If you want just 2 brightness levels, you could connect 2 resistors in series, something like:

+5V ---> R1 ---> R2 ---> back light side of original 2 ohm resistor pad .

R2 would be the *47R suggested by @david_prentice , balanced for day time viewing.
R2 + R1 together would be balanced for night time viewing.
You'd use a PNP transistor to bridge R1. ( *R2's value may have to be adjusted to compensate for the 0.7v voltage drop across the transistor.)

For daytime viewing, the transistor is switched on and, for night time viewing it is off.

This way, you don't have to work with some home made PWM on one of the few arduino pins such screens leave you with.

david_prentice:
. . .
These Blue shields seem to be properly designed i.e. LVC245, AMS1117. I would not alter them.

The Red "mcufriend.com" 3.5 inch shields have no AMS1117 and use HC245 which means that they will damage Uno or Mega2560.
. . .

I guess you mean: "will be damaged by a (5V) Uno or Mega2560."

No, I mean that the shield backlight current will damage the wimpy 3.3V regulator on Uno or Mega2560.

The HC245 are not input voltage tolerant. So 5V logic will drive current through the substrate diodes i.e. the regulator output line will be pulled above 3.3V

So the screen controller chip is damaged by the HC245.

Basically the Mcufriend pcb is crap. At least for 5V Uno, Mega.
A Zero, Due, Teensy, ... will be fine. Because they have bigger 3.3V regulators and 3.3V logic.

These comments apply to current Red 3.5 inch shields. You can read the 3.3V pin with the ADC if you link to A5 pin.

David.

david_prentice:
No, I mean that the shield backlight current will damage the wimpy 3.3V regulator on Uno or Mega2560.

The HC245 are not input voltage tolerant. So 5V logic will drive current through the substrate diodes i.e. the regulator output line will be pulled above 3.3V

So the screen controller chip is damaged by the HC245.

Basically the Mcufriend pcb is crap. At least for 5V Uno, Mega.
A Zero, Due, Teensy, ... will be fine. Because they have bigger 3.3V regulators and 3.3V logic.

These comments apply to current Red 3.5 inch shields. You can read the 3.3V pin with the ADC if you link to A5 pin.

David.

OK. Thanks. That all sounds quite grim.

I would like to add that I tried to put an opto-coupler [Sharp PC817] controlled via a PWM pin on the Arduino together with the original 2R0 resistor in place of the original 2R0 resistor on above blue TFT shield. This resulted however in a rather dark maximum brightness.

Thus instead I chose to just use the PWM signal from the Arduino directly, current-limited using a 50 Ohm resistor instead of the on-board AMS1117. I.e. I removed R1 [2R0] and isntead wired 50 Ohm from a 5V PWM pin to the backlight anode directly.
Up until now this is working quite well.

Opto-couplers are a bit crap. You would never achieve 2R0.

PWM sounds ok but defeats the object of having a shield intimately connected to the Uno.
And you have probably lost an SPI pin in the process.

David.

I found this, which is presented as the specification of the TFT screen for these display modules.
http://www.lcdwiki.com/res/MAR3501/QD-TFT3502%20specification_v1.1.pdf

It includes the parameters for the backlight. It is a 12 element array of diodes with a Vf of 3.2 volts and a total current consumption range 90mA (typical) to 120mA (max).

An Arduino pin should not be used to drive these directly at anything approaching full brightness. A transistor, say 2n3906 (pnp) or 2n3904 (npn) would be Ok depending on whether you are driving it on the high side or low side. If you are driving on the high side at 5 volts from a 3.3 volt Arduino pin, you’d need both an npn and PNP Transistor.

For Backlights with typical Vf = 3.2V and different operating voltages:

(3.3V - 3.2V) / 2.0R = 50mA

(3.5V - 3.2V) / 2.0R = 150mA
(3.6V - 3.2V) / 2.0R = 200mA

The PDF shows that the Backlight spec has minimum Vf=3.0V and maximum Vf=3.6V
(3.3V - 3.0V) / 2.0R = 150mA

This shows that there can be massive variations in Backlight current.

sbielkind is using 5V PWM with a 50R series resistor:
(5.0V - 3.2V) / 50.0R = 36mA

PWM via an external PNP drive transistor should be possible. But you will probably choose a smaller series resistor e.g. 22R

(5.0V - 3.2V) / 22.0R = 82mA

I still reckon that most applications would be happy with a fixed daylight and a fixed night-time setting e.g. 90mA and 20mA

David.

A 2 Ohm "current limiting" resistor at 3.3volts is a very blunt instrument. The notes on the datasheet say limit current in preference to voltage but the manufacturers of these cheap boards won't have too much patience for this sort fussing over small details.

Incidentally, that datasheet came from here: LCD wiki . It is not very clear who lies behind it, but it does appear to have a lot of schematics and PCB designs for these screens, albeit for an ancient design suite, Protel. I found these labels in some sample files I looked at:

Protel for Windows - Schematic Library Editor Binary File Version
Protel_Advanced_PCB_Library|VERSION=3.00

I tried an online viewer for Altium which, apparently, took over Protel about 20 years ago, but had no success.
I'm just mentioning this because it could have been useful for the initial problem I had, the original topic of this thread, knowing which tracks to cut to control the back light.

I have no idea who LCDWIKI are.

I do know that they have used a lot of my source code and even call one of their libraries LCDWIKI_kbv
I offered a Pull Request once. There was no response.

It would be a good idea (tm) if there was some cooperation.

Regarding "Shield design". These generally take obsolete mobile phone screens from the surplus market. And mount them on a universal pcb with minimal external components.

In the case of Mcufriend, their current "design" is crap.
In the case of SureNoo, some designs are not perfect.
Other Chinese companies make an excellent job of the hardware.

I still reckon that variable backlight is pointless. You just want on or off. Or possibly two brightness levels and off.

David.

From this: https://www.aliexpress.com/item/32916964464.html I could guess that Surenoo and TFTWIKI are the same. At least the SKU number of the sample screen (MAR3502) and the datasheet link to LCDWIKI would suggest that.

On the subject of the backlight levels, I have this on a shelf by the television. It is just about OK with two brightness levels. Daytime and low ambient light. Its daytime level may not necessarily be the the maximum. Some screens, like that in the OP, run too hot. The low ambient light level is a compromise between being just readable but not distracting.

outisde.jpg

I usually use 3 brightness levels (for clocks etc.) daytime, low ambient light, bed time. As before, but with an additional level so the room is comfortable for sleeping in. I'm now sensitive about this. I had one clock returned to me for adjustment which I gave it to friends who complained of difficulty sleeping because the scrolling display (the date scrolled every 30 seconds) was too much.

Of course, if the levels are anything other than off/on, then it is more or less mandatory to build hysteresis into the system to prevent flicker on the boundaries of two ambient light levels. Of course, I have a standard function to handle all that.