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

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
<p>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!</p>
<p>Hey, how did you get your display multiple lines like that? I'm a noob and I need help haha</p>
<p>Its a 4 line display. im not sure what you mean by the question?</p>
<p>Brilliant stuff Jim. Looks great.</p>
<p>I thought this would be easy, but of cause it never is. But that was completely due to my sloppy reading.</p><p>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.</p><p>I really like it, so thanks a lot for sharing,</p>
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. <br><iframe frameborder="0" height="315" src="http://www.youtube.com/embed/qKhqDKkguL4" width="560"></iframe>
<p>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!</p>
That is fantastic Matt. Really nice work.<br><br>Being in London, I feel those cold mornings too.<br><br>Thank-you for sharing.<br>R<br>
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 <br>Thanks again, It was a fun project. <br>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. <br>http://pastebin.com/saZ3ect9 <br>It should contain the code. <br>The temp sensor I use is a TMP36 from Adafruit.com<br>I hope this helps.<br>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.
<p>I made it. But my LCD would not show any text. Is it the potentiometer problem or something else as the the backlight also blinks sometimes. The lcd backlight is always ON but nothing else.</p>
<p>Made it without the NPN transistor</p>
<p>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?</p>
<p>Hello! The project presented here is not working as is presented here, <br>if you will follow this instructable. I had the same problem like you, <br>and it seems that &quot;copy-paste&quot; method on ALL pages that describe this <br>metod, have the same issues. The problem can be solved if you put data <br>pin (wich goes to the arduino) on shift register pin 14 and LCD no. 6 <br>pin on pin 15 of shift register. The rest is the same. Also, you can <br>remove the transistor from the circuit and put pin 16 of LCD to ground <br>(GND) and pin 15 of the LCD to + Vcc (trough a resistor about 1K if you <br>wish to reduce luminosity).</p>
<p>Finally resorted to removing the transistor as you suggested and works fine. Still have not been able to figure out why the Arduino LED of digital pin 13 stays lit though.</p>
<p>i can not get the librarys to work on my arduino at all dont know why </p>
<p>HI, firstly thank you for this instructable. I made it and literally burnt the midnight oil working till 2 AM and was frustrated that it didn't work. The following morning I found the flaw in a few minutes and now it works like a charm. There is a mistake I would like to point out in one of your diagrams though and I have attached the picture to show where the error is. Hope you would correct the original picture.</p><p>Two other question I have are</p><p>(a) why does the LED corresponding to pin 13 on the Arduino stay lit after displaying the message?</p><p>(b) How do I get the back light to come on?</p><p>Please advise.</p>
<p>can u please mail the library zip file to sangeeth123@gmail.com. i cant download from the link above</p>
<p>Hi sir, i already built the circuit according to the steps , load the program and use the library from new website, but suddenly the output is no display, and also the backlight turned-off when i am trying to reset the arduino board and never turn-on again.</p>
<p>I have every thing up and running very good now thanks all </p>
<p>You did not explained well at start therefore I had to start the whole soldering from the begining.</p>
<p>... read, read again ... start!</p><p>Enjoy!</p>
<p>OK now I was able to make it. But the code compiling is not successful. The library page has moved to somewhere else. Ahhhh. </p>
<p>I cant download the library, it says, that the page has been moved to somewhere else, but there is nothing about downloading the code</p>
<p>This should be fixed now AngeloP2. </p><p>This was caused by Google closing down their service. We found a new home with BitBucket now.</p>
<p>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 :)</p>
<p>Of course. Send me a private message and I'll mail it to you.</p>
<p>Hello I am having a very hard time getting all this to work with the shift register </p><p>i have the 74hc595 and an HD44780 but I cant get the library to work with my </p><p>arduino version 1.6.4 i keep getting error messages it says library not found ?</p><p>and i know it is installed </p>
<p>you could try and remove the existing LiquidCrystal library, quit the IDE and restart it. </p><p>Let me know if that works for you.</p>
<p>can you tell me why the transistor is even there?</p>
<p>The NPN is there so you can turn on/off the backlight of the LCD via code. If you do not wish to have this feature, you can bypass it. By default, the display is ON.</p>
<p>Hi!</p><p>First thank you, it is a great idea and so useful (i run out of pins :D)<br>However I have a problem. When I connect everything it worked. Then the second time on the LCD there is just some boxes in the first row, nothing in the second. The potmeter works fine, but its only effect, the boxes became brighter. No text, no hello world, no nothing. What could be the problem? </p><p>I checked the every connections, it should be good.</p>
<p>Hi. I have not seen this behavior before. Are you still experiencing the same issue? Perhaps put a delay(2000); in setup() to give the all the components a little time to settle.</p>
<p>Arduino: 1.6.4 (Windows 8.1), Board: &quot;Arduino Uno&quot;<br><br> fatal error: LiquidCrystal595.h: No such file or directory<br>compilation terminated.<br>Error compiling.<br><br> This report would have more information with<br> &quot;Show verbose output during compilation&quot;<br> enabled in File &gt; Preferences.</p><p>this is what I get when I try to run the code any ideas ?</p>
<p>HI electric1981.</p><p>Sounds like the library has not been installed correctly. Can you please check your library folder and make sure the LiquidCrystal595 folder is there and contains the LiquidCristal595.h file?</p>
<p>Forget this rubbish. The library doesn't work. Don't waste your time.</p>
<p>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?</p>
<p>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?</p><p>Thanks for the tut. Looks very good overall.</p>
<p>I am looking at using the lcd.noBacklight() and it is not recognized at compile time ?</p><p>liquidcrystal595 has no member named &quot;noBacklight&quot;</p><p>Any other way to turn the backlight off using the 595 library ?</p><p>I am very happy with the functionality of this display , thanks again for sharing.</p><p>Build_it_Bob </p>
<p>Hello Build_it_Bob,</p><p>Depending on how you have connected up <br>your backlight, you will need to call EITHER lcd.setLED1Pin(HIGH) OR <br>lcd.setLED2Pin(HIGH) (most likely LED2 if you followed the instructable) <br> to set the LCD backlight ON, or LOW to turn it off. </p><p>The two &quot;setLEDxPin&quot; 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:</p><p>#include &lt;LiquidCrystal595.h&gt; // include the library<br> <br>LiquidCrystal595 lcd(7,8,9); // datapin, latchpin, clockpin<br> <br><br> <br>void setup() {<br> <br> lcd.begin(16,2); // 16 characters, 2 rows</p><p> lcd.setLED2Pin(LOW); // set flag to turn off backlight.</p><p><br> <br> lcd.clear();<br> <br> lcd.setCursor(0,0);<br> <br> lcd.print(&quot;Wow. 3 pins!&quot;); // &lt;-- send the LCD backlight off command from the lcd.setLED2Pin(LOW) line above.<br> <br> lcd.setCursor(0,1);<br> <br> lcd.print(&quot;Fabulous&quot;);<br> <br>}<br> <br><br> <br>void loop() {<br> <br> // not used.<br> <br>}</p>
<p>bitterOz,</p><p>Thanks for the follow up ; it is very helpful seeing the code this way.</p><p>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.</p><p>I wired the collector of the 2n2222 to +5 volts and the emitter to anode of backlight pin 15. </p><p>Backlight cathode Pin 16 is connected to common ground.</p><p>The output Q6 of the 595 I connected to a 1 k resistor and then to the base of the 2n2222.</p><p>Then I also realized that the UNIQ/eVision GC-1602I1</p><p>LCD was configured to always have the backlight on when powered by using J3 shorted and J5 shorted on the back of the display. </p><p>In order to allow pin 15 anode to be powered separately , remove the solder blob on J3 with solder wick .</p><p>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. </p><p>Now the code works to power on the backlight and off as intended in your instructable. </p><p>The site I found that had the info on the LCD is http://symlink.dk/electro/hd44780/ ...very helpful. </p><p>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.</p><p>Build_it_Bob </p>
<p>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 &amp; 16 (gnd and Vcc) of the 595. I did that on the breadboard but still had issues.</p><p>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.</p><p>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. </p><p>Others seem to be puzzling over this and missing the additional instructions in these comments. </p><p>So, just to summarize, you need to add a call to lcd.setLED2Pin(HIGH) just after the call to lcd.begin();</p><p>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 :) )</p>
<p>Hello, </p><p>I have tried both lcd.setLED2Pin(LOW) and lcd.setLED1Pin(LOW) along with the lcd.begin() you suggested and the backlight stays on.. </p><p>Does anyone have a simple sketch that will toggle the LCD backlight ?</p><p>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?</p><p>I will keep trying ...</p><p>Build_it_Bob</p>
<p>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.</p><p>Thanks for a very useful instructable.</p>

About This Instructable


173 favorites


More by bitterOz: Hookup an LCD to an Arduino in 6 seconds with 3, not 6 pins
Add instructable to: