0

members

Easy Basics: Project 045b LCD 2004 I2C module

of Acoptex.com in UNO

Basics: Project 045b

Project name: LCD 2004 I2C module

Tags: LCD2004, LCD 2004 I2C module, I2C/TWI Interface,

Attachments: sketch1, sketch2, sketch3libraryNewLiquidCrystal

Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you

In this project, you needed these parts :

1.Arduino Uno R3 (you can also use the other version of Arduino)

2.LCD 2004 I2C module (or LCD2004 + I2C Driver module)1 pc

3.Arduino IDE ( you can download it from here  )

4.Jumper cables F-M

General

In this project, we will learn how to use an LCD2004 I2C module to display characters and strings. 

Understanding LCD 2004 I2C module

The latest I2C LCD2004-character LCD display module, a new high-quality 4 line 20 character LCD module not only set the contrast control knob selector switch also has a backlight and I2C communication interface. For Arduino beginners, not for the cumbersome and complex LCD driver circuit connection and a headache, the real significance of this LCD module will simplify the circuit, this module directly into the Arduino Sensor Shield V5.0 sensor expansion board I2C device interface can, GM 4P sensor connection cable, programmed through the Arduino controller, you can easily identify the slogan, sensor data records

It is able to display 20x4 characters on two lines, white characters on blue background.

Generally, LCD 2004 display will run out of Arduino pin resource. It needs 6 digital pins and 2 power pin for a LCD display. 

This I2C 20x4 LCD display module is designed for Arduino microcontroller. With this I2C ommunication interface, only 2 lines (I2C) are required to display the information on any Arduino based projects. It will save at least 4 digital / analog pins on Arduino. All connector are standard XH2.54 (Breadboard type). You can connect it with jumper wire directly. 

he "backpack" modules used on these displays utilize PCF8574A IC Chip. You can read specification here.

Specification of LCD2004 I2C module:

  • I2C Address:0x3F or 0x27
  • Pin Definition : GND,VCC,SDA,SCL
  • Number of Characters: 20 characters x 4 Lines
  • Blue LED backlight with white char color
  • Adjustable contrast
  • Supply voltage: 5V(via Pin)  3.3V(via IDC10)
  • Interface: IIC/TWI x1,IDC10 x2
  • View direction: Wide viewing angle
  • Dot size: 0.55 x 0.55 mm(0.02x0.02")
  • Dot pitch: 0.60 x 0.60 mm(0.023x0.023")
  • Character size: 2.96 x 4.75 mm(0.11x0.19")
  • Character pitch: 3.55 x 5.35 mm(0.14x0.21")
  • Size: 98x60x24mm(3.86x2.36x0.94")

You can read the specification of LCD2004 here.

Signals and contacts of LCD 2004 I2C module

As you can see on the back of LCD 2004 I2C module there are 4 connections: GND (-), VCC (+5V), Serial Data Line (SDA),(Arduino SDA pin)  and Serial Clock Line (SCL) (Arduino SCL pin).

Arduino boards I2C Pins:

Board SDA SCL

Uno          A4 A5

Mega2560 20 21

Leonardo      2 3

Due            20 21

Wiring

The following picture shows the needed connections between the LCD 2004 I2C module and the Arduino Uno.

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port
  2. find the I2C address
    Find your I2C address. Each device has an I2C address that it uses to  accept commands or send messages. Load the sketch over at http://playground.arduino.cc/Main/I2cScanner and follow the instructions to use it.  By opening up the Serial monitor window after you upload the sketch, Arduino will scan the address range looking for a reply.  Even though the documentation said it was 0x27, this scanner can detect different (in my case 0x3F)
  3. Modify the sketch in attachments above (you can use the sketch below too): the line LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE) (See part marked bold)
  4. Verify and upload the the sketch to your Adruino Uno.

Libraries:

  • See attachments on the begining of this project description.
  • We have used the library - NewliquidCrystal_1.3.4.zip which we downloaded, unzipped, changed the name of folder to LiquidCristal and added to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC.
  • If you have LiquidCristal folder in this location already - delete this folder and copy folder, which was made by you, to this location.

Sketch:

  • See attachments on the begining of this project description.



Other projects of Acoptex.com
Medium Basics: Project 083w Sipeed Maixduino board - Using PlatformIO IDE of Acoptex.com in Sipeed Maixduino 08-08-2019
Medium Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy of Acoptex.com in Sipeed Maixduino 04-08-2019
Medium Basics: Project 083f Sipeed Maixduino board - Using MycroPython of Acoptex.com in Sipeed Maixduino 04-08-2019

Published at 14-11-2017
Viewed: 2190 times