Micropython driver for the 8-MD-06INKM Futaba VFD display with 16 segments
Futaba Vacuum fluorescent displays are very bright displays and together with a LGL VFD Studio backplate, very easy to control using SPI. Including power, only five connections are needed (GND, VSS, CS, CLK and SDI/MOSI).
-
Copy the file
vfd_16.py
to your microcontroller. -
Connect the five pins as follows:
VFD | ESP32 |
---|---|
GND | GND |
VCC | 3V3 |
C S | GPIO 18 |
CLK | GPIO 19 |
SDI | GPIO 21 |
To connect the VFD to a breadboard, you need to solder a 5 pin header to the VFD display first.
- Then use this code to show some text on the display:
import vfd_16
display = vfd_16.Display(cs=18, clk=19, sdi=21, dimming=100)
display.write('12345678abcdEFGH')
With an ESP32, you can use any free GPIO pins. On other microcontrollers, you might want to connect the VFD pins to the corresponding SPI pins on the microcontroller. In that case, connect the VFD SDI pin to the microcontroller MOSI pin.
Initialise the display.
Parameter | ||
---|---|---|
cs |
GPIO pin number | |
clk |
GPIO pin number | |
sdi |
GPIO pin number | |
dimming |
Optional | Dimming (0-240) |
baudrate |
Optional | SPI Baudrate |
Write a string of up to 16 characters to the display.
Write a string at the specified position.
Turn the lights off.
Turn the lights on. In combination with light_off()
, this can be used to blink text.
Put the display in standby mode to conserve energy. The display will be off.
Get the display out of standby mode.
Dim the display. Values go from 0 (dark) until 240 (full brightness).
Clears the display from any text.
Define your own character. num
is a number 0-7 and data
is a multiline string, see below.
On the VFD display, you can define eight custom characters.
You can provide the character with a multiline string of 7 lines of 5 characters wide. Every nonspace character will be a bit that will light up.
display.define_character(0,
"""
* *
*****
*****
*****
***
***
*
""")
You can include the custom characters in your text with hex codes:
"\x00"
for the custom character 0, "\x01"
for the custom character 1,
up till "\x07"
for the custom character 7.
See demo.py for more examples.
This code is tested with an ESP32 microcontroller, but should work with other microcontrollers that can run Micropython as well. Let me know your experiences, so I can update this documentation.
There are several places where you can buy this VFD display. For example:
When buying the display, make sure that:
- It has 16 segments (digits)
- It has only one row of text
- It has a backplate PCB with five connections (GND, VSS, CS, CLK and SDI).
It should look just like the photos in this document.
This driver is for the 16 segment (digits) VFD display only. If you have a 8 segment display, I recommend to take a look at MicroPython 8MD-06INKM display driver from Reboot93.
The specification below applies to the 8 segment version. Most of the API is similar, though.
Futaba 8-MD-06INKM specification
Copyright 2022 Edwin Martin and released under the MIT license.