Circadia sunrise lamp - POV detail

The circuit is powered via magnetic induction. A circle of neodymium magnets is placed underneath the spinning board inducing enough current in a set of coils to run the microcontroller and LEDs.

The reason I decided against some form of sliding contacts is that I was aiming for a design that has very little wear on the moving parts. Since this is a clock, it is continuously spinning for months (hopefully years) at 3600 rpms. It also makes the mechanical design much simpler and less noisy.

The principle is temptingly simple. A small number of LEDs are rotating with sufficient speed to leave behind a trail of light that can be modulated to spell out words or graphics.

On a diameter a little larger than a CD it produces a cylindrical display of 216x7 pixels, or 36 text characters.

Persistence Of Vision clock

These devices have been built for a while by clever enthusiasts and I always wanted one of my own. So, when I built my sunrise lamp, I found the perfect excuse.

Communication is handled by an IR receiver salvaged from a cheap, remote controlled helicopter that was donated by a friend (I believe it was broken. It definitely was broken by the time I returned it to him). It is a TSOP11 kind of part. Incredibly sensitive while outputting an easy to use serial signal.

Since the line of sight between the IR LEDs and the receiver is regularly obscured by the board itself (in fact the receiver is even on the 'wrong' side of the board) I chose a relatively slow transmission rate of 1200 baud.

Way fast enough for a bit of text every now and then.

Once this was done, I realized that all these parts were held in place by the part of the enclosure that I had just turned into aluminium chips. The entire half of the enclosure is a part of the motor. I had to machine a new mount that would hold the stator on the outside, the bearing on the inside and could also be bolted to the lamp.

Something like in the picture on the right.

(except this picture is from another experiment)

The only part remaining after that is the stator stack, which is generously glued onto the housing including the three leads of it's coils which are threaded through holes to the other side, surrounded by an epoxy resin.

It requires a little patience to get this out without breaking the delicate copper wire.

The motor was salvaged from a dead hard drive (I've got lots of those lying around). It is incredible ! Driven by the original circuit board of the hard drive it runs almost silently at 7200 rpm.

It is very well balanced and the only sound it makes is from the air that's being pushed around by what little friction the smooth metal presents.

A bit of work was required to extract the motor from the drive without damaging it. The precious hydro-dynamic bearing is press-fit into the aluminium enclosure and won't come out without a fight. However the aluminium is quite soft compared to the steel housing of the bearing and careful application of some Dremel power was enough to extract it along with the cup.

The only drawback is that these motor drivers are using an audible PWM frequency, normally around 16 kHz. It is not super noticeable, but it is there (I'll have to look into that at some point).

The original main board will refuse to run the motor for more than a few seconds before it decides that something must be wrong with the drive (well, it's in pieces) and shuts it back down.Luckily a standard model airplane ESC will do the job just fine, and I found a spare 10 Amp one in another drawer.

A transistor conditions the ripple of the power stage, turns it into a square wave and feeds it to another pin that the micro is listening on, for position sensing.

All of this looks like this, minus the power stage.

The IR receiver plugs straight into the UART's RX pin and functions almost as well as a cable (from the micro's point of view).

The micro is an Atmega168 running off a 16MHz crystal. For convenience, the LEDs come straight out of port C, so all of them can be controlled with a single instruction.

The electronics are fairly straightforward and only require a minimum of parts.

Originally, I used only 2 coils but I had to spin the clock way too fast to power the entire board reliably.

So I increased the number of coils to 4. They are run in series and feed into a voltage quadrupler which doubles as a rectifier and produces about 7 to 9 volts depending on the rotational speed of the board.

A device usually used to balance RC propellers turned out very useful to precisely add weight to certain parts of the board until it was perfectly balanced along the two axis. Hot glue on the early prototype and later solder on dedicated pads.

Balance is key. The slightest imbalance will create vibrations and make the clock noisy. Since it is part of an alarm clock that is standing right next to my bed it has to be as silent as possible.

Another way to increase the efficiency of the coils dramatically, is to add an iron core. However, after a few tests I decided against that. The iron was interacting with the magnets too strongly, resisting rotation every time the cores line up with the magnets . This induced vibrations (more so than air cores).

The distance to the magnets also plays a huge roll, the closer you can get the coils to the magnets, the more voltage they will produce, exponentially.

(an earlier prototype)

1000g. I set up the board for a "refresh rate" of about 60 Hz. That's 3600 rpm. Quite fast. Mainly so I can generate enough power to run the LEDs, no matter how many of them are active at any given time, and not brown out the mcu in the process. At this speed, all the parts on the board are experiencing a significant centripetal force. You may notice the clear tape around the capacitors in some of the pictures. It's necessary to keep the parts on the board, so to speak, and not lift up and bend the other way. The further away from the axis, the worse it gets. In fact, I had to repair the LED board twice because it was only soldered directly to the traces of the main board and the solder connection simply broke after some time (see picture on the right). After that I reinforced the connection with superglue and that solved the problem for good.

When doing the math it turns out that the LEDs experience an acceleration of 978 times earth's gravity! That means the board that normally weighs 0.5 grams, is continuously pulling on the solder points, with an equivalent force of about half a kilogram.

Centripetal acceleration

ac = ω2 r

= (2 π ns)2 r

= (2 * π * 60/s)2 * 0.0675m

= 9593 m/s2

=> 978 g

16 magnets are mounted to an acrylic disk alternating their north and south poles. They are small neodymium fridge magnets, 8mm in diameter and 1mm thick. 3 off them are stacked to form each pole.

(the base and magnets)

The chip sitting next to the Atmega is a NAND gate that I am using to multiplex the UART's TX line between talking to the clock and answering requests from the Raspberry Pi. The ESC is located under the board, in contact with the aluminium base plate of the clock, for cooling.

(The silkscreen still reads Manila Sunrise, misspelled, the original name of the project)

The transceiver board controls the ESC and adjusts the speed of the motor.

The ESC in turn supplies the board with 5V regulated power from it's 12V supply. The board receives commands from the Raspberry Pi via serial port and either acts on them or forwards them to the clock via an array of IR transmitting LEDs. 3 capacitive touch buttons are monitored using Atmel's excellent QTouch library and status updates are sent back to the Pi. It's brain is another Atmega168.

A friend cut the screen out of an inch thick acrylic sheet using his CNC. It's 10mm wall thickness is not to make it bullet proof but to hold up the weight of the speaker part of my lamp that sits right on top of it. There are also three M4 bolts going through the wall, top-to-botton, sandwiching everything together (and also serving as leads for the top speaker).

With the magic of Brasso, a bit of polishing turns the first milky acrylic into a clear screen.

Finally, the motor is mounted on a thick aluminium plate, mainly for cooling purposes but also to provide some inertia to dampen any vibrations. The plate is seated in soft polyurethane foam for the same reason of not transferring any potential vibrations to the lamp. Again, minimizing noise. When everything is assembled the clock only produces a faint hum, like a distant fridge or aircon.

A sensor to index the orbital position would lock the tracking better. Counting magnets does work, but every few days it misses a beat and the display rotates by two magnets. Since the display orbits, it is only noticeable when I call up the menu and it doesn't appear where it is supposed to. I can send a command to the clock to skip to the next magnet, by holding down the menu button, so this is not really a drama.

back to the sunrise lamp

Videos

It would be nice if the display were dimmable. It's well readable during the day but at night it's almost a little too bright and it would be great to automatically reduce the intensity based on the time of day. This could be achieved in software without much overhead, by just making the pixels "shorter".

Coding the display was expectedly finicky. Timing is crucially important when it comes to switching the LEDs in precise locations on their round trip. Interrupts are great for timing things that need to happen elsewhere, while the main program loop is busy formating text or answering requests on the serial port. However, when using more than one, they can get in each other's way. So care has to be taken to not stay in a blocking routine for too long, and to potentially account for lost cycles here and there.

Since I wanted the clock to be visible from all directions, I liked idea of the text to orbit slowly around. Just shifting the buffer continuously by one pixel gave me a very harsh looking scrolling effect, so I added sub-pixel scrolling by injecting a sub-pixel delay just when the display wraps around. The result is a smooth, slow scrolling effect.

Btw, the position of the display, ie. awareness of where the front is supposed to be, is done by counting the magnets, via the ripple on the supply voltage coming from the magnets.

Thoughts for future improvements.

I'm thinking of digging into the source code of the ESC to increase the PWM frequency beyond an audible frequency. Maybe the SimonK firmware is a good place to start.

DISCLAIMER

Other projects you might like