0

Arduino 2x16 Character LCD Shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino 2x16 Character LCD Shield

by golog1 on Mon Mar 02, 2009 1:42 am

Hey all,
Just got started with my Boarduino a week or two ago and decided i should have a Duemilanove as well. I wanted to use already developed shields and make a few of my own.
I have already started my first two shields and wanted to get some input from the Arduino community as to what all to include and ideas on making it useful to others.

My first project was a shield to attach a character LCD display to. I'm using a HD44780 compatible LCD (a DMC16207).
I put together a shield design to handle all the breakout for it as well as a trimmer for the contrast.
For this shield i was wondering what other functions/peripherals people would like to see in a shield of this type, and if anyone knows of a way to install a back-light onto a LCD display of this type.

Additionally... I am also in the process of developing a clone of the Input Shield that is part of the Game Pack for the Arduino. I am adding a second Joystick and two more momentary buttons.
My questions for this board are: has anyone worked with de-bouncing circuits and if so what would you suggest. And what, if anything, do i need to do to the signal coming from the X and Y pots.
Again, any suggestions as to functions would be greatly appreciated.

LCD Specs: http://www.optrex.com/SiteImages/PartLi ... 207cae.pdf
http://www.optrex.com/SiteImages/PartLi ... _34971.pdf

Input Shield: http://www.liquidware.com/shop/show/INPT/InputShield

Game Pack: http://www.liquidware.com/shop/show/GMP/GamePack

Let me know if i should upload the Eagle files or the Gerber files

P.S. Thank you Ladyada for all the awesome kits and inspiration. :mrgreen:
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by eil on Mon Mar 02, 2009 11:57 pm

golog1 wrote:My first project was a shield to attach a character LCD display to. I'm using a HD44780 compatible LCD (a DMC16207).
I put together a shield design to handle all the breakout for it as well as a trimmer for the contrast.
For this shield i was wondering what other functions/peripherals people would like to see in a shield of this type, and if anyone knows of a way to install a back-light onto a LCD display of this type.


There are many HD44780-compatible displays that come with backlights already. I bought a 2x16 on fleabay to the tune of $8USD (including shipping!) recently.

As far as addons to the shield, some sort of input would be nice. A couple of buttons, maybe a rotary encoder. Maybe have them disconnectable via jumpers in case the user doesn't want them taking up pins if they won't be used.

It sounds like you already plan to leave the LCD itself off the shield (connectible via headers)? If that's the case, it's probably a good plan. That way users can choose the dimensions and display color for themselves.
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

Re: Arduino 2x16 Character LCD Shield

by golog1 on Tue Mar 03, 2009 10:00 am

eil wrote:There are many HD44780-compatible displays that come with back-lights already. I bought a 2x16 on fleabay to the tune of $8USD (including shipping!) recently.

I'll check that out; however, i currently own about 10-15 2x16 LCD's without back-lights, though they do have the pin outs for the back-light. If at all possible i want to add one to the LCD, i fear that it may not be possible. Hoping that someone out there has jimmy rigged some kind of back-light that i can emulate.

eil wrote:It sounds like you already plan to leave the LCD itself off the shield (connectible via headers)? If that's the case, it's probably a good plan. That way users can choose the dimensions and display color for themselves.

Precisely, though I already have an LCD in my possession, i want it to be compatible with any HD44780 LCD.

Thanks for the suggestions Eil
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by 33warlord on Tue Mar 03, 2009 11:50 am

NuElectronics currently makes an LCD shield. I think your goal is to make it yourself and learn from it... but this may give you some ideas of features to add, and how they positioned components.

http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=2&zenid=f266e6431a26ef3607ce1da1629c839a

33warlord
 
Posts: 22
Joined: Fri Oct 31, 2008 1:12 am

Re: Arduino 2x16 Character LCD Shield

by golog1 on Tue Mar 03, 2009 12:31 pm

33Warlord wrote:NuElectronics currently makes an LCD shield. I think your goal is to make it yourself and learn from it... but this may give you some ideas of features to add, and how they positioned components.

http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=2&zenid=f266e6431a26ef3607ce1da1629c839a


Thanks Warlord, this is almost Exactly what i am doing. I'd upload my eagle files to show, but i don't have them atm. They look exactly alike. I am planning on adding a different spin to it though. don't feel that i need so many buttons, but we'll see. You were correct in assuming that i was doing this to learn, and believe me, i'm learning a lot.

Thanks again for the post.
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by golog1 on Tue Mar 03, 2009 8:18 pm

Eil, i was wondering if you thought a shift register might be better than a rotary encoder. I am assuming they serve the same purpose.
I was planning to use a 74HC595 shift-out register to cut down on pin use, but a rotary encoder might be better. Or do i totally have this FUBARed. :?

Edit:
I have been looking around and have found a way to limit the lcd pins down to 2, not including power and contrast of course.
600px-Lcdmodul_i2c_schem.png
2 pin character LCD
600px-Lcdmodul_i2c_schem.png (31.66 KiB) Viewed 9034 times
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by Ran Talbott on Wed Mar 04, 2009 1:14 am

The LED backlight assemblies used on many LCDs used to be separately available. Basically, they consist of a piece of milky white plastic, with tiny (SMD-sized) LEDs mounted on the ends to light it up. I don't know whether they're still readily-available in hobbyist quantities: I got them years ago, from Fry's, back in the days before they morphed from a "nerds' supermarket" to "big box consumer electronics chain".

You could probably make something similar, yourself, but I wonder whether it's really worth the effort for so few.

I also have some doubts about the need for an LCD shield: it ties up a fair number of scarce I/O lines, and will get in the way of working on other shield-based add-ons. I just bought one of the I2C-based LCD interfaces from web4robot.com. It only ties up two I/O pins (three if you want interrupts from its 4x4 keypad interface. Could be reduced to one if you use it in async mode and don't need to read the keypad), and the display can be mounted wherever it's convenient.

No review yet: there's no library for it, afaict, and I have another project to wrap up before I can write one.

Ran
Ran Talbott
 
Posts: 57
Joined: Thu Feb 19, 2009 1:32 pm

Re: Arduino 2x16 Character LCD Shield

by eil on Wed Mar 04, 2009 2:00 am

golog1 wrote:Eil, i was wondering if you thought a shift register might be better than a rotary encoder. I am assuming they serve the same purpose.
I was planning to use a 74HC595 shift-out register to cut down on pin use, but a rotary encoder might be better. Or do i totally have this FUBARed. :?


No, I mean a "rotary encoder" as in an input device. Think the scroll wheel on a mouse (different implementation but same concept).

Edit:
I have been looking around and have found a way to limit the lcd pins down to 2, not including power and contrast of course.


Is that the same thing as this?

http://www.arduino.cc/playground/Code/I ... derAndLCDs

If so, the downfall is that there's no built-in Arduino library for this and it increases the code size significantly. There are lots of pins on the Arduino, using 4 for the LCD ain't so bad. :)
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

Re: Arduino 2x16 Character LCD Shield

by golog1 on Wed Mar 04, 2009 3:33 pm

Hey eil,
Yeah i think that is pretty much the same thing. Not for sure, but i will do some more research and get back to you.
I tend to agree with you on the pin consumption as well. I went ahead and threw together a new schematic and PCB layout using the 74hc595 and had enough pins to add 5 buttons, a couple LED's, and a header for the 5 or 6 remaining pins plus the tx, rx, 5v, gnd, and analog pins. I'll try to incorporate a rotary encoder into it via a removable header or something, i want to do the buttons that way too. Trying to make a customizable shield of sorts. If it weren't for that fact that i really want the LCD shield, i'd probably be making some kind of shift register customizable shield instead. Either way, it's all a fun learning experience.

Here is the schematic as of last night. It has changed a bit since then, but will give you a pretty good idea of whats going on.
LCD Shield v1.2.png
LCD Shield v1.2.png (58.89 KiB) Viewed 8990 times
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by golog1 on Mon Mar 09, 2009 12:17 am

Alright, i've got the schematic down pretty well. A few minor adjustments and all will be well. I'm now trying to find a suitable place to get my PCB's printed.
I have a couple of questions:
1.) What is a reasonable price for getting 5-10 PCB's printed.
B.) Does anyone have any suggestions for a Fab house. (preferably US based) I've run across quite a few based in TX, but have no idea what to look for in a fab house.
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Re: Arduino 2x16 Character LCD Shield

by mtbf0 on Tue Mar 10, 2009 7:24 am

what about backlight control?

to control an lcd backlight by pwm, connect one of the arduino pwm outputs to the base of a small npn transistor, connect its collector to vcc, and emitter to pin 15 of the lcd. connect pin 16 of the lcd to ground.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

Re: Arduino 2x16 Character LCD Shield

by eil on Wed Mar 11, 2009 1:17 am

I think he mentioned earlier that his LCD didn't have a backlight. But yeah, that would be a good feature to have handy on a shield.

I have my backlight LED connected straight to the chip. Draws about 20mA but I read on the Atmega168 that the per-pin current maximum was 40mA, so I figured I was fine. Should I still use a transistor?
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

Re: Arduino 2x16 Character LCD Shield

by golog1 on Thu Mar 12, 2009 12:17 am

I just realized i neglected to acknowledge Ran Talbott's response. My apologies.
I do realize the limited number of IO pins, but as has been mentioned, this project is more for education purposes.
I have it down to 3 pins for the lcd, 3 pins for 6 input push buttons, 1 pin for a peizo speaker/buzzer, and, to respond to more recent posts, a pwm pin for a home made lcd back-light based on an guide from instructables.com. the rest of the pins have been broken out to allow for further expansion, but i'm not sure how to use them. I'm still doing research on rotary encoders and how to use one, but i think i might save that for my input shield project.

I am looking into pcb fabhouses now and thanks to some information from a local electronics engineering firm have found a few that might fit the bill. I would still like some input from others who have experience dealing with fabhouses on smaller scale projects. I'm not sure how i want to handle it.

Thanks again for all the input. It really helps to have more experienced developers around to offer advice.
golog1
 
Posts: 7
Joined: Mon Mar 02, 2009 1:19 am

Please be positive and constructive with your questions and comments.