Negative voltage for and LCD's contrast level. How?

Go To Last Post
31 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I have this LCD, whose seller's spec is so scarce with info that I don't know how to generate a negative voltage for the LCD's contrast. The LCD is at http://www.sureelectronics.net/g...

Pin 3 controls the contrast. Obviously I need a pot to do the contrasting. I know how to do with positive voltage. How does one interface with a pot to produce negative voltage? Connect the VCC pin of the pot to the GND pin and the GND of the pot the VCC pin?

Just to start out slowly, say, I would like to have a -5V to pin 3 without a pot, how would I do that?

My VCC is +5V.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You cannot generate a negative voltage with just a pot, without a negative rail. Though I have a feeling that might be a typographical error, the contrast pin isn't generally a negative voltage.

Could someone with experience with that module confirm this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The spec on the Sure Electronics page shows Vcontrast as 0~-5v so this is one that needs a negative contrast voltage. I've seen this on character LCD displays too that have a wide temperature operating range.

You could use a 7660 chip to generate a -5v supply (see here): http://www.shellyinc.com/techDCtoDC.htm

Alternatively if your design uses a MAX232 or similar it's possible to 'borrow' a negative supply from one of the charge pump pins as the current requirement for the contrast pin is miniscule - pin 6 on a MAX232 if I recall correctly. Be sure to include a series resistor to avoid loading the pin and causing yourself more grief with serial comms.

HTH

Cheers
Robin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

timgoh0 wrote:

Could someone with experience with that module confirm this?

First, thanks for the response.

I am afraid there is no example on this module specifically, even the seller of the module does not have the full spec on the module. I am using the sample driver code from http://en.radzio.dxp.pl/sed1520/

Not sure if the controller is NJU6450 or SED1520.

There is a YouTube vid: http://www.google.com/url?sa=t&s...

But it's not the exact module.

Yeah, I thought it would be a typo on the contrast requiring negative voltage. So, just to test out, I connect the contrast pin to 5V, my VCC, to see if I get the max contast, but, I see nothing. Maybe the module itself is bad.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

wobbin_c wrote:
The spec on the Sure Electronics page shows Vcontrast as 0~-5v so this is one that needs a negative contrast voltage. I've seen this on character LCD displays too that have a wide temperature operating range.

You could use a 7660 chip to generate a -5v supply (see here): http://www.shellyinc.com/techDCtoDC.htm

HTH

Cheers
Robin

Robin, does this mean that with the 7660 chip, I can use the pot on the negative output voltage?

This chip costs about $1.56 a piece at digikey.com.

Thanks for the above link. It mentions that "The ICL-7660 is the "C-MOS" version of the popular 555 chip."

I have quite a few 555 ICs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A 7660 is definitely not the same as a 555.

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, all you need to do is put the pot between the -5v and +5v rails and then take the pot's slider to the LCD module's contrast pin.

As Tom says, the 7660 isn't the same as a 555 timer. The CMOS version of the NE555 was the 7555.

This is the one you want: http://www.intersil.com/data/fn/FN3179.pdf

Its a fairly generic chip (if a little old) so shouldn't be hard to find.

Cheers
Robin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The other way would be hooking a low-impedance output oscillator into a charge-pump topology inverter.

Something like http://www.csgnetwork.com/ne555c...

But watch the ripples.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A charge pump circuit can also be driven with a port pin (this is what I do)

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unebonnevie wrote:

One question: The 470uF (electrolytic cap) is present also for +5V input? The schematic shows for +12V input. Should I use a small value?

http://schematicwiring.com/simpl...

explains more

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unebonnevie wrote:
So, just to test out, I connect the contrast pin to 5V, my VCC, to see if I get the max contast, but, I see nothing. Maybe the module itself is bad.
Au contraire, you should have tied the contrast pin to zero volts. It is most likely not bad. And you may well obtain an acceptable contrast without generating a negative voltage.

Chan at http://elm-chan.org/docs/lcd/lcd... discusses using LCD displays at low positive supply voltages, eg 3 Volts instead of 5 volts, and suggests a way to generate a small negative voltage by driving the circuit below from a spare pin on the micro. This may be usable in your situation also.

Cheers,

Ross

Attachment(s): 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using a port pin to flick a chargepump and generate the negative voltage is also my favorite.
Cheap and simple.
Another advantage of this is that you can skip the pot and software control the contrast through PWM.

/Jesper
http://www.yampp.com
The quick black AVR jumped over the lazy PIC.
What boots up, must come down.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jesper wrote:
Using a port pin to flick a chargepump and generate the negative voltage is also my favorite.
Cheap and simple.
Another advantage of this is that you can skip the pot and software control the contrast through PWM.

Ok, I believe I know how to do with PWM. But "using a to flick a chargepump..." means turning on or off the pin, just to confirm your suggestion.

Thanks

Last Edited: Sun. Aug 29, 2010 - 12:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
unebonnevie wrote:
So, just to test out, I connect the contrast pin to 5V, my VCC, to see if I get the max contast, but, I see nothing. Maybe the module itself is bad.
Au contraire, you should have tied the contrast pin to zero volts. It is most likely not bad. And you may well obtain an acceptable contrast without generating a negative voltage.

Chan at http://elm-chan.org/docs/lcd/lcd... discusses using LCD displays at low positive supply voltages, eg 3 Volts instead of 5 volts, and suggests a way to generate a small negative voltage by driving the circuit below from a spare pin on the micro. This may be usable in your situation also.

Cheers,

Ross

Thanks! This is very helpful! I am able to see something on the LCD now with the contrast pin connected to GND. It's not showing the thing I am drawing, but that's a separate issue.

So, please explain why to GND the contrast pin? I understand that there is a default contrast level, but I thought GND would be 0V, thus, not able to see anything at all.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As a general rule, 16x2 LCD displays will run at 5V. They will be happy with 5V logic (and 3.3V logic too)

The contrast pin for a 5V supply is normally about 0V. You may find the best contrast is somewhere between 0V and 0.5V.

Now if you run the display at 3.3V you find that the best contrast is between 0V and -1.0V.

So if you use a potentiometer between 0V and +Vcc you can never achieve a display if Vcc is less than 4.0V.

n.b. there are displays specifically designed for 3.3V systems. As always you need to check your data sheet.

If an unbranded display it is probably 5V and needs a 0..0.5V contrast setting.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unebonnevie wrote:

So, please explain why to GND the contrast pin? I understand that there is a default contrast level, but I thought GND would be 0V, thus, not able to see anything at all.

A counterquestion: why current flows from positive to negative terminal, even if electrons flow from negative to positive terminal? Well, there is no simple answer.

My best guess is that back in the days when technology was less advanced, liquid crystal displays needed say 10 volts of AC to appear dark and 5V supply just was not enough.

So when digital power supplies were already there for the bus and logic circuitry of LCD, and they are 5V and GND, to get 10V for the display, it would be easiest to have -5V as the contrast pin and use the 5V supply as the other drive voltage, instead of having +5V, +10V and GND.

When technology advanced, about 4.5V is nowadays enough to see something, so you only need 0.5V at the contrast pin with 5V digital supply voltage to get 4.5V of LCD drive voltage.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes. And it would be no skin off the noses of the module manufacturers to generate their own contrast voltage.

But life is not like that.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I finally was able to draw some primitive shapes, e.g., line and circle, on the display. For this particular LCD http://www.sureelectronics.net/g... , I found:

1. Connect the contrast pin 3 to ground, if there is no contrast circuit created, in order to see things.

2. The LCD technology is quite old and was created for the 80xx or 68xx processor. Depending on the driver you use, you have to choose which processor "mode" by setting the /RESET pin low or high, high being the 68xx family CPU. Then the API makes use of R/W pin accordingly.

The LCD is not good at all, basically old technology. As you can see from the above link, the LCD has two "rows" of 122x16 graphic areas, each is controlled by a SED1520. The really, really annoyance is that there is no continuity between the two rows. From the web site that has the pictures of the LCD's screen. See the gap between the two rows? There is NO way you can make use of that gap or draw it, thus, making the LCD not as a continuous graphic LCD of 122x32 resolution.

Bummer!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

... and following on from another thread, I guess it carries a CE mark?

At least you have learned some things and it only cost you some time and $2.99 + S/H. Some of my lessons have been far more expensive :lol:

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

unebonnevie:

Check the output at pin 18 of your GLCD. The pinout in your link shows this as a 'Backlight enable switch' but the GLCDs that I have seen typically have a negative voltage present at this pin - to be used with the contrast potentiometer. One end of the pot to GND, the other end to pin 18, and the wiper to pin 3.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
... and following on from another thread, I guess it carries a CE mark?

At least you have learned some things and it only cost you some time and $2.99 + S/H. Some of my lessons have been far more expensive :lol:

Cheers,

Ross

Yes, it does carrie a CE mark. In fact, there are two CE pins, since the LCD has two SED1520 in it.

Hope your expensive lessons won't force you to bankruptcy. :lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

floresta1212 wrote:
unebonnevie:

Check the output at pin 18 of your GLCD. The pinout in your link shows this as a 'Backlight enable switch' but the GLCDs that I have seen typically have a negative voltage present at this pin - to be used with the contrast potentiometer. One end of the pot to GND, the other end to pin 18, and the wiper to pin 3.

Don

Thanks! Yep, my GLCD has pin 3 as the contrast that uses negative voltage. Yeah, for now, connecting that pin to ground is good enough.

Pin 18 is the Backlight enable switch. Unfortunately, it's either On (5V) or OFF (0V), as far as I can tell from the skimpy spec.

Last Edited: Sun. Sep 5, 2010 - 04:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At least one of us is confused! In your initial post you stated that you didn't know how to generate a negative voltage for the LCD's contrast. Later on David mentioned that it would be no skin off the noses of the module manufacturers to generate their own contrast voltage.

In my post I mentioned that, at least on my GLCD, pin 18 is the output of the negative voltage source that is provided by the manufacturer for use with the contrast potentiometer. So it appears to me that if you indeed have a negative voltage appearing at pin 18 of your module then: (1) your initial problem is solved, and (2) David's concern is answered.

Quote:
connecting that pin to ground is good enough
If 'that pin' refers to pin 18 then there is no reason to connect the output of this negative voltage source directly to ground. If 'that pin' refers to pin 3 then why settle for 'good enough' when, for the cost of a potentiometer or two resistors, you can probably get a better result.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

floresta1212 wrote:
If 'that pin' refers to pin 3 then why settle for 'good enough' when, for the cost of a potentiometer or two resistors, you can probably get a better result.
Don

Will give that a try. Thanks. (I corrected my previous post. 'that pin' is indeed pin 3, which I originally written, then another, which I corrected, I mistakenly typed it as 'pin 18'.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
unebonnevie wrote:
So, just to test out, I connect the contrast pin to 5V, my VCC, to see if I get the max contast, but, I see nothing. Maybe the module itself is bad.
Au contraire, you should have tied the contrast pin to zero volts. It is most likely not bad. And you may well obtain an acceptable contrast without generating a negative voltage.

Chan at http://elm-chan.org/docs/lcd/lcd... discusses using LCD displays at low positive supply voltages, eg 3 Volts instead of 5 volts, and suggests a way to generate a small negative voltage by driving the circuit below from a spare pin on the micro. This may be usable in your situation also.

Cheers,

Ross

Ross@:

Re-visiting this. Per the below, I am going to create an interrupt at 100khz. The ISR will simply toggle a port pin to create a square wave of 100khz. Is this correct? Just wanted to confirm.

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Correct, but is it wise to have a interrupts happening at 100kHz (that is 10us time period). Why is for example 1 kHz too slow?

Also you don't need interrupts at all if you have a free hardware PWM pin available.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ditto ... :lol:

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi chap!

if you look at
http://www.sureelectronics.net/g...
The display part is WGM-12232M manufactured by Shenzen Wellstart Industrial Co. LTD.
It efectively uses the SED1520 (as per DS) and runs at 5V
The DS is here, but for the WGM-12232T (which may be similar) http://www.wst-lcd.com/uploadfil...

It seems to not require anything but a resistor in the Vo pin to adjust contrast...

Cheerz
Nachus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jepael wrote:
Correct, but is it wise to have a interrupts happening at 100kHz (that is 10us time period). Why is for example 1 kHz too slow?

Also you don't need interrupts at all if you have a free hardware PWM pin available.

I do have OC1A pin free for PWM. I'll try that. I do realize that 100kHz interrupt is quite fast, but mentioned only because of the circuit referred to by ross@.

Last Edited: Wed. Sep 8, 2010 - 06:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nachus001 wrote:
Hi chap!

if you look at
http://www.sureelectronics.net/g...
The display part is WGM-12232M manufactured by Shenzen Wellstart Industrial Co. LTD.
It efectively uses the SED1520 (as per DS) and runs at 5V
The DS is here, but for the WGM-12232T (which may be similar) http://www.wst-lcd.com/uploadfil...

It seems to not require anything but a resistor in the Vo pin to adjust contrast...

Cheerz
Nachus

Hey Nachus, useful info, indeed! The seller couldn't even tell me. LOL!

Yeah, I am going to the next LCD, the Hantronix 240x64. It also has a negative voltage for contrast. Got the driver written up...Can't seem to produce any pixel...Well, another story to pursue.

I got this Hantronix LCD for $7 at goldmine-elec.com last year. Not a bad deal, assuming it's not broken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Ross:

Excelleeeent!!!!! I was just taking  an axe and destroying my microC. I googled all the day, read tons of LCD software and made thousands of trials.

 

Thanks for your post!!!

 

Regards,

 

Alejandro.