loading
Picture of Hookup an LCD to an Arduino in 6 seconds with 3, not 6 pins
completed-top-view-sml.jpg
Adding an LCD display to Arduino projects can add real value but the cost of doing so can be significant. Not a financial cost - you can pick up 16 (characters) x 2 (rows) LCD for as little as £3.50. The cost is the pin count it can take to drive them. Using the built-in LiquidCrystal Display library it can take as many as 6 pins! That does not leave much for your sensors, motors and other components.

There are many projects that discuss using alternatives - such as a much more expensive Serial LCD (£10 up). Other projects discuss using two-wire interfaces, increasing the complexity of your code. The simplest way to drive the HD44780 style LCDs, in my opinion, is to use a 74HC595 shift register, taking the pin count down to 3.

In any case, connecting an LCD either using the 595 Shift Register or the more traditional way takes a lot of wiring which is not only a super mess (unless you use a ribbon cable I guess), it takes time.

This shield is simplifies this process - all that is required is power and three wires back to the Arduino - ie. connect the LCD in under 6 seconds!

Step 1: Required Components

Picture of Required Components
This is an extremely easy board to make and should take you no more than 15 minutes to solder up and have running.

Component List
    1 x 74HC595 Shift Register
    1 x BC547 NPN (or MOFSET or similar NPN)
    1 x 10k Trimmer Potentiometer
    6 x Male headers (I used right angle connectors)
    16 x Female headers
    Strip/Vero-board 17 strips x 13 holes (I used 15 for cable support)
    Hookup wire
    Your soldering kit
 
1-40 of 113Next »
I have this running great from an ATtiny85. It also has a TMP36 temp sensor to desplay the current temperature. LCD uses pins 0, 1, 2 and TMP36 uses pin 3.
Here is my version. Thanks, it was a fun project.

Hi, please where did you buy this stripboard? It was online? I just found another version with independent holes, different of yours... Sorry my English, thanks!

bitterOz (author)  matt.e.jenkins2 years ago
That is fantastic Matt. Really nice work.

Being in London, I feel those cold mornings too.

Thank-you for sharing.
R
Hey thanks bitterOz. I gave your instructables page props in the description of the above video and in the prototype video http://www.youtube.com/watch?v=1ipJzppZvVk
Thanks again, It was a fun project.
Matt
I'm wanting to build your project Matt. Any chance you could post the modified code for the attiny85?
Hi. Here's a link I made for you.
http://pastebin.com/saZ3ect9
It should contain the code.
The temp sensor I use is a TMP36 from Adafruit.com
I hope this helps.
Matt
Thanks! You should really do an instructable on this, or at the least, draw up a schematic for us noobs and post it in the description of your video.
jimpeachey made it!1 year ago

I finished it! This uses and ATTiny85 replacing the take offs for pins 7, 8,and 9 from the Arduino. I also used pins 3 and 4 from the ATTiny to run two flashing LEDs just to see how it work. This is running off a 4.5v battery pack using AAA batteries. I'm glad i got this done,it's a nice unit!

20140411_195143_zpsvps43hmv.jpg20140411_195211_zpsrbb79uhw(1).jpg
bitterOz (author)  jimpeachey1 year ago

Brilliant stuff Jim. Looks great.

GrantC628 days ago

Forget this rubbish. The library doesn't work. Don't waste your time.

GrantC628 days ago

BUT I COULD NOT GET THE BACKLIGHT TO COME ON WITH AN NPN SO I USED A PNP WORKS GOOD

I LIKE YOUR INSTRUCTIONS THEY WORKED GREAT !

Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Uno"

fatal error: LiquidCrystal595.h: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

this is what I get when I try to run the code any ideas ?

asimbhuta5 months ago

Okay so I've tried to build this on a breadboard and I have deleted the original liquidcrystal library, but I still get black boxes on the first line of the lcd. I cannot get it to print anything... Any ideas?

i can not get the librarys to work on my arduino at all dont know why

Hello! The project presented here is not working as is presented here,
if you will follow this instructable. I had the same problem like you,
and it seems that "copy-paste" method on ALL pages that describe this
metod, have the same issues. The problem can be solved if you put data
pin (wich goes to the arduino) on shift register pin 14 and LCD no. 6
pin on pin 15 of shift register. The rest is the same. Also, you can
remove the transistor from the circuit and put pin 16 of LCD to ground
(GND) and pin 15 of the LCD to + Vcc (trough a resistor about 1K if you
wish to reduce luminosity).

IMG_20150330_113622.jpg

Hello I am having a very hard time getting all this to work with the shift register

i have the 74hc595 and an HD44780 but I cant get the library to work with my

arduino version 1.6.4 i keep getting error messages it says library not found ?

and i know it is installed

koz122 months ago

How crucial is transistor Q1 where the 595 pin 6 connected to the base of Q1 feeding the LED- (16) of the LCD? from what i can tell it only controls the backlight of LCD passing GND. could pin 6 be left disconnected?

crchisholm3 months ago

I am a bit confused by the jumper that runs from the second row from the bottom between the sixth and seventh columns from right. It does not seem that this does anything since the seventh column is cut below and above this jumper. Am I miss reading something?

Thanks for the tut. Looks very good overall.

gshaw03 months ago

Thanks for writing up the article, I notice at the end you've got a Fritzing layout for the breadboard method - any chance you could send it to me? I'd like to integrate the shift register LCD into a project I'm doing and build a PCB via Fritzing, the original file would help make sure I don't get something wrong translating it across :)

AngeloP24 months ago

I cant download the library, it says, that the page has been moved to somewhere else, but there is nothing about downloading the code

jan.wouter.5 made it!4 months ago

I thought this would be easy, but of cause it never is. But that was completely due to my sloppy reading.

So I managed in the end to get it working like it should and I certainly will build more of the shields to display readings from my Arduino. This certainly enhances the possibilities like thermometer, thermostats, clocks, etc etc.

I really like it, so thanks a lot for sharing,

DSC00471.JPGDSC00470.JPG
Build_it_Bob4 months ago

I am looking at using the lcd.noBacklight() and it is not recognized at compile time ?

liquidcrystal595 has no member named "noBacklight"

Any other way to turn the backlight off using the 595 library ?

I am very happy with the functionality of this display , thanks again for sharing.

Build_it_Bob

bitterOz (author)  Build_it_Bob4 months ago

Hello Build_it_Bob,

Depending on how you have connected up
your backlight, you will need to call EITHER lcd.setLED1Pin(HIGH) OR
lcd.setLED2Pin(HIGH) (most likely LED2 if you followed the instructable)
to set the LCD backlight ON, or LOW to turn it off.

The two "setLEDxPin" commands set flags to turn on/off the port but this is not sent to the LCD immediately, it is queued and waits for the next PRINT command. So, the following code will turn the backlight off:

#include <LiquidCrystal595.h> // include the library

LiquidCrystal595 lcd(7,8,9); // datapin, latchpin, clockpin



void setup() {

lcd.begin(16,2); // 16 characters, 2 rows

lcd.setLED2Pin(LOW); // set flag to turn off backlight.



lcd.clear();

lcd.setCursor(0,0);

lcd.print("Wow. 3 pins!"); // <-- send the LCD backlight off command from the lcd.setLED2Pin(LOW) line above.

lcd.setCursor(0,1);

lcd.print("Fabulous");

}



void loop() {

// not used.

}

bitterOz,

Thanks for the follow up ; it is very helpful seeing the code this way.

I found that the output of the 595 was working the transistor properly , but there were two other things that I also had to do to make my backlight work.

I wired the collector of the 2n2222 to +5 volts and the emitter to anode of backlight pin 15.

Backlight cathode Pin 16 is connected to common ground.

The output Q6 of the 595 I connected to a 1 k resistor and then to the base of the 2n2222.

Then I also realized that the UNIQ/eVision GC-1602I1

LCD was configured to always have the backlight on when powered by using J3 shorted and J5 shorted on the back of the display.

In order to allow pin 15 anode to be powered separately , remove the solder blob on J3 with solder wick .

You will need to solder jumper J2 as this trace on the board adds a current limit resistor and allows for 5 volts to be applied to pin 15 to turn on the backlight.

Now the code works to power on the backlight and off as intended in your instructable.

The site I found that had the info on the LCD is http://symlink.dk/electro/hd44780/ ...very helpful.

Thank you again for sharing this valuable instructable; I know I will be making a few of these boards now that I have a better understanding of how it works.

Build_it_Bob

p_j_s1 year ago

Just built this - it works...did it on breadboard first, and had real problems with induced noise due to all my long jumper leads picking up random signals. Caused random garbage characters to appear on LCD. Over on the Arduino forums an electronics guru suggested adding 0.1uF caps across Vss/Vdd of the LCD, plus 0.1uF and 47uF across pin 8 & 16 (gnd and Vcc) of the 595. I did that on the breadboard but still had issues.

Now I've soldered everything down onto veroboard as per your instructions, and haven't yet added any of the suggested capacitors, and the induced noise problems seem to have gone away.

One thing I need to point out though, is that your code (sketch) fails to illuminate the backlight. You've responded to others above saying this is achievable by adding EITHER lcd.setLED1Pin(HIGH) OR lcd.setLED2Pin(HIGH) - but for me, ONLY the call to lcd.setLED2Pin(HIGH) illuminates the backlight.

Others seem to be puzzling over this and missing the additional instructions in these comments.

So, just to summarize, you need to add a call to lcd.setLED2Pin(HIGH) just after the call to lcd.begin();

Other than that, it all works great... (although it's impossible to adjust the 10k pot once the LCD is plugged into the header sockets!...minor design flaw :) )

Hello,

I have tried both lcd.setLED2Pin(LOW) and lcd.setLED1Pin(LOW) along with the lcd.begin() you suggested and the backlight stays on..

Does anyone have a simple sketch that will toggle the LCD backlight ?

I am using all the available pins on the Arduino for a project , and since the 595 is already connected I would think that there is a way to toggle the backlight with a function?

I will keep trying ...

Build_it_Bob

p_j_s p_j_s1 year ago

Oh yes, one other thing - your schematic has pin 8 of 595 unconnected...it should be connected to GND - but this isn't a problem in the veroboard layout.

Thanks for a very useful instructable.

bitterOz (author)  p_j_s1 year ago

Hi and thank-you for your comments and note of success.

Backlight. I am going to make it clearer in a coming update to this guide just how this works to avoid future confusion.

Capacitors. The joy of DC, resistance and noise. Depending on the quality of breadboards, veroboard, power supply et al will change the needs of capacitors. In reality, it is probably best to always add them however my use-case of this LCD board is for testing only, production applications are built on printed PCBs with caps. Thanks for going to the effort of adding the values to help future builders.

10k pot. Yes, it needed to go somewhere and that was the easiest place at the time, I have since swapped mine out with a right-angle pot to make it accessible (not that I have ever adjusted it beyond first-use).

GND on pin 8 of the 595. Yes, my mistake. I will update this shortly to reflect this feedback.

Thanks again. I hope you enjoy your "6-second" hookups (after an hour of building).

Build_it_Bob made it!5 months ago

bitterOz,

I built this as per your Instructable and it works nice. I printed out the vero layout sheet as it was a bit confusing at first . I labelled it up and it all made proper sense to me. Everything worked first time as well...thank you for sharing a very useful project !

Build_it_Bob

LCD 3 wires Vero diagram.JPG
mandu222 years ago
Good day!

I tried making the circuit in my breadboard, and I'm 100% sure I built it right.

However, I only get black squares on the LCD's first row as an output. Any ideas? :D
saumyak mandu225 months ago

hi all, well i was facing the exact same issue, and found out later it was due to a connection problem, with datapin from Arduino connected to pin 15 of Shift Register instead of pin 14 of the same. i was referring to this same article from a different site, http://rowansimms.com/article.php/lcd-hookup-in-seconds and http://rowansimms.com/mediagallery/mediaobjects/disp/1/1_all-connections-bboard-lrg.jpg ..... now here in the schematic pin 15 of Shift Register was connected to Arduino as the datapin, and it was causing all the problems.... just replace it with pin 14, and it works perfectly......

bitterOz (author)  mandu221 year ago
I recently built another one of these shields and noticed that if I had lots of other devices connected to my USB chain I only received the blocks you mentioned.

So I obviously had noise on my power supply lines. The quickest method I used to solve it was to plug my Arudino directly in to the host USB port.

If that is not an option to you, then add 0.1nf caps across the power lines of the shift register and possibly the LCD too.

Of course there is also a simpler explanation - you have your contrast set WAY too high, try adjusting the pent down.
bitterOz (author)  mandu222 years ago
Hi mandu22,

Have you tried:
a) adjusting the contrast?
b) try sending something like
void noDisplay();
void display();
void clear();
void home();
and then writing your text?

I have the same problem of mandu22 and tried what you say and it still doesn't work. Also a schema would be nice as well, I know this is meant for people with no electrical skills but trying to guess where stuff are connected by looking at pictures isn't the best.

bitterOz (author)  mandu222 years ago
I have another idea mandu22.

Remove the existing LiquidCrystal library from Arduino before adding this library. I believe that will solve your problem.
killercatfish7 months ago

Does need the transistor? Just wondering since I never use one when wiring up my lcd's using the breadboard version.

skunkmyrddyn8 months ago

I've built the circuit, but I cannot get the code to compile on my arduino software installation. I get a "shiftOut" not in scope.

I've looked through the code, and while I see the call to the function, I do not see where that function is defined. Is there another library that this one requires that is possibly missing from my arduino installation?

I'm using the most current for the intel galileo, and I know this software setup is a little different due to the modifications for the galileo.

1-40 of 113Next »