Connect an 16x2 LCd display for Arduino to Raspberry PI 3


6 posts
by John Public » Fri Feb 17, 2017 12:13 pm
I have a 16x2 display unit that is soldered to an Arduino UNO LCD keypad shield.
There are many instruction videos on how to connect this typical 16x2 lcd display to Raspberry without the Arduino shield which in my case is redundant. It's allready solder to the LCD but the pins on the back of teh shield stick out I could use them easily - ie the display unit should be easyly attached on top of an Arduino Uno.
Does anyone know how I could connect the pins in the LCD-Arduino shield to a Raspberry Pi?. What caveats are there. Can i just connect the Arduino shield 5V & ground pins to corresponding pin on the Raspberry. I don't want to damage my systems.
Posts: 43
Joined: Thu Jan 16, 2014 2:16 pm
by DougieLawson » Fri Feb 17, 2017 3:03 pm
Do you have any technical details of what you've got.

Most LCDs even when they run at 5V0 are OK with being triggered from a RPi's 3V3 GPIO pins. If it uses I²C then it becomes ever more trivial. I've 16x2 LCDs on at least four of my Raspberries and each one is wired in a different way (MCP23017, MCP23S17, PCF8574 and directly on six GPIO pins).

Code to drive them is here: https://github.com/DougieLawson/Raspber ... nified_LCD
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 26082
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by John Public » Fri Feb 17, 2017 3:24 pm
The Aliexpress page where I bought it:
https://www.aliexpress.com/item/Free-Sh ... 0.0.JJHQl7

It says: LCD Keypad Shield LCD1602 LCD 1602 Module Display for arduino ATMEGA328 ATMEGA2560 raspberry pi UNO blue screen

Unfortunately the model number can't be seen since the shield is soldered
Posts: 43
Joined: Thu Jan 16, 2014 2:16 pm
by DougieLawson » Fri Feb 17, 2017 9:12 pm
There's more details here: https://www.dfrobot.com/wiki/index.php/ ... U:_DFR0009)

You should be able to get the display running from a Raspberry, it's just a case of identifying the right pins. Getting the buttons and switches will be harder as they appear to use the Arduino's analog interface pins.

The easy way would be to use an Arduino. Connect the Arduino as a serial device with the USB as normal and send the commands and key presses across that interface.

Aliexpress has a clone Arduino Uno for $3.30.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 26082
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by Gavinmc42 » Sat Feb 18, 2017 12:35 am
Tie the R/W low so the PI can only write to the LCD driver chip.
This avoids reading back and 5V from the LCD going into the 3V3 GPIO on the Pi.
3V3 GPIO is higher than the required 2.7 so it should work on most/all 44780 based LCD.
You can then just use 6 pins, RS, E, D4-7.
All this is for a normal LCD module as you know.

That Arduino one looks like it is i2c, this has been done before and I think there is already drivers.
5V to 5V, Gnd to Gnd, SDA to SDA, SCL to SCL,
Probably a clone/copy of the Adafruit one based on the MCP23017 i2c chip but without data sheet hard to say from an ebay type picture.

Ridiculous pricing and only $0.32 for shipping, and pretty much useless unless you have a circuit diagram.
Posts: 732
Joined: Wed Aug 28, 2013 3:31 am
by rpdom » Sat Feb 18, 2017 9:48 am
Gavinmc42 wrote:3V3 GPIO is higher than the required 2.7 so it should work on most/all 44780 based LCD.

Some 44780 datasheets specify 0.7 x Vsupply, which means 0.7 x 5 = 3.5V. The 3.3V of the gpio may not be enough to drive these.

One of the regulars on here (can't remember exactly who, but I have a couple of ideas) suggested putting a diode in series with the 5V supply to the display, which will drop Vsupply to 4.7V or less. 4.7 x 0.7 = 3.29V so the display will work.

None of the displays I have tried have needed this trick, but it is handy to know.
User avatar
Posts: 10303
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK