I have followed the instructions at https://www.arduino.cc/en/Tutorial/HelloWorld and have my LCD displaying some text. I've also connected the LED back light (LCD pins 15&16).
I wanted to replace the potentiometer used to set the contrast, with a connection to the DAC pin. It needs to be about 0.8V.
When I connect the contrast pin from the LCD to my DAC pin on my ESP32 board, it doesn't work, the contrast is too high. Using a volt meter, it measures about 2.5V.
If I disconnect the LCD contrast pin from my DAC pin, the voltage measured is 0.8V.
Any ideas or examples on how to control the LCD contrast using a DAC pin?
I wondered if I need to add a resistor or something.
-
esp32.com/viewtopic.php?t=5098Majenko– Majenko12/25/2018 19:18:27Commented Dec 25, 2018 at 19:18
1 Answer 1
The DAC in the ESP32 is ok for sourcing current but not so good at sinking current, and that is what you need.
A amplifier set up as a voltage follower would work.
-
Could a simple pull-down resistor work as well?Gerben– Gerben12/25/2018 19:35:13Commented Dec 25, 2018 at 19:35
-
1Sure. Much easier :) It would need to be a balance. Low enough to pull down but not too strong for the output.Rudy– Rudy12/25/2018 19:42:10Commented Dec 25, 2018 at 19:42
-
Got more details please?Ant Kutschera– Ant Kutschera12/26/2018 21:33:38Commented Dec 26, 2018 at 21:33
-
One Ohm would look like a short. 10K would look like it wasn't even there. I would try something like 150-330 Ohms. You could try a resistor by itself. Find one that gives you a reasonable contrast. Then go a little lower in resistance and add the D/A output. The resistance on its own does the pulling down, the D/A just is there to bring it back some.Rudy– Rudy12/26/2018 23:46:30Commented Dec 26, 2018 at 23:46
-
Sorry, I meant where do I connect what? (iI'm a noob)Ant Kutschera– Ant Kutschera12/27/2018 12:52:15Commented Dec 27, 2018 at 12:52