The LC display mounted on a selfmade plexiglass stand

Having just the metal case for the router standing on my desk was not enough for me. So I decided to add a LCD Display to show some important information about the router’s hardware and especially the current up and download rates of the PPPoE device connecting me to the internet.

) The Display itself is an 27x4 LC Display which I got from a German electronics shop for a few Euros. It has a standard HD44780 controller that makes it very easy to connect it to a computer. The old parallel port could be used very easily for this.

Now that current computers do not have this legacy connectors any more I needed a solution to connect the display to an USB port. I wanted to use the display for my fli4l router to let it show some infos. After a short ramble through the internet I found a small PCB designed by Till Harbaum. It is called LCD2USB and has a little microcontroller ATmega 8 by Atmel onboard which does the communication between USB and the parallel controller on the display. The PCB is assembled in a few minutes and ready to run after the programming of the microcontroller.

The LCD2USB controller board

The LCD for fli4l

For the fli4l system the opt package lcd4linux is all you need as software to work with the display. This software already contains the necessary driver for LCD2USB so it works more or less out of the box. If you want to have a somewhat special configuration of the display you will need to enable the expert mode in the fli4l lcd4linux configuration. You can then provide your own lcd4linux.conf file to configure the contens of your display. The basic configuration mode within the lcd4linux.txt file is not as flexible as needed to show the information that I have on my display.

Expert mode configuration

The expert mode configuration file for the items that are shown on my LCD is listed below. The file must be saved as config/etc/lcd4linux/lcd4linux.conf to get it put into the opt archive automatically bv

Of course you may copy and modify or just use it as you like. If you have any more interesting data, that can be shown on the LCD display just let me know. I am always keen to let the display show interesting data :-).

Display 'configured'
Display configured {
      Driver 'LCD2USB'
      Contrast '192'
      Brightness '128'
      Icons '1'
      Size '27x4'

Layout 'L27x4'
Layout L27x4 {
      Row1.Col1 'Info'
      Row2.Col1 'Heart'
      Row2.Col2 'Busy'
      Row2.Col12 'Info_flo'
      Row3.Col1 'ImonDSLRate_In'
      Row3.Col16 'ImonDSLRate_Out'
      Row4.Col1 'ImonDSLRate_Bar' 

Variables {
      tick 500
      tack 100
      halfminute 30000
      minute 60000

Widget Info {
      class 'Text'
      expression '*** '.uname('nodename').' - DSL-IP: '.imon('ip pppoe').' ***'
      width 27
      align 'M'
      speed 300
      update halfminute

Widget Heart {
      class 'Icon'
      speed 250
      Bitmap {
            Row1 '.....|.....|.....|.....|.....|.....'
            Row2 '.*.*.|.....|.*.*.|.....|.....|.....'
            Row3 '*****|.*.*.|*****|.*.*.|.*.*.|.*.*.'
            Row4 '*****|.***.|*****|.***.|.***.|.***.'
            Row5 '.***.|.***.|.***.|.***.|.***.|.***.'
            Row6 '.***.|..*..|.***.|..*..|..*..|..*..'
            Row7 '..*..|.....|..*..|.....|.....|.....'
            Row8 '.....|.....|.....|.....|.....|.....'

Widget Busy {
      class 'Text'
      expression proc_stat::cpu('busy', 500)
      prefix 'CPU'
      postfix '%'
      width 9
      precision 1
      align 'R'
      update tick

Widget Info_flo {
      class 'Text'
      width 19
      align 'C'
      expression imon('ip pppoe')

Widget ImonDSLRate_In {
      class 'Text'
      expression imon::rates('pppoe','in')/1024
      prefix 'In: '
      width 10
      precision 1
      align 'R' update tack

Widget ImonDSLRate_Out {
      class 'Text'
      expression imon::rates('pppoe','out')/1024
      prefix 'Out: '
      width 10
      precision 1
      align 'R'
      update tack

Widget ImonDSLRate_Bar {
      class 'Bar'
      expression imon::rates('pppoe','in')/16384
      expression2 imon::rates('pppoe','out')/1024
      min 0 # Scaling min 0%
      max 100 # Scaling max 100%
      length 27
      direction 'E'
      style 'H'
      update tack