Back Original

A Daylight-Aware Clock: Physical Design

Finished product: a wooden circle mounted on the wall. The center glows with numbers indicating the time, CO2 content, and temperature, and a bar representing humidity. The wall around the clock is partly illuminated with white light, partly with blue; the white light shows the fraction of daylight on this July day.

Finished product first.

Ideation

My sketches and simulator gave me some idea of how I wanted this to go together. But it took a while to build. “Measure twice, cut once,” right?

Dimensions

I knew I wanted this to be a round clock, with the LED matrix in the center. Given a 1-meter LED strip around the circumference, I wanted the diameter to be about1

$$ 1 \text{ meter} \div \pi \approx 1 \text{ foot} $$

I also knew a few constraints on the height: 12mm for the matrix, about 2cm for the NeoPixel strip, and… that 4cm stackup for the electronics.

That would be a pretty thick clock body. I decided that the electronics stackup could protrude from the rear, along with some standoffs to level it out.

3d printing?

My local library has a nice makerspace, including 3d printers. I hadn’t had much of an excuse to use it, and I thought this might be a good project!

I used Tinkercad for some sketches. I quickly realized the size I was targeting would be too big for the print bed, so I started looking for ways to build it as distinct parts:

Tinkercad rendering of a different design: a solid frame with two inner bays. One component is a large, solid circle, with cutouts for the two other parts. In the center of the circle is a rectangular frame, empty on the bottom to hold the matrix. Above this (within the circle) is a smaller bay, empty on the top, with mounting points for electronics. The three pieces connect via interlocking tabs.

Bays to hold the matrix and electronics, centered on the face.

Tinkercad rendering of the outer frame. A ring of material forms the outline of the design, with an empty square of material inside it. The square and ring are connected by eight thin beams of material, at each corner of the square and at the center of each edge.

An outer frame to hold the Neopixel strips; this would be split into eights for printing.

A Tinkercad rendering of a prototype: two rectangular blocks of material. On each, a T-shape slot is cut out near one corner, and a T-shaped tab extends out near the opposite corner on the same face.

Tabs, slots, and glue to interlock the different parts.

I ran some prototypes before printing any of these at full-size.

For the electronics bay, I made a Pi mount that worked fine, thanks to detailed dimensional drawings from the Raspberry Pi folks and some good advice from Michael on sizing the nut cages.2 A 1/8 section of the frame was fine, but unattractive. The interlock kinda worked, but I gave up on fine-tuning it.

But after running a few prints, I realized I didn’t want to 3d print the frame. For one thing, I was looking at a lot of print time, 12h or more, and I didn’t want to tie up the library’s printers for that long.3 Mostly I was dissatisfied with the aesthetics of the printed item. Part of the goal was for this clock to be in my line-of-sight during most of the day– I wanted it to look nice!

The old ways

If you want A Thing in a particular shape, the traditional way is to cut it out of wood.

I took inspiration from this wood-block digital clock. Ideally, when the clock was powered down, it would look like “just” a wooden circle on the wall.

That project formed prior art for “an LED can shine through thin-enough wood”. I was also ready to compromise and drill small holes, possibly overlaid with veneer, if I couldn’t make the face thin enough.

All of this woodworking was beyond my equipment or expertise, though.

Woodworking

Luckily, I had recently had coffee with Maddie, who has a well-equipped woodshop, the skills to use it safely, and an interest in fun projects. I e-mailed her and explained the project, and she agreed to help!

Prototyping

Maddie started by taking plunge router and and routing out a matrix-sized area in a piece of pinewood scrap. We tried a couple different depth-stops, based on what we thought we needed to shine through, and how thin we were willing to risk cutting the board.

A pinewood board with a roughly rectangular area partially routed out, i.e. thinned. Within that area, an L-shaped area is routed out slightly more deeply, at a different depth for each arm of the L.

First prototype. Note the more-deeply-cut L.

Prototype results

I used the test program to check the quality of the shine-through. When running this program, the matrix iterated through white, red, green, and blue.4

I set up the test board in my house, roughly where I expected the clock to live, and gave it a look.

The red light made it through the board pretty clearly. The green light was severly attenuated, and the blue light was all but invisible.

The depth of the cut had a significant impact: the brightest region of the images above matches the places that were cut more deeply. Ultimately, this is good news – we can improve the shine-through by applying elbow grease (sanding).

The wood’s grain also has a significant effect: the darker parts of the grain absorb the light more fully.

The biggest surprise was the light-tunnel effect of the grain. Pixels on the same row begin to blend together, but only in one direction! This gives a retro, CRT-like effect – I didn’t hate it!

I was somewhat dissatisfied with the level of contrast. When the board was in direct sunlight, text was hard to make out.

Matrix cuts

Still, we thought these results promising enough to try with the real board. After all, we realized, we could always sand it down a little more! 5

We started by finding the board’s center (see caption). Then we drew some axes to align with the grain, and worked out approximately where we needed to cut to fit the matrix.

A round piece of pine wood with several markings on it, including lines meeting at the center, and a rectangle around the center (the matrix position).

Draw a chord. Find the center of the chord (1/2 its length). Draw a line perpendicular to the chord, passing through the chord’s center; this line is a diameter. Repeat to create another diameter. The diameters meet at the circle’s center.

We marked off slightly more than the area we thought we’d need so we could center the LED matrix visually. Maddie taught me a best-practice: cross-hatch over the area to cut, to make it obvious what needs to happen.

One challenge: the 1" depth of the board was approximately the depth of the bit. This made routing in a single pass difficult, so Maddie made multiple passes for each cut to keep the force on the bit even and low.

The project board, partially routed out. Most of a rectangle is routed out to a consistent depth. Along one long edge, the top surface of the board is marked with dark pencil marks, in an area that completes the rectangle. Next to the marked portion but within the cutout region is a long step, which is routed to about half of the total depth.

Partway through a pass.

We also had to contend with balance. The smaller dimension of the area to cut was just larger than the base of the plunge router. This meant on the last few passes, the router was only supported one one side: a slip could mean cutting right through the board!

Luckily, Maddie has steady hands: we wound up with no holes that weren’t already there. (We did reveal one hole that was already there, but that’s okay.) Our overall results were pretty good.

The project board, backlit by an overhead lamp. The cutout area is lit in orange.

Maddie’s overhead lights are brighter than the matrix, but are also further away.

A natural hole in the board, approximately 1 millimeter across.

The perils of natural materials: flaws happy little accidents.

Back to plastic, it’s fantastic

Even after going down the woodworking path, I still thought it would be nice to use 3d printing for the electronics mounts. I was still working out some aspects of the electronics – whether or not I could un-stack the HAT, whether or not to use a level shifter – and I thought it would be easier to make a replacable part than to commit to a particular layout.

Electronics mount: yes

My “unstacked” design had several mounts, “glued” together.

A Tinkercad render of the unstacked design. The piece is primarily a flat plane with four quadrants; counterclocksise and in order of decreasing size, they are labeled Hat, Pi, SCD30, and LS. All but LS have four circular pillars (standoffs) with screw holes; the LS has clips at top and bottom.

The un-stacked design marks the HAT, Pi, level shifter, and atmospheric sensor zones with embossed text.

A Tinkercad render of the stacked design. A rectangular plane with two sections; the smaller one is labeled SCD30, the larger labeled Hat + Pi. Both have four circular pillars (standoffs) with screw holes, roughly at the four corners.

The (final) stacked design, without the level shifter.

I split out the quadrants to iterate on them more quickly. Sizing the level-shifter clips was a finnicky business; it was much better to iterate on a 15-minute print of just that component.

I made a couple mistakes, like not using supports for the nut cages. Eventually, I settled on skipping the level shifter and keeping the high stack.

Prototypes of the mount points: a Raspberry Pi mount, the unstacked design, three level-shifter-only sets, and the final stacked design.

Prototypes and the final product (bottom right).

Display mount: no

I also tried making a display mount: something that would push the LED matrix against the bottom of the carveout, but also allow me to adjust the position. I came up with this design:

Prototype of the display mount. At the lowest height, a rectangle outlines the size of the matrix, with six screw-holes for attachment. At the left and right edges of the rectangle are two brackets, with raised portions extending further off the edge. The left bracket has two short horizontal slots, and the right bracket has one long vertical slot.

The outer “fins” were to sit on the non-routed area. The vertical and horizontal channels would be part of a screw + washer assembly, so I could adjust the position of the matrix, then tighten it down.

However, this design had a significant problem: I didn’t have a dimensional drawing for this LED matrix. I tried to work around this by exporting my design as an SVG, changing the line thickness, and 2d printing the result. This felt like it got me closer… but still not close enough that my test (3d) print fit properly.

Prototype of the display mount. At the lowest height, a rectangle outlines the size of the matrix, with six screw-holes for attachment. At the left and right edges of the rectangle are two brackets, with raised portions extending further off the edge. The left bracket has two short horizontal slots, and the right bracket has one long vertical slot.

I decided not to waste more time on test prints. Maddie had suggested using a point driver to hold the matrix in place; I decided that would be fine.

The rest of the owl

Material cuts

With an electronics layout in hand, we were ready to do the rest of the cuts.

We used the electronics bay to measure out the dimensions, and Maddie routed that out– though not as deeply as the display. She also cut out a channel for the Neopixels, at about half-depth of the board.

The electronics stack and the matrix near their final positions. The matrix is in its routed area, and the electronics bay is being measured for its routing.

Measuring out the electronics bay’s footprint

Maddie cutting the edge of the board. The board is face-up on a cutting table, held in place with tools and a clamped block. Some material has been removed from the board's edge, on the rear side of the board.

Cutting out space for the Neopixels.

To handle the height of the electronics stackup, Maddie drilled three holes in the rear, two towards the top and one at the bottom. We promptly filled these with lengths of dowel, creating standoffs that were slightly taller than the electronics stackup. The upper two standoffs also also gave me a place to attach picture wire for the final installation.

A short wooden peg protrudes from the rear of the clock, in the space between the NeoPixel strip and the electronics area. A strand of picture-hanging wire is wrapped around the peg and extends past the electronics stack, presumably to a peg on the other side (not shown).

It’s a standoff!

Finally, Maddie pulled out a point driver to attach the matrix in place. We set the points tight enough that the matrix wouldn’t move, even when the clock is vertical; however, they’re flexible enough to let us reposition it by hand as needed.

Electronics attachment

I went back to the library to work on final assembly.

I used Velcro6 to hold the electronics mount in place: one piece on the wood, one piece on the back of the electronics mount. It’s fine. Not fancy, but fine.

I initially tried a wood glue to hold the Neopixel strip in place, but it didn’t form a strong bond to the (plastic) sheath.

The makerspace manager suggested holding the Neopixel strip mechanically rather than with an adhesive, using a staple/clip shape. I took her up on this, again using it as an excuse to learn: on the recommendation of another friend, I designed the staples in Cuttle and laser-cut them out of birch plywood.

I ran the numbers for the dimensions: if I wanted to drill a 1/4" hole, and I had a 5mm sheet of plywood, the pins should be

$$ w = \sqrt{(1/4\text{in})^2 - (5\text{mm})^2 } $$

about 3.9 wide. I rounded up to 4mm, didn’t account for kerf, and used a smaller drill bit when making the mounting holes… so it wound up being a tighter press-fit than expected. Still, it worked well enough for the Neopixel strip that I used some of the spare staples to wrangle the other cables.

Two of these staples hold the ends of the NeoPixel strip to the bottom. Most of the weight is held on the wooden frame, as the strip is draped over the top.

Two of these staples hold the ends of the NeoPixel strip to the bottom. Most of the weight is held on the wooden frame, as the strip is draped over the top.

There’s lots of loose cables on the back. I’ve done my best to keep the clock out of reach of the cats.

There’s lots of loose cables on the back. I’ve done my best to keep the clock out of reach of the cats.

Ongoing work

I did some additional patching on the software: displaying the humidity, and using only the red channel for the matrix. I also sanded down the face some more, trying to let a little more light through.

I’ll probably continue both of those tasks. Maddie and other have had lots of ideas for things to display, and there’s always another half-millimeter of material that can be removed. But at this point, I’ call this project “done enough”!

Final, for now

I moved twice between when I got the parts for this project and when I started on it in earnest. As I’m wrapping up this post, I’m preparing to move again; I’m not hanging it in the place where I did most of the work!

But if all goes according to plan, here’s the clock in its for-the-indefinite-future home:

The clock, on the wall, with two curtains just peeking into view on either side. Its face shows 9:04 as the time. Below that, it gives 28C as the temperature, about 50% relative humidity as a vertical bar graph, and the number 716 providing a CO2 concentration. The wall next to the clock's edge mostly illuminated in white, with blue tails; the blue/white border indicates sunrise just after 6AM, and the white/blue border indicates sunset around 9PM.

Thanks for joining me on this project. If you have any suggestions or questions, or just want to say hi, check out the links below.