This is the first generation of star painting. To see the new and improved design, click here.
My wife had an idea for a project where she would paint a picture of a night sky and incorporate LEDs to make the stars. We started with backlight LEDs controlled by a 555 timer (v1) that would shine through holes in the canvas. The next design (v2) used a TLC59711 to fade the LEDs using Pulse Width Modulation (PWM). The final design (v3) uses 6 ATTiny85 chips to create 18 individual LED channels. The LEDs illuminate fiber optic cables that are poked through the canvas of the painting.
Mechanical
The back of the canvas.
The circuitry is at the bottom. The LEDs are connected into screw terminals. A small tube is used to connect the LEDs and the fiber optic strands.
The other end of the fiber optics are poked through the canvas. The balsa wood slats provide structure for the fiber optic strands. We used a long needle to poke a pilot hole through both the bolsa and canvas, then fished the fiber optic through. It was hot glued in place.
One difficulty with a canvas this size is the brace in the middle of the frame. This caused a 'dead spot' in the layout of the stars because we could not get any fiber optic lines behind the brace.
I wanted to use a TLC59711 LED driver to fade and blink the LEDs because I had sucess with them in the past. The LED driver allows you to assign a different Pulse Width Modulation (PWM) value to each of the 12 LED channels. PWM allows you to adjust the intensity of the LED.
For this project I wanted to use the Adafruit Trinket microcontroller because:
1. I did not need any additional I/O
2. They are small enough to tuck inside the frame of the painting
3. They are cheap
The TLC59711 breakout board uses an SPI interface to receive data. One benefit of SPI is you don't necessarily need to know much to use it -- there are libraries that make it fairly easy to use SPI on the Arduino. However, I discovered that the existing libraries for communicating with the Adafruit TLC59711 breakout board did not work with the Trinket. Adafruit did create a TinyFlash library which uses SPI to write to a Flash memory chip. I was able to modify that library to work with the TLC59711. It was a while ago when I did this so unfortunately I don't remember exactly how I figured it out..
In v2, I was using 3 RGB LEDs and a few standard LEDs. It was nice that the color of the RGB LEDs would vary, but they use 3 of the LED channels. This meant that there were not that many LEDs overall, meaning multiple fiber optic strands were connected to the same LED and they twinkled at the same pattern. When viewing the painting, it was very easy to notice the identical fade patterns, which was not the natural look we wanted.
I wanted to have each star on its own twinkle pattern. So I redesigned everything to use ATTiny85 chips with PWM to twinkle the LEDs. I also added 2 potentiometers that can control the fade rate and the delay between twinkles. This allows me to fine tune the pattern after everything is installed.
The twinkle circuitry.
I designed a PCB and had it made through OSH Park. Each board holds 2 ATTiny85 chips and 2 potentiometers. Each board can provide 6 LED channels. I have a total of 18 LED channels. A few of the LEDs have 2 fiber optic strands connected to them, but as long as those strands were not near each other on the canvas, the fact that their fade pattern matched was not noticeable.
These video shows the twinkling LEDs. The potentiometers set the range for fade time and delay time but the pattern is based on random values.