Published © CC BY

Christmas Lash-up, Colour-Changing Bauble

This is just a quick bit of fun, grabbing a few parts that most hackers will have to hand and putting a bit of Christmas magic into a hack.

IntermediateShowcase (no instructions)4 hours109
Christmas Lash-up, Colour-Changing Bauble

Things used in this project

Hardware components

NeoPixel Ring: WS2812 5050 RGB LED
Adafruit NeoPixel Ring: WS2812 5050 RGB LED
Any 16 Pixel ring will do. I used a cheep copy I had to hand but anything with a 45mm diamter will be fine
Particle Photon
Any functioning Particle G2 board will do, why not dig out and unloved core, dust it down and set it to work.
Enamelled Copper Wire
You can use as discrete, wire as you like. I had some enamelled wire to hand and it makes its easy to hide the wires in the branch of the tree
Large Photo Baubles

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
I've used a Formlabs Form1, but any 3D printer will do


Read more

Custom parts and enclosures

STL file for the support ring

This is a support ring to keep the Neo Pixel ring centered in the plastic bauble.

STL file for the support ring

This was designed using Design Spark Mechanical, but you can edit it for your own needs


Neo Ring

16 pixel Neo Rings are jolly handy. They don't need a resistor in line with the data pin, and if you keep the brightness setting down (below 250) will not need an additional power supply. They are jolly bright so that shouldn't be an issue


Bauble Code

This is a simple code to drive the Neo pixels, in the Bauble. It uses the particle time function to alter the colour of the bauble baised on the time of day. By using the hours, minutes and seconds it present a constantly changing color.
// Code for Christmass baubles. Takes the time of day from the particle cloud and maps the colour
// channels R, G & B with hours, minutes and seconds. This means the baubles is always showing a 
// slightly different color, with a significant change at the top of the hour.

#include "Particle.h"
#include "neopixel.h"


#define PIXEL_PIN D4
#define PIXEL_COUNT 16
#define PIXEL_TYPE  WS2812B//SK6812RGBW // WS2811 // WS2812B

Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int Day =;

void setup() {
strip.setBrightness(64); // To avoid using and external power supply keep this value below 250; // Initialize all pixels to 'off'; // Use this value to set your local time zone. If you want

void loop() {

    // Re-syncs the clock once each day
    //Serial.println("Hours = " + String(Hours) + " Minutes = " + String(Mins) + " Secs:- " + String(Secs));


void clearall(){
    int pixel = 0;
    while (pixel <= PIXEL_COUNT){
        strip.setPixelColor(pixel, 0, 0, 0); // Use this line when using WS2811 or WS2812B type Pixels
        //strip.setPixelColor(pixel, 0, 0, 0 ,0); // Use this line when using SK6812RGBW type Pixels
        pixel = pixel+1;

void display(){
    int pixel = 0;
    int Red = map(Time.second(), 0, 59, 0, 255);
    int Blue = map(Time.minute(), 0, 59, 0, 255);
    int Green = map(Time.hourFormat12(), 1, 12, 0, 255);
    while (pixel <= PIXEL_COUNT){
        strip.setPixelColor(pixel, Red, Green, Blue);// Use this line when using WS2811 or WS2812B type Pixels
        //strip.setPixelColor(pixel, Red, Green, Blue, 0);// Use this line when using SK6812RGBW type Pixels
        pixel = pixel+1;




1 project • 0 followers
I'm a Mechanical Engineer working the the Film and TV industry. Been experimenting with IOT for a few years.


Add projectSign up / Login