The stars project

History and Introduction

Since my wife became pregnant, we had to make a childern's room. And since the doctors didn't allow her to go to work because of some problems she had with her pregnancy, she ended up at home with lots of time to think, dream and to re-design the apartment, she came with the idea of the childern's room with light-umber walls amd dark-blue ceiling with yellow stars.

The original idea was to put some kind of lights within some bigger stars and the glow-in-the-dark plastic stars in the center of some smaller stars. However, it looked like a nice idea to use the smaller stars as a night-light (most of the kids do not like to be in complete darkness). However the plastic stars can glow for a while after the main light is switched off, but not all night. So my wife decided that the stars should be actively lit through. And my idea was that once we have lots of wiring within the ceiling, it can even blink.

The actual design

The room ended up with 10 big stars with the halogen lights, 68 lit-thru stars and lots of plain stars. All the 68 stars are controlled independently with a unit which can handle 64 levels of brightness (PWM, frequency 37.5Hz) and about 10 changes of the brigtness per second.

The ceiling consists of a steel square grid about 20cm under the original ceiling and it holds the polystyren squares (50x50 cm, 1cm thick). These squares have star-shaped holes in them at the places of the lit-thru stars. The squares are pained blue and they have stars made of adhesive plastic foil attached to them (and they have a star-shaped hole in the center). The plastic glow-in-the dark stars are about 3mm bigger than the hole in the plastic foil and they are attached to it with strips of double-sided adhesive tape.

The other (top) side of the squares have a magned in each corner (to hold them on the steel grid) and a plastic coffee cup attached upside-down above the star holes. The cups have holes in their bottoms and they hold the hight efficiency green LEDs facing to the holes. The LEDs are connected to the control unit with two 34wire flat cables and one thicker common wire. The actual connection to the LEDs is done with 2-pin bits of a pin-row type female connector put directly to the LED's pins.

The detail pictures:

The control unit

The control unit is based on a Z80 microprocessor running at 4.9152MHz and it's design is quite plain (32kB EPROM, 32kB static RAM, 74HCT574s as the LED drivers and a 74HCT244 as an input port, and a 2400Hz interrupt based on divided CPU clock).

The control unit (including the power supply) fits in a 15x15cm universal PCB. When I have the scematic diagram ready, I will place it here.

The software

The first version was written in a conservative style and could handle a 16 level PWM with frequency of about 3Hz. It was apparent that I overestimated the abilities of the hardware, but I was too lazy to throw it away and make a new one. So I wrote a linearized self-modifying version which can handle 64 level PWM, at the cost of slow update of the changes in the brightness (the update takes about 100ms).

After first tests I figured out that the linear scale of LED's brightness doesn't look nice (it seemed to get bright fast, then to stay almost the same and then they die away quickly). So I implemented translation tables which change the linear changes in the brightness to exponential. It looks much better. After I made the first version with 2 levels of steady light and one type of blinking, I replaced the dim light with another mode of blinking. I guess that after 6 years of using it this version of the program can be considered stable.

The stars are controlled with a double switch, which has 4 states:
Switch 1Switch 2Mode
OFFOFFAll OFF (the CPU is held reset)
ONOFFSteady light with 50% brightness
OFFONAll stars dim, flashing one at a time
ONONAll stars blinking

All the parametrs of blinking result from a simple pseudo-random generator and they also change with time. It guarantees that things like two stars next to each other blinking together won't stay in that way.

Closing statement

It's all freeware (with except for the actual hardware I have at home, so don't think you can come and take it :oP). If you have any questions, you can send me an e-mail to pc@sinux.sinus.cz.