Thursday, January 30, 2014

Vacuum Fluorescent Display Alarm Clock

I have been working on this fun little project for the last couple of days. I ordered this VFD display from Noritake as a free sample. I am quite grateful for their generosity and I decided to put this display to good use.

I have written a driver in C# that implements a partial selection of the commands available from this display. The driver is object-oriented with property accessors used to set configuration parameters of the display.

Weather Data, Emails and a Loader Animation :]
I put all of this together into a sample application for a smart alarm clock that I would like to build eventually. The sample application gets my unread e-mail from Gmail and weather data from Open Weather Map. I am also attacking the 16 custom characters that reside in ram to display a few simple animations.

The Hardware

The hardware is quite simple for this article. I have a USB to RS232 converter. This display accepts RS232C levels so you cannot use the UART of a microcontroller directly without using a transistor to invert the signal.

Hardware Overview 
The display itself is the CU24063-Y100 model from Noritake. I don't know a whole lot about the theory of operation behind these displays, but it is a vacuum sealed type device. It has a "getter" on the front glass to catch any impurities during the sealing process. It also contains a heater that is visible during very low-light conditions.

Display Front
This display uses a microcontroller to implement the command set. It is from the Renesas R8C lineup, a very simple and interesting processor. I will likely order some this summer to experiment with. These processors implement numerous security features including read/write protected flash pages and a 2^56 complexity key for reprogramming. Quite impressive if you ask me. Given a baud rate of 500000bps, it would take a few hundred years to brute force these devices. Not to mention the fact that you need to reset the chip after each attempt.

Thankfully, Noritake left a nice hole in their protocol that let me read out the firmware contents. This is a story for another blog post (maybe :]).

Display Back

The Driver

The first thing I did was develop a subset of the commands into a clean object-oriented driver. I created a GitHub repo to share the code with anyone who wishes to drive this display. It is tested on Mono, but I can't see any reason why this wouldn't work on Microsoft's implementation. Submit an issue on GitHub if you encounter any issues and I can fire up my Windows virtual machine and debug it.

I will give you a quick taste of the code here but you can see the rest on GitHub. Here is the constructor that initializes a serial port and configures it for the default baud rate of the device. Note the optional parameter that would allow you to override it.
/// <summary>
/// Initializes a new instance of the
/// <see cref="TheResistorNetwork.VfdDriver.VdfDisplay"> class.
/// </summary>
/// <param name="serialPort" />Serial port.
/// <param name="baudRate" />Baud rate.
public VdfDisplay (string serialPort, int baudRate = 38400)
 this.serialPort = new SerialPort ();
 this.serialPort.PortName = serialPort;
 this.serialPort.BaudRate = baudRate;
 this.serialPort.StopBits = StopBits.One;
 this.serialPort.Parity = Parity.None;
 this.serialPort.Handshake = Handshake.None;
 this.serialPort.Open ();

 displayMode = VfdDisplayMode.Flickerless;
 brightness = VfdBrightness.Percent200;
 blinkMode = VfdBlinkMode.Off;
 cursorMode = VfdCursorMode.Underline;
 customCharacterMode = VfdCustomCharacterMode.Disabled;
This driver is for the 24x6 character display. I only have the one display from this company so I didn't bother abstracting it as an IVfdDisplay or anything like that.

I have modelled the cursor mode using an enum that extends byte.
public enum VfdCursorMode : byte
 Underline = 0x13,
 Off = 0x14,
 Block = 0x15,
 UnderlineBlink = 0x16
This allows me to cast it directly to a byte and send it to the device during a property assignment.
/// <summary>
/// Gets or sets the cursor mode.
/// </summary>
/// <value>The cursor mode.</value>
public VfdCursorMode CursorMode
 get {
  return cursorMode;

 set {
  cursorMode = value;

  var cmd = new byte[] { (byte)cursorMode };
  serialPort.Write(cmd, 0, cmd.Length);

  Thread.Sleep (1);
This should be enough to give you an idea of what is going on in this driver. Feel free to fork the repo on GitHub if you wish to implement the rest of the commands. I will be more than willing to review your code and merge it in!

The Sample Application

I consumed my driver in a sample application that fetches e-mails, weather data, date/time and animations. This code is far from pretty, but it works. Here is a link to the GitHub repo for you to peek at. There are probably hundreds of ways that I could have done this better.

As an example, I could have created a TextScroller class that scrolls text at any location on the screen with a configurable width. At the moment, it is a mess of hard-coded constants.

Spinning Globe Animation with no Unread Email
It takes a few moments to initialize as it downloads contents from Open Weather API and Gmail.

Spinning Envelope with Unread Email
So there you have it! My VFD driver and sample application. Thanks for reading!


  1. Hey, I was trying to find an email to contact you at, but couldn't. I checked your google profile also, and for some reason it wouldn't let me send you an email. I was wondering if I could ask you a few questions because I saw this project you posted and it looks pretty exciting. My email is, if you wanted to email.

  2. best robotic vacuum cleaning revolution was led by iRobot's Roomba, but there are numerous alternatives on the market these days at prices ranging from one hundred dollars to $1,000.

  3. The area that you choose will have to do with the kind of plants that you have. Mars Hydro reviews

  4. I couldn't find any knowledge on this matter prior to.Also operate a site and if you are ever interested in doing some.

  5. But again, they are only part of the story. After all, just because a motor or vacuum cleaner consumes more electricity, this does not make it a better cleaner.thehousegoods

  6. I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. online alarm

  7. A decent water lift rating likewise demonstrates that a vacuum cleaner will continue performing at abnormal states as the residue pack or holder fills and the channels "stack" or step by step load up with fine particulate and turn out to be increasingly impervious to air going through. Robot vacuum cleaner

  8. Time-starved contraption crazed home bodies have made another stride towards the "Jetstones" toon rendition of house keeping with a radical new age of robot vacuums. Bobsweep

  9. I know your aptitude on this. I should say we ought to have an online discourse on this. Composing just remarks will close the talk straight away! What's more, will confine the advantages from this data.  best inexpensive vacuum cleaner

  10. There are many different types of vacuum with many different features. So before you buy a top rated vacuum cleaner make sure you know what type of vacuum cleaner is best for your needs.
    Bobsweep robotic vacuum cleaner review

  11. The savvy network is a variety of empowering advances including a mix of different mechanical frameworks: from correspondence, new metering innovations, enhanced capacity gadgets, and empowering of low-carbon advances. Bobsweep robotic vacuum cleaner and mop

  12. Nonetheless, CPUs as a rule have a small fan mounted above them, and the fan causes wind stream to cool the processor chip.bobsweep vs roomba reviews

  13. As I made reference to before, all electronics produces warm. There is no real way to keep electronics from producing the simple thing that can pulverize it. bobsweep pet hair plus

  14. Also, shipments of ultra-light workstations and PC tablet mixtures are expanding quickly. In this way, we are entering the "Post-PC Era". ewaste recycling