Yes you should be OK with 4.5V.
Ok ![]()
You can also add a IN4001 diode in series with the supply to drop approximately .7 of a volt...
The diode also protects your circuit should you accidentally reverse the supply ![]()
Add a second diode to drop another .7 of a volt...
Mike
Thank you for the tip ![]()
I just used a 1k resistor from pin 3 to ground
If you're eliminating a big knob potentiometer, maybe you didn't realize there are smaller ones available?
You should also consider an I2C backpack to save you pins and has a tiny onboard contrast pot.
You'll need 1,330 ohm resistor from ground to V0 to make the screen look good.
This thread is a phenomenal example of "the blind leading the blind"! ![]()
There was a major mistake early on in the application of the HD44780 LCD driver chip where a designer copied something from a test circuit in the chip documentation where a potentiometer was used to set the contrast voltage. In fact, I have not been able to locate this misleading circuit, it is not in the present datasheet to hand which shows only the correct configuration (in figure 21, page 37) of a variable resistor in series with the negative supply to the contrast ladder. You may note that the negative 5 V supply is only required for the uncommon "extended temperature" version of LED displays, for almost all readily available, the contrast voltage is slightly less that 5 V and the resistor connects to ground.
Nevertheless, once made, this blunder became ingrained in almost all following designs and "instructional" literature, since few designers actually understood the magical workings of a multi-level multiplexed LCD - or cared to spend the time to do so.
The popular modules - the "1602", the "2004" and other variants - have the resistor ladder shown in figure 21, consisting of five 2k2 ("222") resistors "R1" to "R5", totalling 11k. R6 or "RF" is the clock oscillator of the HD44780 while R7 is 0 in the 5 V versions. R8, usually "101" as 100 Ohms is the LED resistor. The usual optimum contrast voltage - the voltage on the ladder between Vdd and Vo is between 4.5 and 4.8 V, corresponding to between 0.2 and 0.5 V on Vo. This then is most readily set by a resistance between 200 Ohms and 1.2k - if the supply voltage is actually 5 V - as this resistance becomes the correct proportion of the resistor ladder.
With the incorrectly wired 10k potentiometer, this resistance would be set with the potentiometer in the first (ground) tenth of its range (so ten turn potentiometers are often used) however the additional part of the 10k connected to 5 V draws an additional and completely undesirable 500 µA or so requiring the potentiometer to be set within the first twentieth of its range.
This is an absurd situation; if you must use a 10k pot, then it should never be connected to 5 V; the "free" end may be connected to the wiper or even to the ground end as this actually reduces the value of the potentiometer and makes contrast setting easier.
The correct value of the potentiometer, wired as a variable resistor with wiper connected to one end is 1k or 2k. This spreads the usable contrast setting to the whole range of the potentiometer.
If someone cares to point me to the version of the datasheet showing the use of a potentiometer, I will most happily incorporate it into this description.
kalmanroli:
You'll need 1,330 ohm resistor from ground to V0 to make the screen look good.
This thread is (was) over two years old until this last bit of erroneous information was injected.
Don
Paul
Instead of using several paragraphs of ranting I think your cause would be better served by simply stating that it is easier to use a single resistance, fixed or variable, between pin 3 and ground in place of the widely suggested potentiometer.
Don
floresta:
several paragraphs of ranting
That wasn't ranting (except perhaps for a wee bit too much bold), it was a useful historo-technical description.
Willpatel_Kendmirez:
except perhaps for a wee bit too much bold
Better than all-caps! ![]()
MikeOToole:
In 99.9% of cases the variable resistor is set once an left alone... it is most often mounted where you can't access it... therefore two resistors will do the job perfectly...A better option would be to use one of the analogue pins to provide the required voltage for the contrast...
You could then change the voltage with a couple of buttons (you circuit may have buttons you could multiples for this)...I'll be adding this later to one of my designs and if I remember, I will post back the code...
Mike
Two resistors of how much ohms?
Read the explanation. One resistor. Try 470 Ohms. Try 330 Ohms, See which is better. Or use whatever potentiometer you have to hand, adjust it for best contrast, measure the value and substitute the nearest resistor value.
floresta:
PaulInstead of using several paragraphs of ranting I think your cause would be better served by simply stating that it is easier to use a single resistance, fixed or variable, between pin 3 and ground in place of the widely suggested potentiometer.
Don
It's incredibly useful information on a thread that is literally the first google result half way through 2020. I found most of the early information incredibly condescending and uninformative. The more specific the explanations the more informative I find them. There are still a lot of people who are trying to learn how to properly use an lcd and this information is still relevant to new people google it if it isn't to you. I can't stand nothing more than looking something up on google and the first 3 forums are full of people with non answers. Yeah a pot is widely suggested. Is that the question he asked? Did he ask "Should I use a pot?" No it was not. The whole first page is full of non answers.
Well, I most certainly do not resile from my explanation, and I think that a bit of emphasis is entirely fair game. ![]()
Not sure what floresta was getting fussy about, but I get the impression he is reasonably comfortable with it now. ![]()