I'm trying to use a LCD Display with my Arduino, but I don't have a potentiometer and all of the guides I find always require one, usually a 10k ohm potentiometer.

The point is that I'm not very good at this stuff, but I understand that the potentiometer is actually a resistor that can vary, am I correct? In that case, if I use a simple 10k resistor I would have the same result as if I was using that potentiometer at the higher resistance (10k).

Would it be correct to use the resistor instead of the potentiometer? Then I would have to plug the positive on one side of the resistor and both the negative and output to the LCD on the other side of the resistor?

  • 1
    I understand that the potentiometer is actually a resistor that can vary - more like a voltage divider where you can vary the ratio.
    – Nick Gammon
    Sep 14 '15 at 4:33

No, it would not be correct to use a single resistor to replace a potentiometer.

On an LCD the potentiometer is used to adjust the bias level of the LCD - that is the contrast. You need to use it to set a voltage between Vcc and Vee, which you feed into Vo. That is, a voltage somewhere between +5V and -5V.

You can't do that with one resistor.

You can, however, do it with two resistors. Some experimentation will provide the right values to use. Pick a pair of resistors which add up to around 10K (the exact value doesn't matter that much) and join them together end to end. The two ends are the equivalent to the ends of the track of the potentiometer, and the join in the middle is the wiper.

To change the "value" of the potentiometer you then need to change the value of both resistors. If you reduce one resistor you need to increase the other so that they still add up to around the same value. What you are working with here is not the actual values of the resistors, but the ratio of the values of the two resistors.

  • Thanks a lot for the explanation. I will try that and see what i can do. It's very interesting, but i still suck in physics/electric.
    – George
    Sep 13 '15 at 22:35
  • 1
    @GeorgeRappel You can read more about the theory here: en.wikipedia.org/wiki/Voltage_divider
    – Majenko
    Sep 13 '15 at 22:43

you can use the digital pin to do this instead of resistance or potentiometer. I used a delay 500 which gave me good readable display. a value of 100 was to bright

void setup() {
  pinMode(13, OUTPUT);

void loop()
 digitalWrite(13, HIGH);
/* 100 gives Approximately 10% duty cycle @ 1KHz with 500 i get a good value for screen text brightness*/
  digitalWrite(13, LOW);
  delayMicroseconds(1000 - 500);

/* now you can add your LCD code to print what ever you like.*/
  • This is both somewhat impractical, and quite misleading. For this to work, your processor will be largely tied up in performing this software pulse-width modulation, and you entirely fail to state that. Such a scheme could still be useful if the display is allowed to blank while other operations are performed and only resumes when the sketch is idle waiting for input to act on. But it would be far better to use one of the hardware or interrupt-based software PWM schemes the Arduino offers. Sep 25 '17 at 19:03
  • why not just analogWrite() a value to the pin?
    – dandavis
    Sep 25 '17 at 21:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.