Vary LCD backlight in response to ambient light

Hi -

I want to vary the brightness of an LCD backlight in response to ambient light. Can I just connect a photocell between power and the backlight Vcc pin (combined with other resistors to control min and max current), or do I need to sense the ambient light and use PWM to control it?

Thanks.

First, I assume you are by mistake talking about a LDR (photoresistor), not a photocell. A photocell GENERATES current from light. A Photoresistor changes its internal impedance with light.

The reply is your second option. You cannot use the internal impedance of a LDR to drive the high current that drives a backlight. You need to make a voltage divider with a LDR and another resistance, wire this input to Arduino, and a simple program to make a variable PWM output depending on the read value.

Anyhow I hope you have more tasks to do with this, because this is a waste to have an Arduino to do just this. I would rather use some ATtiny.

Regards

Thanks for the reply.

Yes I was talking about an LDR, and yes, my project will do quite a bit more than that! This is just a feature I want to include.

Oh and I should have mentioned it is an LED backlight.

Your second method will still work.