I am an embedded software engineer and can cope with things digital, but struggle a bit when it comes to analogue and transistor biasing - especially where negative voltages are involved.

I am using a graphics STN LCD panel and want to control the contrast. The panel has a negative voltage generator output (Vout) and a contrast control pin (Vo). The datasheet says just put a pot between the two. However, I want to be able to control contrast from software, and digital pots won't work outside of their supply range. I have a DAC output from my processor that I can control between 0 and 3.3V, but how do I use this to control the contrast voltage I need? I'd be grateful if someone could suggest a circuit to do this. I'm sure it's just a transistor and a few resistors!

Wow, you have a DAC on board? Cool, what processor? That's gonna help lots.

First off I would suggest you put that pot on the breadboard to see what range of voltages you need for the full range of contrast. I say that because you may not get sufficient resolution to control this digitally of you just convert (0 to 3.3V) to (0 to -16V).

Give us those numbers and I bet several people will suggest things to do. You basically just need a simple amplifier, a couple of transistors & resistors or maybe a cheap op amp.

Wow, you have a DAC on board? Cool, what processor? That's gonna help lots.

Click to expand...

Processor is a STM32F100, so not a penny pinching PIC. 2 12 bit DAC's on chip. I'll be able to control the contrast to 2048 levels .

I'll do the measurements to see what voltage is actually needed and report back, but there will be a bit of a delay as the LCD hasn't arrived yet and then I need to get the full range of voltages from putting it in the freezer to putting it in the oven. The application is exterior marine electronics, so needs to be able to cope with temperatures ranging from parky to sweaty.

I originally tried using an op amp in an inverting amplifier configuration and I used the negative output from the screen as the negative voltage supply for the the opamp with the idea being that I could vary the resistance using an electronic pot.
This looked really good but I did not pay attention to the fact that the feedback voltage would put a negative voltage on the electronic pot pins. The epot did not like this.
If you go for an opamp solution make sure the processor pins don't mind the feedback voltage.