Portable Node LCD Display

This project came from a need to troubleshoot my portable Echolink Node/APRS iGate when I set it up without needing to bring a whole computer along. Previously I had a couple of LEDs for status indication and some network diagnostic information available by DTMF tones but it became clear when problems arise I needed more information. It's possible to plug in a HDMI cable to view startup information but this means having to locate some sort of display to connect into and hope it shows the information I want. Space is very tight, many of the ways I found involved additional boards such as an Arduino to control the LCD, something I could not afford to add. The ultimate result, I was able to add a 16x2 LCD to the front panel of the PC case - controlled by the Raspberry Pi which runs the rest of the system.


Software

The software is written in Python (I'm growing to hate Python). It's using the Adafruit library for LCD control, setup directions for that include these dependencies and the LCD library which includes some example code. At some point I will attempt to get my code posted in a GitHub project.

Unfortuniately, one limitation it seems this configuration requires the LCD script to run as "root" user. This is very dangerous if you accept any user-input because it poses a risk for user-entered "untrusted" commands to be executed with super-user root privelages. I haven't yet been able to find a way to make this work as an unprivelaged user (as I have with the other parts of this portable node) so I designed the script with everything hard-coded so it hopefully won't cause any problems.


My Hardware

 

To begin, I wired up the LCD display roughly according to this guide. The main difference in my setup was I connected the LED Annode (LCD pin 15) to the middle pin of a 10K potentiometer in the same way as the contrast pin is. This allows me to adjust full scale contrast and brightness. I also ended up using different GPIO pin numbers but that doesn't matter as long as it's configured properly in the software to match what you plug into.

Lacking many options in multi-conductor stranded wire, I used some 6-conductor telephone line for data and 2-conductor speaker wire for power. One end was soldered to the LCD control board, the other end was spliced onto jumpers so they could plug into the GPIO pins.




 

Upon applying power, I adjusted the brightness and contrast - it worked! I got the expected test pattern on the display. At this point, I modified the sample test program to reflect the GPIO pins that I used and tried running it. The first time I got garbage on the display. After re-checking the connections I found a transposed pin when I connected the GPIO header wires. Once that was fixed, I was greeted with Hello World!




 

I was planning to mount this in the 3.5" bay slot on the front panel. The bay itself was already occupied by the cooling fan for the radio but there was just enough gap between the metal case and plastic front panel for the board to fit and the case had a snap-in cover that was a near perfect fit for the LCD display. I made a CAD design based on the dimentions of the insert and then manipulated it to fit the geometry of the LCD board and potentiometers. This was then 3D printed in black ABS plastic and then sanded to fit and holes drilled.




 

A bit of test-fitting got everything just right. There was a small gap at the bottom of the LCD but it was easily shimmed with a scrap of zip-tie for a secure fit.






 


Once secured in place with screws, it looks like it belongs!






With the hardware done, I got some of the software working to display some stats. I had some concerns about the exposed contacts and gap (besides it looking bad) so I fabricated a L-shaped plastic part to cover the gap between the front panel and frame where I had cut out the CD slot. That isn't shown in this picture but can be seen in the annimated GIF showing the status screens below.





Here's the final product, scrolling thru the screens. It also is programmed to display the last few error logs (if there are any) for svxlink so I can troubleshoot some basic things without logging in.