Pages: [1] 2 3   Go Down
Author Topic: 16x2 LCD backlight relay problem  (Read 4050 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone.

I have put a normal 16x2 blue LCD in my car to read some values including temps, boost etc.

For the backlight, I have decided to connect the pin 15 to a relay, so when I put the parking lights on the LCD's backlight comes on. It comes on etc, however as soon as the backlight comes on I see garbage on the LCD!

With the parking lights off, therefore the relay being off and the backlight the LCD shows everything absolutely fine.

Any ideas?

Thanks.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any ideas?
Try connecting the backlight directly to the power source (without the relay) to determine if the problem derives from the backlight or from the relay.

Don
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, when I connect the backlight directly to power source, it still happens.

I have to also add that, the positive leg of the LED is connected directly to my power source. I haven't gone via the pin 15.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BUMP
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
BUMP

I'll give you my response to reply #2 in a few hours.

Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7197
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe some interference. You need to show some details instead of just posting bits of info in text. Get some diagram and pictures and tell us how you hooked up the relay. There are plenty of wrong ways to do it. Also how you hooked up the back light w/o relay.
Logged


0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok,

Everything is connected like it should for an LCD. As mentioned it works when backlight is disconnected, but garbage when connected.

Not too worried about the relay at this point, since when I directly connect the +ve leg of the LCD to the 5v on Arduino still garbage characters. I am not connecting the 5v to pin 15 though. Should there be a resistor in series with the power and the +ve leg of the LED at all? Should this cause it?

Thanks.

Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Should there be a resistor in series with the power and the +ve leg of the LED at all? Should this cause it?
This is what is most likely causing your problem.  A current limiting resistor is always required with an LED and some LCD modules have the resistor on the pc board.  I would suspect that most, including yours, do not.   If you have a datasheet for your module it may contain enough information to determine if you need a resistor and what size to use.  Otherwise I would start with 100 ohms and see what happens.

Don
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7197
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One of these days, I'm gonna make a video on how to hook up a character LCD. The adafruit tutorial is good but missing that important resistor smiley

http://www.ladyada.net/learn/lcd/charlcd.html
Logged


0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok,

There is a resistor on the board, but I just connected the 5v direct to the LED rather than through the resistor. I didn't think it would have made a difference?  smiley-confuse

I will try a resistor and report back.

Thanks.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried a 150 ohm resistor and the problem is solved now. I will connect the relay tomorrow and post here again.

Thanks again for all the help.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One of these days, I'm gonna make a video on how to hook up a character LCD. The adafruit tutorial is good but missing that important resistor smiley

http://www.ladyada.net/learn/lcd/charlcd.html

It is interesting that the current version of that tutorial has a whole paragraph (see below) on how to determine the size of the required resistor but then they do not use it or explain why they didn't use it.  I seem to remember that the previous version of this tutorial at least mentioned that the LCD module that they sell on their site has an on-board current limiting resistor.


Next we'll connect up the backlight for the LCD. Connect pin 16 to ground and pin 15 to +5V through a series resistor. To calculate the value of the series resistor, look up the maximum backlight current and the typical backlight voltage drop from the data sheet. Subtract the voltage drop from 5 volts, then divide by the maximum current, then round up to the next standard resistor value. For example, if the backlight voltage drop is 3.5v typical and the rated current is 16mA, then the resistor should be (5 - 3.5)/0.016 = 93.75 ohms, or 100 ohms when rounded up to a standard value. If you can't find the data sheet, then it should be safe to use a 220 ohm resistor, although a value this high may make the backlight rather dim.


Don
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7197
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OP, I am glad that was an easy fix for you.

Floresta, very often newbies purchase LCDs from other places and they don't always have any resistors on the LCD then used the adafruit tutorial and not even following it all the way through. I think this generation is better at listening and watching than reading. I start to feel the same way. So once my cold is gone I will put together a video and hope it will help explaining things a bit better than a written tutorial.

I also hope to address a few common mistakes and reproduce their symptoms in the video so will dig deep here for some good common mistakes.
Logged


0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The resistor certainly fixed my problem. Also connected the relay as normal and it worked absolutely fine!

Thanks for all the help guys. Much appreciated  smiley
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone, me again  smiley

I have a similar problem again. This time it's a 20x4 red LCD.

The resistor on the board for the LEDs is 260 ohms.

At first when the LCD starts, everything is shown properly, give it around 2 minutes and all the characters get mingled!

Also if I play with the potentiometer connected to the pin 3, it happens quicker. Especially when it goes full contrast!

Any ideas/experiences?

Thanks.
Logged

Pages: [1] 2 3   Go Up
Jump to: