Close

Two major discoveries! LEGO and Hole-punches

A project log for Unary Clock

Now with added LEGO™ - an ATMEGA328-based Arduino-compatible breadboard clock with a DS1307 for timekeeping and two DM134s driving 24 LEDs.

Shrimping ItShrimping It 04/24/2016 at 22:290 Comments

We made some major discoveries! Having experimented with laser-cutting housings for our LED clocks, (placing the two breadboards back to back), we found that LEGO technic 4.8mm holes can fit 5mm LEDs perfectly in the holes, and then we can just jam the whole breadboard build into the wall of a LEGO model. So we bring you the Beginner's LUCK (LEGO UNARY CLOCK KIT)...

The project is CC-licensed, we've provided a kit and build instructions but until we figure out how to source the bricks, only the electronics are included in the kit. It's basically the original documented project, plus you add your own LEGO.

The secret of the build is that there exist 1x1 Technic LEGO bricks, meaning we can create a wall with exactly 12 holes across (normal LEGO technic bars have odd-numbered holes, leaving awkward gaps).

We've switched to using white LEDs so we can then use LEGO '1x1 round plates' as diffusers to choose the color when we build it. Above, the time shows 4:05 PM - the top row in red is the hours, and the bottom row in green is the minutes (5 minutes per light).

We found the LEGO 'round plates' are not frosted enough and the brightness is too high when standing directly in front of the clock. However, it turns out that the paper cutouts from a standard hole punch make perfect diffusers. Just punch the circles and push them in...

As you can see in the distinctNumbers array in the source on github there's a scheme to make the hours more identifiable at a glance, by laying out the lit LEDs differently for each hour. This means you don't have to count the LEDs to know the hour.

int distinctNumbers[] = {
  0b000000000000, //0
  0b000000100000, //1
  0b100000000001, //2
  0b100010001000, //3
  0b001001001001, //4
  0b011000100011, //5
  0b000000111111, //6
  0b100000111111, //7
  0b011011011011, //8
  0b011101110111, //9
  0b101111111101, //10
  0b111111011111, //11
  0b111111111111  //12
};

However, currently the minutes just progress like a bar-graph from left to right, giving more of an ambient feel to the progress of each hour. That's partly because you'd have to multiply by 5 anyway in your head, which feels unnatural.

The LEDs are better seated by shifting the second DM134 down the breadboard by 4 holes compared to our existing layout. Even then it's a pain to get them all in by bending the legs , so we're now sourcing addressable RGB LED chains to make the build easier (though substantially more expensive, unfortunately).

We've made some progress ordering LEGO bricks from Bricklink, but the Aliexpress clone bricks are more promising for bulk orders now the original LEGO patent has expired, and those can be reliably ordered in large numbers for cheap.

Morecambe Community Hacking

Watch this space for more #MorecambeClocks . We've opened up an outreach programme for clock hacking based on our DS1307 build to our neighbours in the local community and so far we have in development...

And if anyone has seen Sam the Space dog then you should know that Morecambe Bay Primary School want him back :)

Discussions