User Tools

Site Tools


LCD Display for Fishtank status

A display (screen) is required to show the status of you fishtank. The simplest technology is a 20 x 4 character LCD display. This web page provides information on selecting and purchasing an LCD display. Consult the main "how to" page for links on how to program the display.


The display is a grid 20 characters wide by 4 rows high. Each grid location displays an individual character. When completed, the fishtank display should look like this



You can read the rest of this page for details, but here is our basic recommendation. Pick one of the following options:

  • A 20×4 character LCD display with an I2C (serial) communication protocol
  • An OLED with an I2C (serial) communication protocol

There is a growing variety of LCD an OLED display options that are feasible for the fish tank display in ME 121. The rest of this page discusses the character LCD display options. A separate page discusses the OLED option.

Scroll to the bottom of this page for recommended LCD panels.

Communication Protocol

When purchasing a display, you should be aware of how your Arduino will communicate with the display. There are two broad categories of digital communication protocols: parallel and serial. Both protocols uses digital (high/low, 1/0) signals to transmit data. The basic idea is that parallel communication uses multiple channels (multiple wires) to send data simultaneously, whereas serial communication uses a single channel to send the data as a sequence of high/low (1/0) patterns.

As Arduino programmers and users of digital hardware, we can usually treat devices with parallel or serial communication as plug and play. Of course, we need to understand the pinouts and the software libraries for the devices we use. However, for most beginner projects, we simply use the hardware connections (wires, sockets, solder pads) and software libraries without digging into the implementation details.

Parallel Communication

Parallel communication uses several wires that connect digital I/O pins on your Arduino to pins on the display panel (7 wires for data, plus VCC and GND). Parallel displays are often cheaper than serial displays because the display panel requires simpler on-board components for decoding the communication from the Arduino. Despite being (a little) cheaper, parallel displays have three distinct disadvantages.

As noted above, connecting a parallel display to an Arduino takes up several digital I/O channels. That is not a problem for the fish tank since there are enough remaining digital I/O pins to perform control tasks after the connections for a parallel panel are made. A second disadvantage is wire management for the connections between the Arduino and the panel. The wire management is not a huge obstacle, but it makes a parallel LCD panel more cumbersome to install than a panel using serial communication. The final disadvantage is electrical noise, which is a significant problem for a parallel LCD panel display for the fish tank.

The solenoid valves controlling the fresh and salty water supplies generate electrical noise (high frequency voltage signals) when the solenoids are switched on and off. This noise can cause the electronics on the LCD panel to be scrambled, which renders the display unreadable. A partial solution is to add capacitors and other filter elements to the solenoids, but other wiring details such as wire routing, breadboard layout, and power supply circuitry can influence the effectiveness of noise suppression. In general, serial communication between an Arduino and an LCD panel is much less susceptible to noise.

To learn more about parallel communication, you can start with the Wikipedia page.

Serial Communication

Serial communication uses fewer lines (from one to four) to transmit data sequentially – in streams of ones and zeros – between two devices. Serial communication transmits less data per clock cycle than parallel communication, but the data rates for serial communication are higher than we need for ME 121 applications.

In general, serial communication is less susceptible to noise than parallel communication. Several serial protocols also have the advantage of being able to connect several devices on the same set of wires. To do so, each device has its own address, which allows it to ignore communication to other devices on the same bus.

The most common serial protocols for sensors and output devices are I2C or SPI. SPI has higher performance, but that is not an issue for the fish tank project. In other words I2C is sufficient. In addition some I2C supported displays have Qwiic connectors that make it very easy to daisy chain and connect to a SparkFun Qwiic Redboard.

To learn more about serial communication, you can start with the Wikipedia page. SparkFun has resource pages for I2C and SPI that provide good details for using those protocols with microcontroller platforms like Arduino. SparkFun also has a reference on UART serial communication, if you are interested in the 0 and 1 digital I/O pins on your Arduino board.

Integral Communication Module or Serial Backpack

Many serial displays are mounted on a circuit board that have a communication chip integrated into the PC board that supports the display panel. Other display panels come with an additional small communication board called a backpack that is initially separate from, but soldered to, the PC board that supports the display panel. Both styles (integral and backpack) function the same. The choice of which to use will probably come down to cost and availability. If you have an old 20×4 parallel LCD display, you could add a backpack to give it a serial interface.

Some 20×4 character displays that support the I2C protocol (as of January 2020) are

  • I2C backpack connected to a parallel display

SparkFun sells a “serial-enabled display” that is not I2C and is supported by a SparkFun library

Each hardware configuration will require its own software that includes a library and your sketch that uses the library routines. In other words, the code to display characters on the Sparkfun Serial-enabled display will not work on an I2C enabled display.

lcd_display.txt · Last modified: 2020/02/10 00:06 by gerry