Look for in our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

How to connect an LCD screen to an Arduino based PLC

Introduction

On this post it is showed how to connect a LCD screen to an Arduino based PLC. On this post it is used an LCD 2004A model and an Ardbox PLC family. This example will work with any PLC from M-Duino family.

Requirements

Description

How to connect these devices?

Next it is showed an electric diagram of how to connect Arduino based PLC and LCD screen:

As you can see is required to use I2C and SPI pins, so you can not use these communications using a LCD screen without any driver. Normally is recommended to use LCD screen with a I2C driver. Unfortunately using these pins it’s not possible to use some I/Os of the PLC. Take a look on how to configure the switches to know which I/Os are disable.

Once the devices are set juts is requires the software to make it run properly. For this post it is used a very useful Arduino library called LiquidCrystal. LiquidCrystal allows an Arduino board or Arduino based PLC to control LCD’s based on Hitachi HD44780 or compatible chip-set. The library works for 4- or 8-bit mode. On this post, as you can see on the wiring, it is installed just with 4-bit mode.

How to install the software?

LiquidCrystal is included by default when you install Arduino IDE. So you just have to called on your sketch. See more information of this library HERE. The lines below is showed a simple example of how to use LiquidCrystal library:

Connect with us

Explain the benefits you offer. Don't write about products or
services here, write about solutions.

Based in Barcelona and founded in October 2012, Industrial Shields is the brand under the company Boot and Work Corp S.L. We are a company with the aim to become the biggest e-commerce of industrial automation electronic devices based on Open Source Hardware electronics. Our goal is to offer the widest choice of products at a very reasonable costs compared with the products that are developed under the current market leaders.