Unfortunately another backlight topic....

Hi All,

I am only on my 3rd day of using an Arduino (where have I been?!?!) I have learnt basics on how to use an Uno using example sketches and Google searching with temperature sensors/PIR sensors/LCD/stepper motors etc. but to much avail I have been trying to find something that I would have thought basic... Backlight timing on LCD's.

Basically I have a few projects in mind (Nothing new to the community) and I was trying to find how to turn off the backlight on an LCD after x amount of time after pressing a push button. I have searched the forum in aim of a simple instruction (wiring guide and code) but cannot find something that explains it to my level.

I have PWM pins available and I am led to believe this is the simplest way to do it but can someone help with coding and and wiring?

Any assistance will be greatly appreciated!

The backlight (on most modern LCD modules) is nothing more than a bunch of LEDs.

In terms of controlling it you can consider it to be a single LED except for the fact that it requires more current than most individual LEDs. This means that you should not drive it directly from an I/O pin on your Arduino but instead through a transistor.

So, look for circuits that allow you to switch a device on and off via a transistor connected to an output pin of your Arduino.

Don

A bit more detail needed.

The back-light on 1602 and I think, 2004 alphanumeric LCDs is in fact, a single LED with (most of the time) a 100 ohm series resistor as R8 or R9, which draws about 20 mA and can be directly switched by an Arduino pin. Some criticise me for saying this but it is simply up to you to verify the details. Graphic LEDs may be a quite different story.

I consider it very unlikely that you will want brightness control via PWM, in general you either want to see the thing or you do not. If it is too bright at night, you can set the night-time brightness value with a single resistor and another Arduino pin.