Introduction: Arduino LCD Backlight Fix
As it stands many Arduino LCD Shields like this have a rather unfortunate design that prevents Dimming of the backlight. In most applications dimming is not required but if you have constructed a Star tracker and the backlight is at full brightness it ruins your dark vision by closing down your pupils every time you look at it.
The problem is well documented here with two main solutions, one involves using a resistor the other and recommended solution uses a diode. Both require soldering the component "dead bug" style onto exposed circuit track. I have a shield labelled DFROBOT other makers use the same basic design but there is no guarantee that the layout will be exactly same so if yours is a different make do some surfing to see what others are saying.
A few different diodes have been used and I found it quite confusing to decided which one to use, it appears that Germanium diodes are best and will allow the backlight to be fully dimmed using PWM code to control the backlight through pin D10 failing to protect your UNO before doing this mod may burn out the circuits on the processor chip.
Here is some text from the referenced web site
Another issue is that you can't use a typical silicon signal diode like a 1n4148 as the voltage
drop is too high and the backlight will not go all the way off. I used a germanium diode 1n34a which worked perfectly and the AVR no longer gets warm under heavy LCD activity with the backlight on.
As an alternative a 1/8th watt ~510 ohm resistor could be used. Not as power efficient as the diode when d10 is high (wastes about 8ma) but works ok. (backlight will also not be 100% off but so dim that you won't see it)
Step 1: Modify the Board Ready for the Diode
To test if your shield has the dodgy build you first run this test sketch provided by Bill "bperrybap" who has done so much to help work around this problem ( that only exists if you want to dim the backlight ) read the comments from others before doing it. My shield blinked quickly and displayed "BL Circuit BAD" so because I want to dim the backlight for Astrophotography I will modify mine.
On this LCD shield you have to find the track that requires the modification. What we are aiming to do is cut the track, then bridge the break with the diode.
Image one shows that I started at pin D10 and very carefully exposed the track by scraping the varnish of very gently, following the track till you have exposed enough to complete the task . Step two is to cut a gap in the track, do this with great care not to damage other tracks close by. Diodes that have been said to work are listed below, I don't think its to critical but germanium appear to work best.
Step 2: Solder the Diode
I've said it before but the glass case is fragile so bend the leads with care so that they will land on the contact points you are using, Tin the track on the board and the diode leads then carefully solder in place.
Step 3: Support the Diode
After soldering I decided to use a little epoxy to ensure it would not be strained while handling .
I have downloaded a couple of images from the web to show how others have soldered their diodes.
Step 4: Re Test Your LCD
by running the test script again I now get a good result, it should now be safe to address pin D10 using PWM in the code to dim the backlight for my astrophotography.
The Sketches attached allow you to run a stand alone Arduino and LCD shield, pressing the buttons will brighten or dim the display.
The star tracker Sketch is for use with the stepper motor and Arduino build but the display is set to very dim and can be set within the sketch for brighter or dimmer to suit your needs, here is the link to my build
line 55 pinMode(10, OUTPUT); //Set pin D10 as an output to control the backlight brightness
line 56 analogWrite(10,5); // Set the brightness of the backlight
Lines 55 and 56 set up the pin, then you can experiment with values to get the brightness you need I have set mine at 10,5 has the backlight hardly visible just as I want, 10,255 would be full brightness.
Step 5: Additional Information Sent to Me
Mike from HobbyTronics sent me information and images too he used a small surface mount BAT43 Schottky Diode that makes a very neat installation . Thanks Mike
Thax made it!