Hobby Components SmartLCD Backpack Module (HCMODU0162)

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

Hobby Components SmartLCD Backpack Module (HCMODU0162)

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


The SmartLCD backpack module is designed to be interfaced directly to the parallel interface of commonly available 16x02 and 20x04 LCD alphanumeric displays using the Hitachi HD44780 controller (see hobby components items HCMODU0013, HCMODU0038, & HCMODU0039 for compatible displays). Once soldered to the rear of one of these displays the SmartLCD backpack module turns these displays into intelligent serial devices which can then be controlled via either a serial UART or I2C interface. 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.

For customers wishing to purchase the SmartLCD backpack already fitted to a suitable display these are available from Hobby Components in both 16x02 and 20x04 configurations:

Hobby Components 1602 SmartLCD (SKU: HCMODU0122)
Hobby Components 2004 SmartLCD (SKU: HCMODU0163)

The SmartLCD module adds three types of interface to the parallel LCD:

Terminal Mode:


This is the out-of-the-box state (mode jumper fitted) and with no configuration required will turn a 16x2 or 20x4 LCD into a serial UART terminal display. Just connect any device with a serial UART interface (9600 default BAUD rate) to the SmartLCDs UART header and the SmartLCD will automatically output any ASCII printable text it receives to the LCD. As well as printable text the SmartLCD also supports several ASCII control codes such as line feed, carriage return, backspace, delete etc.

AT Command Mode:

In AT command mode (mode jumper removed) the SmartLCD module can be controlled using simple text based ‘AT’ commands via its serial UART header. AT command mode adds a significantly greater level of control of the LCD, including precise positioning of text, backlight and contrast controls, custom characters, etc. As they are simple serial text commands they can be sent to the module using a microcontroller's serial print function such as an Arduinos built-in Serial.println() function.

I2C Mode:


Serial I2C mode gives the same level of control as AT command mode but also takes advantage of the I2C two-wire serial interface protocol. In this mode the module is addressable, allowing for multiple modules to be daisy-chained from a microcontrollers I2C interface.

For Arduino users wanting to take advantage of this mode we have written a library (SmartLCD) and example sketches to make controlling the SmartLCD module from your own sketches as simple as possible. The library will give full control of the SmartLCD using a set of straightforward library commands. The SmartLCD library can be downloaded from the software section of our support forum here:



Turns a 16x2 or 20x4 alphanumeric character display into a smart serial device.
In terminal mode no software or drivers are required to initialise 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.

Terminal 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.

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.

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.

Model number: HCMODU0162
Supply voltage: 5V
Display type: Supports 16 x 2 or 20 x 4 alphanumeric HD44780 LCDs
Supply current: 9.8mA
Interfaces: I2C, serial UART and external keypad
Module dimensions: 42mm x 23.5mm

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:


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

Optional Features - LCD Keypad kit


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


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.


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

http://hobbycomponents.com/downloads/Sm ... 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:

http://forum.hobbycomponents.com/viewto ... =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.

Posts: 3
Joined: Fri Jan 15, 2021 3:06 pm

Re: Hobby Components SmartLCD Backpack Module (HCMODU0162)

Post by PH1` » Fri Jan 22, 2021 12:34 pm


I have just started using the SmartLCD backpack with a 2004 LCD display. It is working in Terminal Mode but when I switch to AT Command Mode I just get a blank display. I have reverted from my PIC based controller to checking with Teraterm on my PC. On display power on I get <HELLO>, when manually typing <AT><cr><lf> I get <OK>. The problem starts when I add the <+> character to the command as I then get an instant <ERROR> response. If I then revert the display to Terminal Mode everything, including <+> displays as expected. Any suggestions on what I am doing wrong as I would prefer to us AT command Mode and simple printf statements for my application. I see a previous poster had a very similar issue with a Smart 1602 display. Was this ever resolved?

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

Re: Hobby Components SmartLCD Backpack Module (HCMODU0162)

Post by andrew » Fri Jan 22, 2021 2:21 pm

when manually typing <AT><cr><lf> I get <OK>. The problem starts when I add the <+> character to the command as I then get an instant <ERROR> response
By default it has to receive the full command within 2 seconds otherwise it assumes something went wrong with the communication and returns an error. This timeout time can be changed but obviously you'd need be able to send a full command to do that.

For test purposes have you tried pasting the command into Tera Term using the Edit->Paste <CR> option. Remember to set CR+LF for the Transmit option under Setup->Terminal first.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Posts: 3
Joined: Fri Jan 15, 2021 3:06 pm

Re: Hobby Components SmartLCD Backpack Module (HCMODU0162)

Post by PH1` » Fri Jan 22, 2021 3:52 pm


I appreciate that when too slow manual typing I will get a timeout but I get the same responses when I send characters back to back from my PIC circuit. I will try a PIC based command to extend timeout. It might be Monday now before I have an answer.

Posts: 3
Joined: Fri Jan 15, 2021 3:06 pm

Re: Hobby Components SmartLCD Backpack Module (HCMODU0162)

Post by PH1` » Fri Jan 22, 2021 4:14 pm


Now sorted. Was sending "\n\r" as terminator from my PIC circuit. Corrected to "\r\n" and it springs into life. OOPs. Classic case of finger trouble :oops: Hope this comment helps someone else.

Thanks for you help.

Post Reply

Return to “Modules”