Serial LCD

I'm working on building a power supply and wanted to use an encoder and a LCD with my arduino UNO. Here's a little about the project:

I'm going to simulate the orbital path of a cube satellite by using a current sensor to read the output current and use a comparator to check and see if the current goes above my set limit. If it does, drop the output voltage until current drops below my set limit. I'm looking to see how efficient the power converter on the satellite is by reading the output power and the load power and sending that over serial to a computer to record the efficiency across the entire orbital path.

What I'm looking to do is use a rotary encoder with a switch to change my output voltage, current limit, and simulation time which will be controlled using the arduino and have those values displayed on an LCD. I want to send my output voltage and current, and my load voltage and current back to my computer to be recorded. I won't have enough digital pins to use the liquid crystal library so a serial LCD is all I have room for, but since I'm already using my serial lines I need another pin to act as a separate TX line. When I first got my serial LCD I found example code using D3 but can't seem to find that anymore.

Does anyone know how I can create extra serial lines for my UNO? Thanks for the help ahead of time.

There are several ways to approach this.

If you want to use a traditional ‘serial’ LCD then there is the ‘Software Serial’ library.

There are also serial LCDs that use the I2C interface and I believe there are others that use the SPI interface.

You can also use a traditional parallel LCD with your own I2C, SPI, or shift register interface.


You will need to include the SoftwareSerial library. There are two examples under the arduino->file->examples->software serial.

If you want to do this, I may suggest you check out my own design of a serial display. I'm in the process to update its firmware to support a rotary encoder and a button so your arduino just needs to read serial to find out if a button is pushed or the encoder is turned one detent up/down.

this is exactly what I was looking for. thank you both for the help.

Liudr, I recently purchase 3 of your serial backpacks from your iNMOJO store. I have mounted the backpack on to a 20x4 LCD display. I have learned how to use Xloader to upload hex files to the serial backpack. Currently, I have the phi_panel_20x4_panel_1_6_2.hex firmware loaded. I have run the phi_panel_big_show_NSS.pde Everything works fine except instead of the 4x4 keypad interface I wish to use a Rotary encoder.

Can you provide or point me to the correct firmware that supports a rotary encoder?

Regards, Igor27


Sorry I was tied up with recent builds of projects. Please find the rotary encoder firmware attached here as attached. Both 16X2 and 20X4 displays. My google code site is probably down (google decides not to do code site anymore) and I couldn’t upload to google code site. Please refer to the connection guide for rotary encoder. I’ll get you some updates on where I will be hosting these files and their updates.

Instruction at the end:

If you want a rotary encoder keypad kit, let me know. I’m going to order some circuit boards for the kits.

phi_panel_backpack_16X2_1_6_4(rotary+5keys).hex (67 KB)

phi_panel_backpack_20X4_1_6_4(rotary+5keys).hex (67 KB)


Thank you for the firmware. I will be ordering at least one rotary encoder keypad kit from your InMojo store.

I have built several Arduino projects that require a menu system user interface. I used MENWIZ for the last one. Your Phi hardware products and Phi libraries offer (IMHO) very elegant solutions and many options. The serial LCD backpack and rotary encoder keypad fits my next project perfectly. I like the fact that it frees up so many pins on my main Arduino and doesn't burden it with LCD and encoder I/O. Using Basic ASCII control characters and ANSI escape sequences will make it easy to communicate with the display. Reminds me of my days making user menus on VT 100's.

Keep up the good work! Igor27

Liudr ... alive and lurking!



Glad you like it. I was facing the same porblem with menu and user interface before I decided to write those libraries, which led to the backpacks. I am using a lot of these backpacks for consulting projects. Clients found me through using the bqckpacks and I made complete projects out of such opportunities. Been busy doing builds and school projects. Shields dont solder themselves and students dont teach themselves :D

I just bagged a Few rotary encoder kits for inmojo store.

floreata, it’s been a while :D


I uploaded the phi_panel_backpack_20X4_1_6_4(rotary+5keys).hex firmware with no problem. I wired up a rotary encoder according to your Phi-panel backpack assembly and keypad options 20130101.pdf Table 3.1 Rotary encoder keypad connections V1.0

Can you provide an example sketch that uses this configuration? Thank You,


You can try any menu-related sample examples here:

The rotary encoder acts as up/down/enter. So any menu is going to work the same way without the arduino knowing there is a rotary encoder instead of buttons. It’s super cool to use a rotary encoder in menu selection. The other 5 buttons are acting as left/right/escape/‘1’/‘2’. Hook up these keys if you want them.

Essentially, send this to the panel:

“\eFDemo menu\nDisplay\nKeys\nMulti-tap\nBuzzer\nMenu\nLong message\nLEDs\nBacklight\nPassword\nCredits\n~”

If you trim the longest menu item shorter, the menu will automatically become 2 columns, or even more if items are very short.

Hook the panel to your pc with a USB TTL adapter and see what comes out of the panel by turning and pressing buttons.

If you want to enter number with the encoder, send this “\eD3Enter number~”. The 3 indicates up to 3 digits, and the rest of the text is a prompt that you can change to anything, like “\eD3Delay(ms)~”. The return is sent to serial port in the format of 123~. So if you need a number on arduino, just use my enter number sample code and change the terminator from \n to ~

if (in_char==’\n’) INTO if (in_char*==’~’)*
You can also whip up your own number entry by writing code on arduino if you are not happy with this number entry, but that will take some time, although much less than dealing with the hardware directly.


Thank you...I will give those sample sketches a try and let you know my findings.

RE: USB to TTL cable. In some of your videos, it appears that you are using a USB to TTL adapter cable that connects to the serial backpack. Do you sell that USB to TTL adapter cable as a kit?



Let me know if you have problems with code. For usb ttl adapter I highly recommend USB BUB II designed and sold by I have used it for the prototyping and testing of the panels.