Nixie thermometer – RGB leds

luca 29/01/2016 0
The design and development of this project is described in ten blog posts: for the chronological list follow this link

My thermometer will have RGB leds beneath every nixie tube, to be able to light them up with different colors.

I decided to use pre-built modules, which include the RGB led and also all the required components (resistors…):


Within the led package, there’s a WS2812 (datasheet) control chip, which offers 16M of colors, 256 levels of brightness and a minimum refresh rate of 400Hz.

You can control those WS2812 drivers using a simple serial protocol: the different leds are chained (DOUT -> DIN) and the first one is connected to a digital PIN of your Arduino, the different commands are sent through.

Adafruit developed an handy library (NeoPixel) which you can install directly via Library Manager:


Let’s see how to use it.

First, you need to define a new Adafruit_NeoPixel object with some parameters:

#define PIXEL_PIN    3
#define PIXEL_COUNT   10
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800);

The first parameter identifies the PIN of your Arduino the leds are connected to and the second one the number of leds.

The third parmeter configures some aspects of the library and depends on the specific driver you’re using. Two different behaviors are defined:

  • the sequence of the three primary colors (NEO_GRBNEO_RGBNEO_RGBW)
  • the speed (frequency) the data is sent (NEO_KHZ400NEO_KHZ800)

In the setup() it’s mandatory to initialize the library:


You can then change the color of each led with the following command:

strip.setPixelColor(#led, red, green, blue);

the first parameter identifies the led your sending the command to (0 is the nearest to Arduino) and the next three ones are the values for each primary color.

To send the new colors to the leds, remember to use the command:;

I wrote a sketch (Github) that changes the color of the leds using the sequence defined in a matrix:

uint8_t colors[8][3] = {

Each time you press the button, the next color is used:

While I was testing the sketch, I noticed that the 5V output of my nixie power supplier wasn’t enough to power also the leds. Because of this, I added to my prototype an external linear regulator (7805) that powers both my Arduino and the leds:


Leave A Response »

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.