Project showcase
4 Wire LCD Control with BL and Contrast Using Shift Register

4 Wire LCD Control with BL and Contrast Using Shift Register © GPL3+

Control a 16x2 LCD, including contrast and backlight in code, using a shift register. Includes library with fade and backlight functions.

  • 2,491 views
  • 0 comments
  • 11 respects

Components and supplies

181 02
Adafruit Standard LCD - 16x2 White on Blue
×1
Fairchild semiconductor pn2222abu. image
General Purpose Transistor NPN
2N1702N used in prototype.
×1
STMicroelectronics MMBT3904
1AM used in finished product.
×1
Texas Instruments SN74HC595N
Used in prototype.
×1
NXP 74HC595D
Used in finished product.
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
Transistor Base Resistor. Used in prototype.
×1
SMD Resistor 10kΩ
Used in finished product.
×1
Mfr 25fbf52 475r sml
Resistor 475 ohm
Current Limiting for LED backlight. Used in prototype.
×1
SMD Resistor 470Ω
Used in finished product.
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
Ard nano
Arduino Nano R3
×1

Necessary tools and machines

09507 01
Soldering iron (generic)
Optional

Apps and online services

About this project

UPDATE

Though the homemade PCB worked flawlessly, I redesigned the board using surface mount components and with the ability to sit completely under the board instead of poking out the top (though it can be situated either way depending on how the headers are soldered). When I was satisfied with the design, I had a few made through EasyEDA. A week or so, and a bit of soldering, later, and these are the results:

I have a handful of extra boards, and the components, if anyone is interested in them. I'm happy to share the Eagle I used for production as well if there is interest in having it made yourself. Feel free to contact me.

How it Works

Looking for the ability to control an LCD from Arduino without having to use 12 pins? I designed a breakout board featuring a 74HC595 shift register and an NPN transistor with the ability to control the display (including backlight control) with either 4 wires allowing control of contrast through code, or 3 wires allowing the addition of a potentiometer for static contrast. If controlling contrast via code, the included modified LiquidCrystal library adds fade_in(), fade_out(), and highlight() functions. In addition lcd.backlight() and lcd.no_backlight() will control whether the backlight is active or not.

The project was recreated in Fritzing showing a breadboard diagram, schematic, and recreation of EAGLE PCB design used in my case.

16x2 LCD being controlled via SPI through 74HC595 shift register, showing custom fade_in(), hightlight(), and fade_out() functions with backlight control.

Code

LiquidCrystal_custom
Modified LiquidCrystal library with the addition of contrast and backlight control, and fade/highlight functions.

Schematics

LCD Using 74HC595 and SPI
Project recreated in Fritzing including breadboard diagram, schematic, and possible PCB design for breakout board.
lcd_using_74hc595_and_spi_27y47DArTe.fzz

Comments

Similar projects you might like

LCD Backlight and Contrast Control

Project showcase by zurrealStudios

  • 3,496 views
  • 2 comments
  • 6 respects

Easily Wire a 16x2 LCD

Project showcase by Thomas Kroon

  • 2,025 views
  • 0 comments
  • 9 respects

Servo Control with TV Remote Control

Project showcase by eldo85

  • 5,593 views
  • 5 comments
  • 17 respects

Arduino Keyless Door Lock System with Keypad and LCD

Project tutorial by DIY Hacking

  • 15,297 views
  • 9 comments
  • 43 respects

Remote Control Car w/ PocketBeagle and Arduino

Project tutorial by Christina Mezmur

  • 3,281 views
  • 3 comments
  • 12 respects

Control 8 x 8 LED Matrix with Only Two Shift Registers

Project showcase by Jegqamas

  • 1,489 views
  • 0 comments
  • 6 respects
Add projectSign up / Login