HD44780 LCD Backlight control with PWM

The orientation of the mosfet is making it hard read, but isn't that connection wrong.

Don't make any changes because I say this, until someone else confirms.

But, I think S should be connected to GND, LED+ to Vcc and LED- to D.

Turn that mosfet in your picture, 90 degree left, and draw lines again, with angles.

Cheers,
Kari

Normally you would control the LED- line

Take a look at this page for some info on connection:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266731629

There you go! Now you can change the circuit.
Kari

Exactly what I needed, Thank you !
Side note : It seems "Justin Berken" use the wrong symbol on his diagram (p-channel instead of n-channel), but judging from the datasheet of his MOSFET, it's a n-channel as my 2N7000.

My diagram would then look like this :

Zoom

Does this feel right ?

What is the R1 for?

Kari

a pulldown resistor so that the mosfet doesn't get high when it shouldn't. Is it wrong ? Should I remove it completely ? I had doubts about it.

Well, examine it a little, and tell me what it does in your circuit.

Kari

I have to admit I'm not really up on FETs but I think that link I posted is confusing :stuck_out_tongue:

In your case you don't want the 10Kohm resistor - it was only there on the linked one due to how it was wired with the external supply.

So LED- to D, S to Ground and G to D3

I'd personally put the 150ohm resistor between S and Ground but that's just personal preference

Kari : looks like the 10k sucked all the juice from the lcd in my previous schematic.

mowcius : It seems right now, thank you.

Here is the final (more simple) design :

Zoom

That looks better :slight_smile:

Despite posts on this thread, I believe that the HD44780 positive backlight pin comes with an LED preattached internally on the board. The datasheet states to just put 5V on the line, so I'm pretty sure there is a resistor there already protecting the LED backlight. However, to be safe, it doesn't hurt to put a 150 ohm resistor.

However, this is the way that I hook mine up:

Is that really a satisfactory reason to drag up such an old thread? :stuck_out_tongue:

Some LCDs have a resistor inline with the backlight but some don't. That depends completely on the LCD and looking at the specific datasheet for your LCD will tell you if it does or not.

This thread was also discussing pulse width modulation of a pin to dim the backlight, not simply powering it.

Is that really a satisfactory reason to drag up such an old thread?

It's irrelevant as well as you have pointed out. Here's more.

Despite posts on this thread, I believe that the HD44780 positive backlight pin comes with an LED preattached internally on the board.

The Hitachi HD44780 LCD controller has been around for more than two decades. The controller used (and still uses) a 14 pin interface with no provisions for a backlight.

Early LED modules that had backlights used electroluminescent panels that required >100 volts to operate. The connections were at the end of the display, not on adjacent pins 15 and 16 as on current modules with LED backlights.

How to deal with the backlight is determined by the manufacturer of the pc board on which the LCD panel and LCD controller is also mounted. The LED backlight is completely independent of the LCD and it's controller.

Don

I'm thinking that's probably their own website and or/they're a spammer.

Ahh well.

Thanks for the interesting additional info on HD44780 controlled displays though. I wasn't aware the controller had been floating around for so long!

I wasn't aware the controller had been floating around for so long!

Actually it's pushing three decades if today's post in this forum thread is correct. http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=109880

Don

Older than me then! :smiley:

No... eliminate R1 it will limit the current flow through the Mosfet as it is in series with the source lead, Ground the source and all should work fine except the analogwrite() function will be reversed, I believe, where 255 would be off and 0 would be fully on and you might well SLOWLY reduce the 150 ohm resistor value (NO Pot will work well here) if needed start with a 4700 ohm in parallel with the 150 ohm, the resultant resistance will be about 110 ohms (113.7 ohms) but only if the brightness of the back-light isn't workable in normal room lighting. Most LCD's aren't of the daylight viewing types. IMO

Doc

Docedison - this thread's over a year old now - I think they've probably got something working!