This page describes the “five light spheres” project, which is the perfect decoration for this Winter. The spheres always display a nice color combination and blend from one color to the next. It is a quiet and artful decoration. But, of course, you can write your own software and animate the decoration as you like.

This slideshow requires JavaScript.

lucky-resistor-1Required Parts

  • I use “Solvinden” from IKEA as spheres. But any similar products which are originally made for chains of lights will do. The product is shown on the right side.
  • A thin cable with three wires.
  • Adafruit Neopixel. I use the “Flora RGB Smart NeoPixel” in a Sheet of 20.
  • Adafruit Feather M0 Basic Proto. Any other microcontroller will do.
  • Circuit board with pre-drilled holes.
  • MOSFET 2N7000 as level converter. Only required if your microcontroller is 3.3V. If you use a microcontroller with 5V, you can omit this part.
  • Two 10kΩ resistors for the level converter.

The Parts in Detail

The following picture shows one sphere. It consists of two parts. A plastic frame and the outer shell. You put the plastic frame into the shell and here it will snap into the two holes you can see. The frame will span the shell into the round form.

lucky-resistor-2

The next picture shows the circuit board and the cable with the three wires.

lucky-resistor-3

The wires are thin, but think enough to carry enough current to the individual NeoPixel modules. Each wire should be able to transport 600mA current.

lucky-resistor-4

The following picture shows the NeoPixels in the sheet. You can break the sheet apart into the individual modules.

lucky-resistor-5

Prepare the Frame

First prepare the frame with a short piece of circuit board. I use a utility knife to carve the circuit board at the right place on both sides, then you can easily break it apart to get pieces in the right size.

lucky-resistor-6

The circuit board should be as small as possible to block as few light as possible.

lucky-resistor-7

Next, I glue the circuit boards into the frame using hot glue.

lucky-resistor-8

Attach the Cable

Cut the cable into equal parts. They define the spacing between the spheres. Remove the insulation in advance and attach the cables on both sides of the plastic frame. Make sure you already thread the cable though the sphere shells. Attach the cables firmly, using a combination of cable tie and hot glue. It has to withstand some force.

lucky-resistor-9

Next put a NeoPixel on each side of the circuit board. Fasten it using wire, connect both plus and minus connectors. Also connect the data output with the data input of one NeoPixel.

lucky-resistor-10

Now solder the wires to the NeoPixel. Make sure you always connect one wire to both plus pads (here the blue one), one to the minus pad (here the black one) and the third wire from the top to the data input of one NeoPixel, and the data output of the other NeoPixel to the thrid wire to the botton. The data wire should connect all NeoPixels sequentially – always from a data output to the next data input.

lucky-resistor-11

The Controller

From the top sphere I use a longer cable segment, around 2m, to be able to hide the controller somewhere. Attach the cable to the controller. The “plus” wire to the 5V from the USB or your power supply and the “minus” wire to ground. Make sure you attach the power wire somewhere you can get 600mA current.

In the case you have a 3.3V microcontroller, you have to add a level converter in front of the data wire. Otherwise, if your microcontroller in 5V powered, just connect the data wire to any digital output pin of your microcontroller. Use data pin 12 on Arduino compatible microcontroller.

For a level converter you need just a very cheap MOSFET 2N7000 and two 10kΩ resistors. You find a simple circuit diagram here. Alternatively just search for “2N7000 level converter” and you will find plenty of circuit diagrams.

Bonus: Attach a light sensor. The light sensor should just produce a voltage between zero and 3.3V (or 5V). Attach it to analog input pin 4 on Arduino compatible microcontroller. The software is prepared to use the light sensor to switch the light on daylight.

lucky-resistor-12

I used a heat-shrink tubing to create an instant-case for the controller. Just make sure you attach a USB cable before you shrink the tube.

lucky-resistor-13

The Software

The software is very simple, but it uses floating point operations to simplify the operations. This is not very optimal for 8 bit microcontroller. In this case, because the microcontroller does nothing else, it is ok.

Download the software from GitHub:

https://github.com/LuckyResistor/FiveSpheres

You need the Arduino IDE to compile and upload the code into the microcontroller. Please read the instructions for the microcontroller you use how to prepare and configure the IDE. You also need the NeoPixel library from Adafruit. There is a detailed guide how to install the library here.

Impressions

Here some photos from the decoration in action:

lucky-resistor-14

lucky-resistor-15

Thank you

I hope you found this short guide useful. Leave comments on this page if you have any related questions or would like to give any feedback.