Hobby Components 2004 SmartLCD (HCMODU0163)

Hobby Components modules
Post Reply
admin
Site Admin
Posts: 883
Joined: Sun Aug 05, 2012 4:02 pm

Hobby Components 2004 SmartLCD (HCMODU0163)

Post by admin » Thu Sep 10, 2020 9:04 am

Image





The 2004 SmartLCD module is a serially controlled 4 line by 20 character alphanumeric LCD display. Unlike most serial LCD modules on the market the 2004 SmartLCD includes a microcontroller which gives the module a rich set of features. It also requires no software or libraries to initialise the display, output text to the screen or control the features of the module, which reduces development time and frees up much needed resources in your microcontroller or development board. The SmartLCD can be used in one of 3 modes:


Image


PASSIVE SERIAL (TERMINAL) MODE

Image

With passive serial mode no libraries or special configurations are required, just hook it up to your microcontroller's serial port and display any text output from the port. That's it!



SERIAL AT COMMAND MODE

Serial AT command mode also allows you to display text via a serial port but adds more control via simple to use text based AT commands - print text anywhere on the screen, control the brightness and contrast or even read the status of the push buttons on the optional SmartLCD keypad.



I2C MODE

Image

Finally in I2C mode multiple screens can be connected to one I2C port. For Arduino users just install the SmartLCDI2C library (download from our support forum) and control all the features of the SmartLCD from simple I2C commands.




Features:


Image

20 character by 4 line LCD display module.
Very clear white text with blue backlight.
No software or drivers required to setup or control the module.
Software backlight control with 11 brightness levels.
Software contrast control.
External keypad with buzzer support (optional extra, see item HCKITS0058).
Single 5V operation.


I2C Mode

Control multiple displays from one I2C bus.
Software control of all module features via simple I2C commands.
I2C address configurable via software from 0x08 to 0x77 (default 0x27).
Built-in 10K pull-up resistors for clock SCL and data SDA lines.
Access to external keypad and buzzer.

Serial AT command mode

Software control of all module features via simple AT text commands.
Software configurable baud with 8 different speeds (9600 BAUD default).
Access to external keypad and buzzer.

Serial passive mode

Compatible with 5V serial UART devices (9600 baud default) – no microcontroller required.
Automatically displays any printable ASCII text.
Responds to a number of additional extended ASCII control codes.



Specifications:

Model number: HCMODU0163
Supply voltage: 5V
Display type: 20 character x 4 line alphanumeric LCD
Display technology: STN negative blue / transmissive polariser
Supply current: 44mA (backlight on) / 9.8mA (backlight off)
Interfaces: I2C, serial UART and external keypad
Module dimensions: 98mm x 60mm x 21mm
Bezel dimensions: 97mm x 40mm




Arduino Example - Printing to the screen in AT command mode

This example demonstrates how simple it is to control the LCD in AT command mode using an Arduino. The example uses the Arduinos built in serial print function to send the AT commands to clear the screen and print 'HELLO WORLD!' to the screen. No special libraries or setting up required! Just connect the LCD to your 5V Arduino as follows:

ARDUINO.......SMART LCD
GND..............GND
5V.................5
TX.................Rx

  1. void setup()
  2. {
  3.   Serial.begin(9600);                 //Initialise the serial UART
  4.  
  5.   Serial.println("AT+CLR");           //Clear the screen
  6. }
  7.  
  8. void loop()
  9. {
  10.   Serial.print("AT+PR=");             //Send the AT print command
  11.   Serial.println("HELLO WORLD !");    //Send the text to print.
  12.  
  13.   while(1);                           //Do nothing
  14. }




Optional Features - LCD Keypad kit

Image

The SmartLCD's features can be further expanded with the addition of the Smart LCD keypad (see item SKU: HCKITS0058). This add-on board connects to the SmartLCD's keypad header using a single 4 way cable. Once connected it adds the additional features of keypad control (up, down, left, right, select, and back) and audible output to your end application. Access to button states and speaker output is then available via the SmartLCD's I2C or UART interfaces using its built-in commands (see the software section of the SmartLCD manual for more information).


Wireless access

Image

A bonus feature of the Smart LCD, due to it not requiring initialisation by a microcontroller, is it's ability to operate wirelessly using a suitable serial wireless pass-through module. Here in the diagram below you can see a remote control application of the Smart LCD and
keypad with the addition of HC-05 Bluetooth slave (see item SKU: HCARDU0004) and Bluetooth master (see item SKU: HCARDU0064) modules.




Image

The reference manual for the SmartLCD backpack module can be downloaded here:

https://hobbycomponents.com/downloads/S ... V1.1.0.pdf


If you wish to interface the SmartLCD to an Arduino via its I2C interface we have written an Arduino library that will help simplify your sketch. This can be downloaded from the software section of our forum here:

viewtopic.php?f=58&t=2206




Disclaimer: Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.

RogerL
Posts: 35
Joined: Mon Apr 14, 2014 7:56 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by RogerL » Wed Feb 26, 2025 11:32 am

Hi Andrew. My tour of all your display modules continues.....

I dabble a bit in building retro computers on breadbaords using 1970s/80s chips. I checked out the manual for this display and spotted the following quote in the Terminal Mode section:

" In this mode the SmartLCD will automatically display any printable ASCII text
received via its UART Rx pin. This allows the module to be used as a simple terminal
display. "

I thought this would be an interesting module to build into one of my creations hooked up to a UART chip, so added one to my last order. To test it out I hooked it up to a Uno with the following code:

// basic program to test HC 2004 Smart LCD in UART mode

void setup() {
//Initialise the serial interface
Serial.begin(9600);

//Print something
Serial.println("1111112345678901234");
Serial.println("2222212345678901234");
Serial.println("3333312345678901234");
Serial.println("4444412345678901234");
}

void loop() {

}

Unfortunately, the display choked on the data and it dropped several characters. I ended up having to put delays between the print statements to get all the data on the screen. Because I want to use the display as a diagnostic tool, I need something that does what it says in the manual and just prints anything I throw at it, which will often be a full 80 characters, and may be more, at full line speed. Is this beyond the capabilities of the display?

andrew
Site Admin
Posts: 1459
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by andrew » Wed Feb 26, 2025 3:55 pm

Hi Roger,

Although the display can handle serial data at various BAUD rates it is limited to how fast it can write the data to the display. With it being a character LCD this is of course relatively low compared to the BAUD rate. It does however have limited serial buffer. So as long as the buffer doesn't fill up then it should eventually be able to display all the characters sent to it without dropping any. It certainly should be able to handle your sketch without dropping characters.

If you can bear with me, I will grab a display out of stock tomorrow and take a look.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

andrew
Site Admin
Posts: 1459
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by andrew » Thu Feb 27, 2025 12:52 pm

So just to follow up on this, I’ve taken a look and I have been able to replicate what you are reporting.

I’ve pinned the issue down to a problem with the firmware, in particular it is being caused by a change to a UART library that caused the serial buffer to be cropped to 50 bytes. This change seems to have crept into a recently released firmware update (V1.3).

I have now fixed the firmware and rolled it into V1.4 which will be the version included in displays sold going forward.

With regards to the V1.3 display you have, I will email you shortly to confirm a solution.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RogerL
Posts: 35
Joined: Mon Apr 14, 2014 7:56 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by RogerL » Thu Feb 27, 2025 7:09 pm

With regards to the V1.3 display you have, I will email you shortly to confirm a solution.
That's great - thanks.

RogerL
Posts: 35
Joined: Mon Apr 14, 2014 7:56 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by RogerL » Mon Mar 03, 2025 10:09 am

Hi Andrew. Just to wrap this up, I can confirm that v1.4 seems to be working fine in UART mode with no dropped characters. Thanks for sorting this out so promptly.

andrew
Site Admin
Posts: 1459
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 2004 SmartLCD (HCMODU0163)

Post by andrew » Tue Mar 04, 2025 10:46 am

Great stuff. Thanks for letting me know.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Modules”