Moon Clock Construction Details

Here I am showing the layout of the electronics driver board and the electronics enclosure.  This is to help you to plan – it is by no means perfect, and I notice that my actual layout is very slightly different.

The electronics driver board
Moon Clock Driver Board Layout
Moon Clock Driver Board Layout

This is built on a piece of Vero Board about 3 cm wide and 5 cm long, with 13 tracks.  It is probably not the most efficient layout as I made it up as I went along.  Starting from the right, the first two transistors drive the motor connected to M3 and M4.  The two on the lower left drive the motor connected to M1 and M2.  The two LEDs mounted across the M3 and M4 tracks are snubbers for the motor.  They have a forward voltage of around 2 v, so allow sufficient drive voltage (the motors need about 1.5 v) whilst conducting when the back emf of the motor exceeds this.  The two LEDs across M1 and M2 do likewise.  The top left transistor drives the Moon LED when pin PX is energised.  I can’t apologise for using the old zig-zag symbol for resistors – it is still widely used.

The transistors are BC337, which are rated at a continuous collector current of 800 mA and a current gain of 100, so should not overload the Pi. Anything similar will do, as they’re not working hard.

The main connector is a 0.1-inch pitch 12-way screw connector. The connectors for the LED and push-button are similar 2-way connectors.  I thought I’d bought a normally-off push button, but it turned out to be normally-on.  This doesn’t matter – I just reversed the software interrupt for a falling edge to test for a rising edge (although in fact there is still a falling edge, but when you release the button, which can seem odd to the user).

The electronics enclosure

Electronics Enclosure
Electronics Enclosure
The assembled enclosure
The assembled enclosure

I made this out of 3-ply wood that I had in my workshop, and put a bit of nice varnish on it. Perhaps I should have made it fractionally wider, as I had trouble plugging the power lead into the side of the Pi.

I’m not entirely happy with the hinges, because they protrude at the side and rear, so it’s not as neat as I wanted. But I’m quite pleased with the latch.  I bought a pair of ‘butterfly hinges and put them on each side of the door.  But I knocked out the hinge pin on one of them and replaced it with a small brass pin that I can just lift out and then swing the cover open.

I haven’t bothered with ventilation holes – the Pi is asleep most of the time and the highest core temperature I’ve seen when working has been 55 degrees C, and that is with an ambient temperature of over 30 degrees.

Clock Assembly
Clock Assembly

The assembled clock is shown above.  My only comment is that the enclosure should have been a little bit wider as this would have allowed the power plug to fit more comfortably.  As it is, I had to cut down a plug because the cable protrudes too far.  Another solution would have been to make a side-entry hole for the power lead, which would have been easier.