Arduino OLED shield

06.07.2013 22:30

Arduino OLED shield adds a color organic LED display and three push-buttons to Duemilanove, Uno and compatible Arduino development boards. It is an open hardware design licensed under a Creative Commons license and comes with a simple Arduino driver library.

Arduino OLED shield showing Preening RD by MochaDelight

Preening RD by MochaDelight

Technical details

OLED shield is based on a Densitron passive matrix organic LED display panel with the following features:

  • Resolution: 160 x 128 pixels
  • Color depth: 16 bit (65536 colors, RGB, 5-6-5)1
  • Active area: 33.6 x 26.9 mm (1.69")
  • Display controller: SEPS525 (SPI bus)

1 Display also supports 24 bit depth, which isn't currently supported by the Arduino driver.

The display is powered by an on-board step-up switching power supply which converts 5 V from the Arduino to 14 V. The power supply can be switched-off by software to reduce power consumption.

Three momentary push-buttons are also present on the board and connect to Arduino's digital inputs.

Software

A SEPS525_OLED Arduino library is available that is compatible with the Adafruit GFX library. This library can be used to write text or draw line art to the display.

The source code repository also contains a simple low-level SEPS525 driver that allows you to control the basic operations of the display. The following code snippet demonstrates its typical use. Repository also contains a more involved example.

// power up and initialize the controller
seps525_init();

// set a rectangular region of 20 x 20 pixels at
// coordinates (10, 10) to draw into. 
seps525_set_region(10, 10, 20, 20);

// write 20 x 20 white pixels into the framebuffer 
// at the specified location
seps525_datastart();
for(n = 0; n < 20*20; n++) {
	// each call to seps525_data() increments 
	// the internal framebuffer pointer by 
	// one pixel, automatically advancing to
	// the next line as necessary

	// seps525_rgb converts R, G, B values 
	// to a 16-bit 5-6-5 format.
	seps525_data(seps525_rgb(15, 31, 15));
}
seps525_dataend();

SEPS525 also has a few features that can be useful sometimes to reduce Arduino code size: it can flip sprites or the whole display and has a screensaver mode. Refer to the datasheet for details.

How to attach the display

Display connector, closed position If you bought the assembled shield, you need to attach the display panel to the shield before you can use it. The display has a flexible tail that fits into a surface-mount connector on the shield (marked U1). The connector has a movable part on the side that faces the buttons. Usually when you get the shield it is in the closed position.


Display connector, open position Begin by opening the connector. Lightly push on the tabs on both ends until the latch clicks into an open position.


Attached display, connector opened Now insert the flexible cable from the display into the connector. Exposed contacts should be facing down, towards the circuit board while the white stiffening strip should be on the top. Be careful not to touch the contacts on the cable and not to flex the cable too much. The cable should sit flush with the connector.


Attached display, connector closed Finish by closing the latch. Push both ends of the latch until they click into the closed position. This might take a bit more force than when you were opening it. You can now bend the display over the connector and fix it in place with double-sided tape.


Shield pin out

  • A0-A5 - not connected
  • D0-D4 - not connected
  • D5 - SEPS525 RS (data/command select)
  • D6 - SEPS525 RESETB (reset, active low)
  • D7 - power supply shutdown (display turned on when pin low)
  • D8 - S3 switch input (high when switch pressed)
  • D9 - S2 switch input (high when switch pressed)
  • D10 - SEPS525 CSB (SPI chip select)
  • D11 - SEPS525 SDI (SPI MOSI)
  • D12 - S1 switch input (high when switch pressed)
  • D13 - SEPS525 SCL (SPI clock)

Hardware documentation

Schematic in the PDF format. Editable version can be found in the source code repository below.

Datasheets in the PDF format:

Blog posts related to the design of this shield might also be interesting.

Source code

Hardware design and software source code is available under CC-BY-SA 3.0 and GNU GPL 3 licenses respectively. The distribution contains a SEPS525 driver and an Arduino sketch that demonstrates its use.

The source releases are available in tar or zip format.

Alternatively, you can use git. To clone the source code repository, use the following command:

$ git clone https://www.tablix.org/~avian/git/arduino-seps525-oled.git