Documentation 2017-03-22

Backpack keypad options, wiring and assembly instruction

Firmware update:

Firmware update

Test and demonstration code

Older stuff: There are tons of codes for you, all located at the google code site:

Programming tips:

Search my blog for programming tips. Here are some:

Printing custom characters on phi-panel

Where to buy:

This hardware is for sale in several online stores that ship internationally.

Buy directly from me:

You can place an order right here for a kit or follow the link below to visit online stores to make your purchase, with more options and purchase other hardware I sell:

Out of stock (including LCD)

Out of stock (including LCD)

Out of stock (including LCD)

Out of stock (including LCD, no keypad)

Buy from online store:

Here is my store front at

There are many options for the panels and backpacks and additional keypads for backpacks. You can combine shipping, which is cheaper. Send me a message on inmojo store if you have questions.


The family of phi-panels currently has 3 members:

The 16X2 version has a 16*2 character LCD with integrated 16-key keypad, buzzer, and 4 LED indicators.


The 20X4 version has a 20*4 character LCD with integrated 16-key keypad, buzzer, and 4 LED indicators.


The backpack version can work with many display sizes and directly hooks up to a 4*4 membrane matrix keypad and many other keypad options (rotary encoders, directional keys) and a buzzer.

phi-panel-backpack-keypad collage-1-small

The versions with integrated keypads etc. will easily make your project look and feel professional while the backpack versions gives you the freedom on keypad locations and display choices to fit in your project’s space.

This phi-panel is a revolutionary add-on to arduino projects which can connect to arduino or any serial device (PIC, BASIC stamp or PC). It has an on-board micro-controller that will take care of all your interactive user interface needs, including displaying menus, lists, input numbers, texts, sensing key presses, returning user choices, and a lot more.

You can integrate it in your existing project within one minute. The following code will create an interactive menu on the phi-panel, connected directly to arduino’s hardware serial (you can use software serial as well). Making changes on the code to suit your needs definitely takes less than a minute and everything is in human-readable strings!

No need to create elaborate codes to do objects, generate menus, sense buttons with debouncing or wasting dozen of arduino pins on LCD and keypad. All you need to get started is Serial.print() you learned from Arduino-> Examples-> communication. But wait, experienced programmers / software developers, easy_to_start!=dumbed_down. I have a 30-page long detailed manual with a dozen examples for you to go so much beyond basic use on this panel that your limit is your own imagination.

Here is how easy and human-readable to create a short menu:

Serial.println(“Menu:”); // Display ” Menu” on line 1

Serial.println(“1.Display GPS info”); // Display option 1 on line 2

Serial.println(“2.Record GPS info”); // Display option 2 on line 3


while(1) {

  if (Serial.available()) {  // Make sure there is a key press

    char; // Read key press from phi-panel

    if (response==’1′) display_GPS(); // Display GPS info on LCD

    if (response==’2′) record_GPS(); // Record GPS info on SD card or EEPROM

    break; // Breaks out of the while (1) loop.



Here is what the menu looks like:

I challenge you to come up with less code if you try to create a short menu on a display and keypad without using phi-panel.

Customer Projects using phi-panel:

HVAC project

Water monitoring setup

High speed motor control

Many school projects

More to come…

Picture gallery:


Video gallery:

How to assemble the backpack (bit old):

A video demonstrating all features of the panel on the compact 16×2 panel

This is the on board menu for parameter adjustment: baud rate, startup beep, back light, and key repeat speed.

Multi-tap is integrated in phi-panel, all you need to do is to tell the panel to enable it for alphanumerical and symbol inputs and turn it off after done. Multi-tap input is not immediate or real time by nature so turning it off after done will make keypad report key press in real time.

Quick look at the phi-panels. This full-size unit has on-board power regulator, which is not necessary if you power it via an arduino with 5V.

This is the compact size panel quick look around:

Backpack with rotary encoder keypad option:

Backpack with directional keypad option:

20X4 version:

Here is a play list of phi-panel demo videos:


There are three variants of the panel, one full-size panel with 20X4 display, one compact-size panel with 16X2 display, and one backpack that fits many displays but requires a matrix keypad. The following diagram shows the relation among the variants and their sizes:

List of functions:


  • ATMEGA328 microcontroller manages all hardware
  • TTL-Serial (0-5V) interface, compatible with all Arduino variants and most other microcontrollers
  • 20X4 character display or 16X2 character display
  • Keypad has 0-9, four directional keys, enter, and escape
  • 4 LEDs
  • 4 general purpose digital outputs (20X4 only)
  • Buzzer for simple buzz or any tone
  • Software adjustable LCD back light intensity
  • Optional EEPROM for storage (20X4 only)
  • Reset key behind the panel so you can decide whether the user can reset the panel
  • Optional power supply from wall adapter or battery (20X4 only)
  • SPI interface for possible upgrade (20X4 only)
  • I2C interface for possible upgrade (20X4 only)
  • Firmware can be upgraded for more functions

Software (display):

  • Wraps messages automatically at the end of a line.
  • Automatic scrolls lines up with new messages.
  • Supports control characters: newline (‘\n’), return (‘\r’), backspace (‘\b’), tab (‘\t’).
  • Supports most ANSI escape sequences: cursor position, blinking/underline cursor.
  • Supports local echo of key presses for regular inputs or no local echo of key presses to conceal inputs for password fields.
  • Supports LCD back light brightness control 0-255.

Software (keypad):

  • Relays key presses via serial port such as ‘0’ to ‘9’ on the number pad and 1, 2, 3, 4, 5 and 6 on the arrow pad and enter and escape.
  • Getting user input with multi-tap (like on cell phone number pad) for alphanumerical and symbol inputs
  • Getting numbers and passwords is as easy as 1-2-3 with few lines of code.

Software (interactive features):

  • Supports phi_prompt user interface library such as long text areas, interactive lists or menus, YES/NO or OK dialogs and various number and text inputs.
  • Supports on-the-fly baud rate change.
  • Planned upgrade will support “store and recall” functions to store messages, menus and lists on-board the panel so they can be recalled by their indices (like display menu#1 instead of sending of the entire menu) to free your Arduino FLASH by up to 256KB (requires serial adapter, special software and external EEPROM).

Software (peripheral):

  • Can control 4 LEDs for status indication
  • Can control 4 digital output for general purpose
  • Can output any tone on the buzzer

Multi-tap diagram:

As you can see, when multi-tap is enabled, you can enter all 32 printable symbols, 26 letters in both upper or lower cases, all 10 numbers, space, back space and enter. By default the letters are in upper case. A single press of the shift (up arrow) will make all subsequent input in lower case. Another press will resume upper case for subsequent input. The temporary result of an input is rendered locally on the pad so that only the final entry of a character is relayed via the serial port. The developer should relay the final character back to the panel via serial, like regular keys in normal key mode, if they want their users to see the final entry of a character, including space, back space, and enter.

Face plates:

There are five face plate options for the phi-panel LCD back pack. Rotary encoder keypad and directional keypad for both 16X2 displays and 20X4 displays. Matrix keypad for 16X2 displays. You can see their pictures in the photo gallery. They improve both useability and the look of the backpack a lot. These face plates are sold at

The Corel DRAW file of the full panel face plates and exported .svg file are on the google code page too:

72 Responses to Phi-panel

  1. Roy says:

    Got the Phi-panel kit today w/20×4 LCD. Two questions… the leds positive lead should be on the resister side? Your instructions say “top” hole which doesn’t apply here. However, I assume that it the hole next to the resistor.

    Second, I didn’t get any mounting hardware for the display (bolts, nuts, spacers). I can figure something out but figured you might want to update your parts kit.

    Looking forward to putting power to this thing. The serial number on my unit is 0009.

  2. Roy says:

    Thanks Liudr.

  3. Roy wurth says:


    How much are you selling the optional power kit for??

    • liudr says:


      Currently I am out of the power switch (funny thing the switch is the most expensive part of the power kit Everything else I have in large enough quantity to sell at $1.50 (2X 10uf capacitors, Power barrel, Diode, Voltage regulator). If you don’t need the power switch (replace with a wire), you can have the rest mailed to you in an envelop tomorrow for $2. I’ll be looking into cheaper power switches otherwise.


  4. Roy says:


    Sounds good to me. You still have my charge card info or would you prefer paypal? You can invoice me via paypal at

    • liudr says:

      Alright invoice sent. It looks like paypal will charge $0.40 for just $2 transfer LOL. I should buy their stocks. I’ll mail you the parts tomorrow.

      Thanks for the money!

      Amount received:
      $2.00 USD
      Fee amount:
      -$0.36 USD
      Net amount:
      $1.64 USD

      LOL! Paypal is greedier than credit card companies, banks and US government combined.

  5. Allan Richards says:

    I bought one of those rgb lcds from adafruit. I want to be able to change the background color of the lcd via pwm pins on the arduino. What is the best course of action to integrate that with your backback that I have yet to solder together?


    • liudr says:

      Allan, Thanks for purchasing the backpacks. At the moment there is no native support for RGB back lights but you can wire the pins to your main arduino to control them. I was looking for a good source of displays with RGB back light but haven’t found one yet. Here is also not enough pins on the backpack’s ATMEGA328 to drive all three colors if I need to keep the keypad connector, which uses 8 pins. Do you need a keypad connected to the panel?

      • Allan Richards says:

        So the best move is to not solder the pins from lcd to the backpack that would be used to control the backlight. Instead route the wiring from the lcd direct to the arduino. That won’t cause havoc with the backpack expecting something that isn’t there? I would need the keypad to take advantage of the built in menu structure. It isn’t critical though. The lcd is mostly a situational display. The rgb is cool because it can be green for normal and red for alert.


      • liudr says:

        Yep, that is what I would recommend. Just leave the back light unsoldered and wire them to your main arduino. When you purchase a keypad, make sure you get the 4*4 one, otherwise there won’t be any keys available for scrolling lists.

  6. Mout says:

    Hi Liudr,

    I’ve purchased x2 20×4 phi-panels kits.
    After 2 days working fine with the first one, I’m having troubles with the keypad. It seems that the down / Right arrows keys aren’t working properly. (the “down” button seems to act like the #5 button.)
    I haven’t assembled the second kit yet, hope it will be ok.

    Apart of that, it is a great kit to enhance arduino projects 🙂
    Thanks for your work!


    • liudr says:


      Thanks for purchasing! If you hook the panel to your arduino and just look at the serial port output, what does the down and right button output to the serial monitor? I’d like to know what actually went wrong. Was it possible that you held two buttons together and that drew too much current to damage a shift register?

      • Mout says:


        Yes, I may have pushed two buttons together…
        I’ve writed fhe following short code on my arduino mega:

        void setup() {
        Serial3.begin(19200); //PhiPanel hardware serial
        Serial.begin(9600); //Serial to computer

        void loop() {
        if (Serial3.available()) {

        On the computer serial monitor, I can see the following effects (button / serial data)
        1 / 49
        2 / 50
        3 / 51
        4 / 52
        5 / 53
        6 / 54
        7 / 49
        8 / nothing
        9 / 57
        0 / 48

        left arrow / 8
        right arrow / nothing
        down arrow / 53
        up arrow / 45

        B / 10
        A / nothing (but it shows / hide the main menu of phi-panel on the display)

        Hope it will help you

      • liudr says:

        OK I just checked the symptom with the diagram I have. Here is what I found out:

        The shift register 0, the one further away from the speaker, is probably shot or the solder was not good.
        The shift register has 8 output channels 0A, 0B, … 0H

        Channel 0C (pin 2 of the shift register) is dead or the solder came loose. No response to the two buttons connected to it, i.e. “8” and “right”.
        Channel 0E (pin 4 of the shift register) and 0H (pin 7 of the shift register) are acting like they are connected, either because solder bridges or they are damaged internally. The buttons connected to them are acting strangely.

        I suggest you check to see if there’s any bad solder or shortage on shift register 0 first. If there is, fix it and try again. If not, you still have the second kit you can take one shift register out to replace the bad one. Remember, it’s the one chip further away from the speaker (circular), not the one in the middle.

        From what you can still sense, the ATMEGA328 on board is intact. The shift registers are cheaper to replace. Since the connections are covered below the LCD, I suggest you use wire cutters to cut out the bad chip’s all legs, then remove each leg and its lead with solder wick. Then you can solder from the chip side instead of under the chip, which you generally do when assembling.

        Here is a blog post on how to remove things.
        Some raw analysis for my own records:
        7 / 49 (1) D08 – 0E 0E mixing with 0H?
        8 / nothing D08 – 0C
        right arrow / nothing D09 – 0C
        down arrow / 53 (5) D09 – 0E 0E mixing with 0H?

  7. Mout says:

    Thanks for your explanations.

    I have assembled the 2nd kit, and I’ve used sockets for the two shift registers, so if the same problem occurs, it’ll be easyer to check / replace.
    Solders on the defective kit seems all good, so..
    I’m going abroad for holidays now, but I’ll order some shift registers, and when I’ll be back (february) I’ll replace it on the board.
    Thanks for the desoldering tricks, will be usefull !

    • Mout says:

      Hi again!
      I’ve replaced the two shift registers, (using sockets, just in case) and it works fine again, thanks!

      • liudr says:

        Great! I might consider using analogbuttons for my next revision so there won’t be problems like you encountered.

  8. nlistes says:

    For backpack version is the same firmware?

    • liudr says:

      They are different. The integrated panel uses 5 pins and shift registers to sense keys and the backpack version has no keys and will sense a matrix keypad with 8 pins. Please find different firmware downloads on the google code site.

  9. Olle says:

    Hi Liudr,
    I purchased 4 * Phi-panel 20*4 and I find them great and very useful. After working with the panelsfor a while I have noticed a couple of questions that I need to get answered.

    In the hardware specification it says “4 general purpose digital outputs (20*4 only)”. My first questions is; how to program these outputs. I can not find information about this in the documentation.

    My second question concerns the optional EEPROM storage. It is described in the documentation as a planned upgrade. Is this upgrade planned in the near future?


    • liudr says:


      Thanks for your purchase a while back! Here is the link to the documentation:

      The general purpose output is mentioned on page 35 of the documentation. It uses the same syntax as turning on and off the on board LED indicators. Please be advised that these outputs are from a shift register and should not exceed 20mA. If you need to switch larger loads, connect the output to a proper transistor to switch them. These outputs are just left over from the second shift register so their initial status at panel power up was not well defined until the panel fully powers up and set them to LOW. If that momentary undetermined status is a problem, use a pull-down resistor to make sure the initial status is always LOW.

      For the EEPROM, good question. At the moment, the EEPROM slots are not used yet. I have not finished my plan yet but will post here when I do finish it. When finished, you can dump long messages on the EEPROM and at run time just tell the panel to grab “that EEPROM message” instead of storing it on Arduino and sending it over serial. It’s nice isn’t it? Just wait a bit for the summer, when my teaching is done. 🙂

      • Olle says:

        Hi liudr,

        Thank you for the information. I have read the documentation from the beginning to the end and back again several times and I have missed the part “general purpose output status”. Now I have tested it and it works fine.

        The EEPROM feature is great and I will wait patiently for it.

        I read the announcement about the advanced features and the PC emulator. This sounds very interesting. When will it be available to order?

      • liudr says:


        You have to blame the manual. It’s too long. I can’t even keep track of what’s in it myself 🙂

        Regarding the PC emulator, I’m still working on what to put in the development kit for sale. At the moment, I want to have these in the kit:

        1) Commercial license of phi_prompt $30 value (go make money with phi_prompt, with my blessing)
        2) Emulation setup including .h and .cpp files, how to config manual and video tutorial
        3) Advanced phi_prompt features source code and video tutorial and infinite updates thereafter
        4) A $50 value towards my professional assistance (I charge $100 per hour regular rate to software development) to write you a template for your project or help you with your coding.

        The package is $99.

  10. andrew says:

    I see above a comment about pressing two pins and killing the shift registers,
    is this true ?
    I was looking at a matrix keypad and phi panel to make a game interface for the kids,

    but its guaranteed that they will at some time press all the buttons..

    • liudr says:

      This applies to the panel with buttons integrated to the circuit board. If you hold two buttons, that may overload the shift registers. I am working on a solution for next version hardware. For its purpose as a simple front panel, this was not a critical problem but if you use if for gaming you would need to hold down at least one directional key while pressing a few other keys, right? Buttons u d l r b a 0 5 are on one shift register and should not be held down simultaneously. The other number buttons should not be held down simultaneously. This could still work for games. On another thought, the backpack does connect to a 4*4 matrix keypad and has no such issue. On the other hand, these panels and backpacks were designed for simple interactions so holding down two keys only returns one key. A multikey return is more complex in software. Maybe Stanley on arduino forum has come up with a limited solution.

  11. andrew says:

    thank you, that must have been fun to find !
    I’ll use a 4*4 matrix keypad for now,

    I don’t need to detect multiple key presses, its just I know the kids will do that, they are kids, so I don’t want it to break when they do.

  12. MANUEL says:

    for which arduino is this divice compatible ?

    • liudr says:


      This device is compatible with all arduino devices that run 5V logic. That includes at least UNO and MEGA. If you are using the few arduino boards that run on 3.3V, you will need to convert the voltage. The device won’t be sitting on top of the arduino like a shield but just connected to arduino via serial port with up to 2 pins, 5V and gnd.

  13. Paul says:

    Hi Liudr,
    Wondering what the I2C inteface status is, or a maybe a projection of when it might happen? I realy like I2c!!!!

    • liudr says:


      Sorry for the delay. I just got back to update my blog. I have not added I2C as a means to control the panel yet. If I add it, I will need to overhaul the software design. I’m waiting for the right moment to do this. Just too busy lately.

  14. Tom says:

    Hi Liudr, When you add i2c interface will it be able to work with the Newhaven OLED 20×4 character displays? See

    • liudr says:


      Do you mean the panel will interact with the newhaven display via I2C or do you mean the panel will interact with and arduino via I2C, while being compatible with the newhaven display?
      From a rough glance, the newhaven display has a parallel mode like the popular HD44780 display so you could probably replace the current LCD with it directly without having to make any changes.

      • Tom says:

        Hi Liudr, I mean I want to use the arduino i2c bus to communicate with your panel. Read buttons, lite lights, write data to the screen. The i2c interface can translate the i2c write commands into the 4 bit parallel sequences that the Newhaven OLED displays uses by default.
        My arduino serial port is in use by an XBEE and I need to use the i2c bus to write to the screen and read buttons. I am also very interested in your latest phi_menu or is it phi_prompt for user interaction, Thanks for making really useful things.
        You really have to check out these OLED displays, The look great from almost any angle and look great even in direct sunlight.

  15. liudr says:

    Got it Tom. Unfortunately I have not started writing code to support I2C bus with my panel yet. Can you use software serial to talk with my serial panel?

    • Tom says:

      I cannot use softwareserial because I think it uses timer0 and I use the millis() routine which uses timer0.
      I’ll keep watching your site for updates. In the meantime, I will look for other alternatives.

  16. Olle Johansson says:

    Hi Liudr,

    I been looking for an update of the documentation for 20X4 panel version 1.6, but am not able to find it. Can you please help me?

    I also wonder if you have implemented support for the onboard EEPROM chip?

    Kind regards,

  17. mbruck says:


    I’m trying to test phi_panel, but I can’t figure out where I’m wrong.  My board is cheap LCD KEypad from ebay, but it is actual this shield:
    According to schematic there is 5 resistors on analog pin 0.
    I succesfully test that code from page, and I’m sure shield and software is ok.
    Then I’m use analog template using analog keys, and change analog setings values according to already tested code above:

    //int values[]={0, 144, 342, 505, 742}; //These numbers need to increase monotonically. The 342 works better on my setup but you will need to change it back.
    int values[]={50, 250, 450, 650, 850}; //Cheap keypad from ebay[/code]

    But I always get 00 00 from shield.  Where I’m wrong ?

    This is whole code :


    //Phi-2 shield LCD pin setting
    #define LCD_RS 8
    #define LCD_EN 9
    #define LCD_D4 4
    #define LCD_D5 5
    #define LCD_D6 6
    #define LCD_D7 7

    //Phi-2 shield buttons and channel pin assignments
    #define lcd_rows 2
    #define lcd_columns 16

    #define analog_buttons_per_column 5 // Each analog pin has five buttons with resistors.
    #define analog_buttons_per_row 1 // There are two analog pins in use.

    #define name_length 5 // This is the max length of names.

    char analog_mapping[]={‘U’,’D’,’L’,’R’,’B’}; // This is an analog keypad.
    byte analog_pins[]={0}; // The pin numbers are analog pin numbers.
    //int values[]={0, 144, 342, 505, 742}; //These numbers need to increase monotonically. The 342 works better on my setup but you will need to change it back.
    int values[]={50, 250, 450, 650, 850}; //Cheap keypad from ebay
    phi_analog_keypads analog_keypad(analog_mapping, analog_pins, values, analog_buttons_per_row, analog_buttons_per_column);

    // This serial keypad is for debugging.
    phi_serial_keypads debug_keypad(&Serial,9600);

    // The following sets up function keys for phi_prompt library
    char up_keys[]={“U”}; ///< All keys that act as the up key are listed here.
    char down_keys[]={"D"}; ///< All keys that act as the down key are listed here.
    char left_keys[]={"L"}; ///< All keys that act as the left key are listed here.
    char right_keys[]={"R"}; ///< All keys that act as the right key are listed here.
    char enter_keys[]={"B"}; ///< All keys that act as the enter key are listed here.
    char escape_keys[]={"A"}; ///< All keys that act as the escape key are listed here.
    char * function_keys[]={up_keys,down_keys,left_keys,right_keys,enter_keys,escape_keys}; ///’. You can also use ‘\x7e’, which is a right arrow.
       Serial.begin(9600); // Serial is used as a debug keypad. This can be deleted after debug.
       Serial.write(“Start scaning keypad..”);

    void loop()
       byte temp=analog_keypad.getKey(); // Use phi_keypads object to access the keypad
    //  byte temp=pad1->getKey(); // Use the generic multiple_button_interface to access the same keypad

    I appreciate any help since I new to arduino and phi_panel!

    Mladen Bruck

    • liudr says:

      Let me make this clear: you have an LCD keypad you bought from ebay/dfrobot. You DON’T have my phi-panel, which is a family of FINE hardware that I personally designed and wrote the firmware ;D Your loss, man.

      To help you use my phi_prompt interactive library on the ebay/dfrobot shield, you need to first find out the analog values of each button when they are depressed, and the value of no button pressed. List the values in a monotonically increasing order in that values[]. Your 0 output is the NO_KEY. If you are not pressing the button and releasing it, you will not get it registered as a press and will keep getting NO_KEY. You should remove delay(100) and only serial.write if the key is NOT NO_KEY. Note, I don’t sell your shield and have no interest in supporting it. Its designers and sellers should do that.

  18. Mladen Bruck says:

    Hi Liudr!

    I already have 4 of this cheap panels. It seam to me resonable to use it before I buy anything else. I agree your hardware is quite fine, but let be honest: even you can’t ignore 7$ with free shpping (!) to Bosnia and Herzegovina. If you can offer this price range I’ll gladely buy your hardware. It is same to me 🙂
    I didn’t measure analaog voltages since I already tryed values from sample code from mentioned page. This will do asap, and try it.

    Best regards !

    Mladen Bruck
    Bosnia and Herzegovina

    • liudr says:

      I see. The USPS raised postage in 2013 and again this year. It will cost me around $10 to ship to your part of the world. I’ll have to adjust the price up now 🙁 Once you get the analog voltage measurements, you should be able to use the library.

      By the way, thanks for the donation!

  19. mbruck says:

    Dr LIu!

    10$ is not too much for shipping . I expected way much more 🙂
    Only question is how long does goods travel to here ? Any experience…. or maybe you can call your service and find out ? However I believe I will buy some products from you eventually.
    I waited for these cheap keypads almost 2 months. (one side you get – other side you lose 🙂
    So depending on customer and application, sometime maybe is better to buy higher price device and get quicker response from sales.
    Other problem is custom fee office. As soon as they see “larger” package I’m dead. Chinese sales squeeze package as much as possible, and put label as “gift” or “samples”. Most of the times I got lucky with custom fee, but couple of times there where quite “hot”…. 🙂
    Is possible to get your products as kit, since I’m very good in welding? If not now… well, you can consider that as option…


    Mladen Bruck

    • liudr says:

      Most of my sales are kits and I mark the customs form as merchandise and content as “Do it yourself electronic kit”. The USPS doesn’t provide estimate for first class international mails. It all depends but it won’t take months, a week or two I imagine. If it fits, I pad the kits with bubble sheets and mail them in a bubble envelop. I’ve never encountered customers saying that I had insufficient packaging. I keep reusing what packaging materials I receive from parts purchase and just random internet purchases and the packaging materials keep piling up. It’s not like I have to pay for those materials, just the envelops. An added ounce of bubble envelop will always be useful for long trips. Even small boxes are plentiful. I have boxes of every size from internet purchases that I reuse.

      How large is considered larger?

  20. Olle Johansson says:

    Hi Liudr.

    I have come over an issue for Phi-Panel 4×20 after upgrading the software from version 1.5 to 1.6.
    In version 1.5 I could change the baudrate for the panel from default 19 200 to 57 600 by sending the command “\eH57600~” in the startup sequence. After upgrading to version 1.6 this command don’t work. It seems that the panel just restarts and goes back to the default value of 19 200.

    Is there a new syntax for the command or any other way to change the baudrate in software?
    Is there an updated version of the documentation?

    Kind regards,

  21. liudr says:


    Thanks. I will look into this issue. Just to confirm, you have the panel with integrated keys, right? I don’t think I changed the syntax but I’ll check. I did make one mistake generating firmware for the new panels but I corrected it. Can you post the complete version number 1.6.X (what value is the X?) of the firmware if available (either from file name or from panel’s menu->credit)?

  22. Olle Johansson says:

    Hi Liudr!

    Yes you are right. I have the Phi-Panel with 16 integrated buttons.
    The original version was 1.5.1 and I upgraded to the 1.6.2 version.

  23. Darin B says:

    Dr. Liu, I just received the two 20×4 full panels you sent, thank you for the prompt shipping. I’ve been working through the code samples you’ve provided in the file. I am however having trouble getting the “Phi_panel_input_text” sketch to work properly on the panel, specifically when I press any of the number buttons, it shows multiple non-text characters and sometimes fills the screen with them and locks up. When I comment out (disable) the Serial.write(14); statement, reload the sketch, reboot the panel and arduino, the phi-panel will then operate normally, and allow number input as expected without multi-tap enabled. Both phi-panels behave identically, so I do not think it is a hardware defect with one panel only.

    I have uploaded a video so you can see what is happening:

    Although I am somewhat new to arduino, I can clearly see the tremendous value your phi-panels represent when considering how to allow human input into active running microprocessor programs. Thank you in advance for any help you can provide so I may learn how to take advantage of the phi-panel’s text input ability. Thanks, Darin

    • liudr says:


      Sorry it took so long. I just assembled another panel and saw the same issues. It is not supposed to do that. I’ll get back to you once I find an answer.

    • liudr says:


      I found the issue to be related to a bug in the firmware. I just made the necessary change. The new firmware will be installed on all new panels. I’ll send you the new firmware via email.

  24. Pedro says:

    I just want to thank you for the kit I purchased because this is a very professional job that you have done. In my board, every part or item of Arduino is represented in a sample. Keep improving it because we can learn a lot about Arduino with your kits. They are not only entertaining, but instructive.

  25. PeteB says:

    Hi Dr. Liu,

    I bought two of your phi-panel backpacks that I intend to act as a keypad/passkey interface for a pump control. However the requirements have changed a little bit from when I ordered. Originally the keypad was going to be at the location of the pump, but now there are going to be two controllers and they are going to be about 100 feet away from the Arduino at the pump. I know I can use RS-485, but I’m unsure what software modifications would be necessary to drive the menu across the RS-485 link. Have you done something like this before? If you have the time could you give me an idea on what modifications you’d make?



    • liudr says:

      Sorry for the delay. At the moment there is no RS-485 support on the panels. However, you can find some RS-485 to TTL adapter modules on ebay to do the translation. That would hopefully solve your problem.

  26. Phil Keys says:

    A simple question. I just received your 20×4 LCD and 4×4 keypad and am learning how to use them. Above you say:

    Keypad has 0-9, four directional keys, enter, and escape.

    but I can’t find anywhere how the none-numeric keys (*, #, A, B, C, D) relate to the four directional keys, enter, and escape.

    Thank you

    • liudr says:

      Sure. Here is the info: Go to the main page for phi-panel:

      Documentation from 2015-10-19. Page 28 has the table:
      UP/A 45 ‘-‘
      DOWN/B 32 ‘ ‘ (SPACE)
      LEFT/C 8 ‘\b’ (BK_SPACE)
      RIGHT/D 46 ‘.’
      ENTER/* 10 ‘\n’ (NEW_LINE)
      ESCAPE/# 27 (captured by menu) ‘\e’ (ESCAPE)

      If you render a menu, then A/B will be up/down in the menu. C/D will be left/right, in case you have many short items and get rendered into multiple columns of options, you want your cursor to go to the right with D. Then * is Enter to select the item. Outside menu system, if you press these buttons, you get characters such as A gives ‘-‘ or minus sign, with ASCII code of 45. Hope this helps.

  27. Phil Keys says:

    Thanks. I looked through the doc but somehow missed that table.

  28. Phil Keys says:

    I have had the Phi-panel backpack running for several days with no problem. Then it unexpectedly stopped working. At power-on I get the Phi-panel V3.0. I’ve checked the connections and Vin is 5.0 vdc. Nothing happens when I press the # key. Sometimes a partial println is displayed. And occasionally it works!

    Here is the sketch:


    SoftwareSerial PhiPanel(8, 9); // RX, TX

    int incomingByte = 0; // for incoming PhiPanel data

    void setup() {
    PhiPanel.begin(19200); // opens PhiPanel port, sets data rate to 19200 bps
    PhiPanel.print(‘\f’); // Clear screen
    Serial.println(“Clear screen”);
    PhiPanel.println(“Press key”);
    Serial.println(“Press key”);

    void loop() {

    // send data only when you receive data:
    if (PhiPanel.available() > 0) {
    // read the incoming byte:
    incomingByte =;

    // say what you got:
    PhiPanel.print(“I received: “);
    Serial.println(“I received: “);

    int key=incomingByte;
    PhiPanel.print (key);

    if (incomingByte==’1′) PhiPanel.print (“1”);
    if (incomingByte==’2′) PhiPanel.print (“2”);
    if (incomingByte==’3′) PhiPanel.print (“3”);

    Here is what shows on the serial monitor:

    Clear screen
    Press key

    Your help is appreciated,

  29. liudr says:

    Add a one second delay between the PhiPanel.begin and sending info to it should help because the panel has its own bootloader and that takes time to run. I’ll test your code on my panel and get back to you if I find anything odd.

  30. Phil Keys says:

    Thanks for the quick reply. I had a delay(100) and increased it to delay (1000). Unfortunately that didn’t help.

  31. Phil Keys says:

    More testing has revealed that the soft-serial sketch DOES WORK from a cold start. I also have another sketch to drive a SparkFun AutoDriver to drive a stepper motor. It uses SPI communication. After I run it, then soft-serial doesn’t work.

    Research is continuing.

  32. liudr says:

    Is it possible that the stepper motor’s wiring is too close to the phi-panel wiring? That could create interference as the stepper motor likely uses large current such as 1A and it couples on the phi-panel wire to create spikes of voltage. Is your power supply sufficient to run your stepper motor?

  33. Phil Keys says:

    SUCCESS! I replaced SoftSerial with SimpleSoftSerial
    and now all is well. There may have been an interaction between SoftSerial and the SPI protocol used to communicate with SparkFun’s AutoDriver stepper motor driver board. SimpleSoftSerial only works on an Arduino Uno and at 9600 baud. It probably would have been easier to use an Arduino with two serial ports. I am now proceeding to build a user interface for a machine shop rotary table.

  34. liudr says:

    Awesome! The two libraries may be sharing a timer interrupt or something else.

  35. yhchan86 says:

    I was having problem with the function get_simple_list_item(). After spending some time playing with phi_prompt.cpp I noticed it fixed the problem after I change line 1965 of phi_prompt.cpp from int i=0; to byte i=0; Not really sure why it worked (I’m a beginner to programming) but it worked.

    • liudr says:

      To be honest, I don’t think changing from int to byte really has enough effect in most situations. You may or may not save a byte of SRAM and restrict the value to 0-255 instead of -32760 to 32767.

Leave a Reply