switches and lcd character display

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bionary
 
Posts: 15
Joined: Wed Nov 28, 2012 7:18 pm

switches and lcd character display

Post by bionary »

Went through the 16x2 lcd character display tutorial and been experimenting on my own.
I thought maybe I could hook up a simple on/off switch somewhere between the arduino and the lcd interface. It's strange, as the lcd appears to still be partially on when the circuit is left open (switch off) ?
I have the switch in between arduino ground and lcd ground (pin 16 ). When switched back on sometimes my custom characters get a bit jumbled.

Q1. How do make the switch work; shut off the lcd completely?
Q2. Why do custom symbol/characters get messed up?
(maybe this is simply a factor of my on/off rigging is not quite correct)
Q3. Is the potentiometer really necessary? I could see ditching it for small simple projects.

Thanks

User avatar
adafruit_support_bill
 
Posts: 88089
Joined: Sat Feb 07, 2009 10:11 am

Re: switches and lcd character display

Post by adafruit_support_bill »

Haven't tried to do what you are doing. But I suspect you would have better luck switching the 5v instead of the ground line.

LCD contrast is voltage and temperature dependent. If you have a stable environment for the display, you can get by with a fixed resistance.

User avatar
bionary
 
Posts: 15
Joined: Wed Nov 28, 2012 7:18 pm

Re: switches and lcd character display

Post by bionary »

Hooking up the switch to 5v vs. ground unfortunately doesn't do it. It's such a bizarre thing because I figure once a + or - is unplugged that would open the circuit and shut off the lcd character display.
Ok I had a flash of genius (I wish) and hooked up the switch so that it shorts out the 5v/gnd on the arduino's breadboard upstream of any of the lcd board logic. So flipping switch to "on" shuts off the lcd screen. That actually works! BUT, I don't know enough about electronics to determine: Is this a safe/normal practice? Will it wreck something, cause a fire, etc?

"...temperature dependent huh?" Ok so I probably should keep the potentiometer hooked up since my project might find its way outside.

User avatar
adafruit_support_bill
 
Posts: 88089
Joined: Sat Feb 07, 2009 10:11 am

Re: switches and lcd character display

Post by adafruit_support_bill »

Looking at the datasheet for the display. What you are switching is just the backlight (pins 15-16). The logic and LCD drive circuits are still powered and active. http://www.adafruit.com/datasheets/TC1602A-01T.pdf

User avatar
bionary
 
Posts: 15
Joined: Wed Nov 28, 2012 7:18 pm

Re: switches and lcd character display

Post by bionary »

I suspect my method of shorting out 5v/gnd is not a good method for switching on/off?
Data sheets...cool never thought of that or knew i had access to that information-thanks.

On page 11 of the data sheet the closest help I found is the line that reads "Display ON/OFF control" - I don't think that shuts off the device though...plus I don't know what "1 D C B" means.
What you are switching is just the backlight (pins 15-16). The logic and LCD drive circuits are still powered and active.
I'm removing ground completely, that's what's so confounding...you can yank out either the ground or the 5v directly on the arduino itself and it still doesn't power off completely.

User avatar
adafruit_support_bill
 
Posts: 88089
Joined: Sat Feb 07, 2009 10:11 am

Re: switches and lcd character display

Post by adafruit_support_bill »

Without seeing a diagram of your circuit it is hard to say. But shorting 5v to ground doesn't sound like a good idea. Just cutting the ground is no guarantee either. There will still be plenty of ground paths for current to flow. Just no solid ground reference for the logic.

The 1DCB command sequence refers to the hex codes you need to send to the display. If you look at the library source code you will see how that is done.

Most of our products have spec sheets linked from the product description page. If you don't see it in the product description, check the other tabs.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”