PDA

View Full Version : how to control the contrast of GLCD



longpole001
- 24th March 2014, 05:25
Hi Guys , can someone point me toward a link to info on how the pic can control of the contrast on a glcd

the glcd uses a internal gen -10.5v on Vo , with a 10k pot to Vcc ( 5v) , wiper connected to Vlcd

regards

sheldon




7273

HenrikOlsson
- 24th March 2014, 06:19
Hi Sheldon,
What's the voltage at VLcd when you have good contrast? If the voltage is positive then you can drive it directly with the PIC using HPWM and a simple filter. It won't be that easy if the voltage is actually negative, which I suspect it is. But in that case you may look into replacing the mechanical pot with a SPI or I2C controlled potentiometer chip. I'd double check that the datasheet for the pot-chip regarding min/max voltage.

/Henrik.

longpole001
- 24th March 2014, 08:06
thanks hendric the voltage is about -6.0 to -7.5v on the wiper relative to ground for visual of the chrs ,

is there a way to just switch on/ off a mosfet which is connected from the GLCD negative output ( Vo) to the VLCD pin and adjust the voltage applied depending on the time the Mosfet is on using PWM ? ????

Aussie Barry
- 24th March 2014, 09:53
Hi Sheldon,

You obviously can't achieve a negative voltage directly from the PIC so you will need some external circuitry (including a negative supply greater than -7.5V).
It should be possible to drive an inverting op-amp, with a gain of say 2, via Henrik's filtered PWM signal such a positive input will result in a negative voltage at the GLCD contrast pin.

Just a thought...

Cheers
Barry
VK2XBP

richard
- 24th March 2014, 09:54
pwm through an opto coupler would be easy, driving things on the neg bus from the positive side are awkward opto's make life easy

longpole001
- 24th March 2014, 20:51
the glcd generates the negative supply so using an opto transistor connected to the negative Vo output of the glcd to the glcd VLCD input ( contrast control ) is possible , not sure how linear an opto fet would be to adjust the voltage for the contrast though ,
I had looked at a digital pot , but seems that the voltage cant be negative on the resistor divider network , in respect to the chips supply vdd and grd rails.

mark_s
- 24th March 2014, 23:14
Hello,

Maybe something like this using a pnp in a open collector configuration. Much like we control a 12v relay with a NPN and a 5v mcu. Set the PWM to 50% duty and adjust the contrast pot to good level. Now you should have a +/- contrast changing the duty. Basic idea only. Might want to add a resistor and cap to the pwm line to smooth it out.


7276

longpole001
- 25th March 2014, 03:51
Hi Mark , thats would be worth a try , i am thinking perhaps reverse in the transistor control to the negative voltage , as it appear that to see the char on the screen the pot is biased toward the negative supply , if that works why is it i cant find an example on the web doing this ???

mark_s
- 25th March 2014, 15:03
Hi Longpole,

You can't switch the negative voltage without a voltage translator. It is approximately -10v below the pic ground vss.
Think of the contrast pot as a simple voltage divider connected between +5v and -10v or 15v total.

Using a pnp and pwm you can adjust the positive node of the voltage divider up or down by 5 volts. This in turn moves the center point of the voltage divider (Vlcd) up or down. It can be in negative voltage range as long as the pot is adjusted towords the -10v end. So in theory it should control the contrast. Hope you can make it work.

longpole001
- 26th March 2014, 03:17
ill try it on the weekend see how effective it is