# Which circuit to use to automatically turn off the backlight of a GLCD after 30s?

Have you ever seen smart phones automatically turn their screens off after a short time to save the power?

I want to do it on the back light of my GLCD (ks108sed).

Descriptions:

• Back light will be turned on by a tactile switch.

• Back light will be turned off after 30s.
• The circuit shouldn't have a microcontroller.

What circuit should I use ??

-
Why no microcontroller? Are you running the LCD off of fairy farts and wishes? –  insta Aug 20 '14 at 14:26
You can't spare one pin? –  Matt Young Aug 20 '14 at 14:35
If you have any GPIO at all, it's always possible to create more (e.g., 1-wire, I2C and SPI port expanders), and doing so will probably be simpler -- and give a more satisfying user experience -- than building a standalone circuit. –  Dave Tweed Aug 20 '14 at 14:40
Having to hit the switch every 30 seconds will be very annoying. The microcontroller would be able to restart the timer based on various device activity such as keyboard data entry. –  Tut Aug 20 '14 at 15:18
A PIC10 or 12 could not only read the switch but look at activity on the bus to the display. Fewer parts and far more accurate timing. –  Spehro Pefhany Aug 20 '14 at 15:23

Oh, you could use something like the below, but the micro would be a more elegant solution for sure. You can play with the value of R1 to get closer to the 30s if it matters.

If you use a CMOS 555 then you can use a lower value capacitor and higher value resistor.

This will directly drive up to about a 100mA backlight. If you need more current, add a p-channel logic level MOSFET and you can drive a blindingly bright light.

simulate this circuit – Schematic created using CircuitLab

-
By "lower value capacitor and higher value resistor" do you mean C2 and R1 ? | So R4 affects the up time. Yes? then I may replace it with a potentiometer | And I will use the MOSFET | Thank you. –  BlueSky Aug 20 '14 at 15:18
Yes, C2 and R1. R4 is just to keep the switch from welding. R1 (and C2) are what affects how long the time delay is. You could replace R1 with 100K in series with 20K or something like that. Always keep a series resistor otherwise if you turn it all the way down and press the switch then R4 and/or the pot can be damaged. –  Spehro Pefhany Aug 20 '14 at 15:21

NE555 ? or even a transistor, resistor and a cap.

Alternatively, you can put AND gate (or just few transitors) between !CS/!SS and any data line so when LCD is not getting any commands it can be used to control backlight (basically off for short moment you send data to LCD, and PWM when not sending any data to LCD)

-

So when I look at this I think of one circuit that you can trigger, push of a button, and it will output for a defined period of time and then turn off again until triggered again!

The chip needed for this is a 555 Timer chip and will need to be set up in a monostable configuration, I used this circuit many times in my college days and it is very basic with not a lot of calculations to it as there are plenty of online tools to help you out.

This is the circuit diagram for the circuit and you can work out the timings and values with a simple formula: T = (1.1*R *C). Again this formula can be found along with online calculators to work out the values that you specifically need, for an output time of 30 seconds a value of R = 123K and C = 220uF are required, (found using one of these mention online calculators), there are other arrangements of values that you could use but I feel these, or values close to these would give you your desired on time, after this time has elapsed the circuit output will go low and remain low and only requires a low to be triggered at the input (use the button in a pull up configuration).

This hopefully would be a solution to your issue!

-

Edit: So the author already accepted an answer while I was still working on this. What this circuit offers over the 555 timer is higher timing precision and no dependance on component tolerances.

Simplest way I can think of that uses easily sourced and cheap components is the following implementation of this diagram.

32.768kHz crystal into a TI CD4060B binary counter with oscillator circuit.

This can give you a 2Hz pulse if you use the Q14 output. $$\frac{32768Hz}{2^{14} counts} = 2Hz$$

Then use that for the CLK input to a TI SN74HC4040 binary counter. You really only need 6 bits, but more bits give you more flexibility and the cost is nearly the same.

Then you can tailor the outputs to an AND gate and get any time pulse from every second to hundreds of seconds.

To get 30 seconds I did the following math. Since the clock input is running at 2Hz then to get 30 seconds we will need to toggle something every 60 clock cycles. 60 decimal is the same as 111100 binary. If we use the four bits that are 1s as inputs to an AND gate then the AND gate will only be high once every 30 seconds. You can then do as you like to this pulse to make it shut off your screen. You didn't give details on what kind of control signal you need so I'll leave that up to you. Maybe an inversion is needed, maybe a latch of some kind too.

The nice thing about this circuit is if you decided you needed a shutoff after 15 seconds or 100 seconds implementing it is simple, just encode the bits to an AND gate. I would suggest adding some zero ohm resistors on different bits so you can tailor the shutoff time if need be. Total cost: ~\$3 and ~7components. Don't forget the necessary passives to make the crystal oscillate!

-
Unfortunately both of those ICs are unavailable in my location. –  BlueSky Aug 20 '14 at 15:21
Really? What location. And I gave examples. You can use any oscillator/crystal, and any counter. There's literally 1000s of flavors in stock at most distributors. –  ACD Aug 20 '14 at 15:24
I live in I.R.Iran . –  BlueSky Aug 20 '14 at 15:28
Well I'm not too familiar with that area but if you wanted to try this circuit you should be able to procure these parts. What distributors can you buy from? Counters and crystals are very common parts. –  ACD Aug 20 '14 at 15:31
well the are two ways to do that : 1- 555. 2- Your plan. And I prefer the easier way (555). :D –  BlueSky Aug 20 '14 at 15:43