Go Down

Topic: Backlight and I2C on LCD Display (Read 6281 times) previous topic - next topic

Zarnick

I did understood both that and my mistake, that's why I'm using a trimpot now. I'll fix it for the good contrast and that should be ok. I only meant that sometimes, you can hardwire this. I mean, I can't control the voltage the user is going to attach, but if I could, then I wouldn't need the voltage divider right? Or I'm still off the track here?

MAS3

You're still off.
If you want to use a fixed value, you should build something that does the same as that potentiometer.
And as said, that means you need to make the voltage divider by using at least 2 resistors.
You cannot do the same thing with a single resistor.

If you cannot control the voltage the user is going to attach, as you stated, then you should at least specify the voltage this is to be attached.
Should that user decide to do something completely different, then the consequences are theirs.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Zarnick

Ok, I'll study more on Voltage Dividers then ;).

bperrybap


Ok, I'll study more on Voltage Dividers then ;).

The issue isn't really about the voltage divider,
it is understanding the nature of the signal used by the Vo pin.
A voltage divider is  simply one easy way to create that signal.

--- bill

Zarnick

Let me see if I finally understood that then. I need to send a specific Voltage for the contrast to be correctly adjusted, the fact that if I simply put a resistor to GND there and that it works, is because the LCD in question already has this in it's board, but I really should be simply sending a new Voltage (around 5V), thus creating a complete circuit, instead of actually closing the circuit by attaching it to GND right?
And this is actually what a potentiometer does, so it would be wrong the believe that the potentiometer is a variable resistor, it is actually a variable voltage divider, is that correct?

Paul__B


If you want to use a fixed value, you should build something that does the same as that potentiometer.
And as said, that means you need to make the voltage divider by using at least 2 resistors.
You cannot do the same thing with a single resistor.

You are still "off"!   :smiley-eek:

There is actually no need to use two external resistors.  Since there is already an 11k resistor on the LCD board between Vo and Vcc and will be in every such LCD assembly,  you only need an external resistor - which may be variable or fixed if you have determined a suitable value - between Vo and ground.  You then have two resistors - one external and one internal - a voltage divider.

The fact that the datasheets - which are mostly copies of one another in case that is not blindingly obvious with the mistakes transferred from one to the next - show potentiometers, is simply that they are demonstrating an experimental or "demonstration" circuit, not a definitive way to make a final product.

It is OK to use a 10k potentiometer because it is simple and probably as cheap or cheaper than a 1k one; it is not OK to assert that is the only or optimal way to do it.

Zarnick

I see, so my previous reply would be correct?

Paul__B


I see, so my previous reply would be correct?

Yes.  Try a 1k potentiometer (or even a 10k, but it will only work near one end) from pin 3 to ground, that is ground one end, wiper to pin 3, when you get a good setting you could measure the value with your multimeter and select a fixed resistor value close to the measured value.

gilshultz

I never found the answer to the question so here goes! The LCD boards I have are using a PCF8574  which is connected to the LCD and is controlled with the I2C interface.  It also contains a jumper plug on the opposite side of the board from the I2C interface connector.  Try connecting a P-Channel BS-170 available from On-Semi or whatever you may have.  The drain and source leads connect in place of the plug.  Put a 10K resistor in series with the gate then connect it to a PWM output.  If you connect it in reverse the LED will remain on, because the internal substrate diode will conduct.  This should not damage anything assuming a 5 volt system.  Hint: use the tilde character to complement the PWM value you write, that will invert the logic which will again be inverted by the MOSFET.  If you do not 0 will be full on, 0xFF will be full off.

When the PWM output is LOW the MOSFET will turn on illuminating the backlight LED. If it does not work try reversing the Drain Source leads. I would start with an On-Semi BS170 P-Channel MOSFET or use whatever you may have.  For those that want to use a resistor just connect it in place of the plug.  The LED cathode on my parts is driven from the +5 supply and the anode is connected to the collector of a transistor on the board.  I have not had the time to actually try this but I see no reason it should not work. If the PWM source and the LCD do not have the same ground problems will ensure.  

Go Up