Feeling a little bored and deflated one evening, I decided to open up my drawer of stuff to grab a kit out of there to cheer me up. After all, kit builds have always been rather therapeutic for me – it’s basically like arts and crafts but for an electronics-minded person.
The kit I grabbed as a “generic” LED clock comprising of a 4-digit 7-segment display, controlled by an Atmel AT89C2051 MCS-51 microcontroller. The kit cost just AU$2.30 including postage when I bought it a year ago, so lets see what’s inside, what it’s like to build and how it works.
Not unexpectedly, it’s in a plastic zip-lock bag with no regards to electrostatic discharge precautions. But most of the time it doesn’t cause any issues …
Unlike other Chinese kits devoid of any information, this one comes with a thermally-printed label that has a basic schematic of the connections and a bill-of-materials. The listed company is SinaSong (HK) Trading Co. Limited, but the domain seems to have no operating website anymore.
Aside from that, there is the bag of components, a PCB and a four-digit seven-segment LED display module.
The PCB is a fairly decent quality fibreglass single-sided PCB with green soldermask and white silkscreening on both sides. The board itself is single-sided when it comes to traces.
Looking at the underside, we see that there is a logo for You Sheng Guang Cai and a marking of ZM-4 860925. Looking around, it seems that this kit has been copied and is available under fairly similar names from other companies.
Judging from the schematic and the pattern, this circuit is almost laughably simple as most of the work is done internally by the Atmel 89C2051 MCS-51 microcontroller clocked at 12MHz. The design is also a bit “naughty” with no reverse polarity protection at all (so make sure you connect power in the correct orientation). The design of the PCB is a little difficult due to the small size of the donut pads, slight intrusion of soldermask and lack of thermal-isolation meaning soldering is probably best done with a fine tip, fine solder wire and steady hand.
The LED module is packed on some foam to protect the pins, however, the other parts do not enjoy such a luxury.
The remaining parts include key-caps for the switches, an IC socket (both luxury items), the pre-programmed Atmel microcontroller, a resistor-pack, loose resistors/capacitors, a transistor, a buzzer-speaker and a crystal.
Unfortunately, it seems that the lock bits on the microcontroller have been set, so there is no possibility to dump the data within.
The first thing to think about is just how many joints are involved in assembling the kit –
LED Module - 12 Resistor Pack - 9 Microcontroller - 20 2x Switches - 8 2x Resistors - 4 4x Capacitors - 8 Transistor - 3 Buzzer - 2 Terminal Block - 2 TOTAL - 68
Construction was pretty much straightforward, with all components being of the through-hole variety. There wasn’t really much in the way stopping you from assembling it in any order.
The above shows the constructed kit after the IC and key-caps had been fitted and the protective films on both screen and buzzer removed. The one downside that is immediately apparent is that the input power terminals are not clearly labelled as to polarity – without any reverse polarity protection on the board, this could result in catastrophe. In my version, left terminal is negative, the right terminal (closest to the board corner) is positive.
The lack of thermal-isolation on the pads and relatively small size of the donut pads as mentioned before add to the difficulty of getting nice solder joints. That being said, with a bit of patience, this is easily overcome.
Getting set-up is probably the most cryptic, as once power is applied to the clock, it starts at 12:59 and pressing either button results in a loud and shrill beep. In fact, setting the clock actually needs a manual of its own – so lets refer to the left button as A and the right button as B.
To enter setting mode, from the clock display hold down button A and you will see a letter on the left and the value on the right. Pressing A will advance through the option left, pressing B will advance through the values.
Menu Option - Range - Description A 00-23 Clock Hours B 00-59 Clock Minutes C ON/OFF Hourly Beeps D ON/OFF Alarm 1 Active E 00-23 Alarm 1 Hours F 00-59 Alarm 1 Minutes G ON/OFF Alarm 2 Active H 00-23 Alarm 2 Hours I 00-59 Alarm 2 Minutes
Pressing button B will toggle the display from HH:MM to MM:SS. Pressing and holding button B allows you to reset the seconds to zero for time synchronisation.
I decided I didn’t like the buzzer or alarms, so I cut the trace leading to the base of the transistor to disable the buzzer. It was easier than desoldering the buzzer and I could “repair” the trace later if I wanted to restore the functionality. There seems to be no way to change the clock display from 24-hour time to 12-hour time that I could see, but that’s fine for me as I’m using it as a UTC time display for now. The clock accuracy depends on the 12MHz crystal – for mine, it appears to gain around five seconds per day which is not that ideal. That’s an error of about 58 parts per million (ppm) which is not unusual – such regular CPU crystals often have an error of 30ppm tolerance with +/- 50ppm stability.
The unit seems to run fine throughout the range of voltage allowed by the microcontroller – at 2.7V, it consumes around 17mA; at 3.6V, 26mA; at 5V, 41mA; at 6V, 52mA. With such an appetite for power, it wouldn’t run for too long on batteries – losing power means re-setting the clock from scratch.
The “Generic” ZM-4 AT89C2051 4-Digit 7-Segment LED Clock Kit is a fairly basic kit which has limited educational potential because almost all its operation is hidden within the pre-programmed MCS-51 microcontroller. That being said, the kit itself was surprisingly good for the price, coming with a schematic on a thermal-print label, a PCB that had silkscreen and solder-resist and parts that included an IC-socket and keycaps.
The construction was slightly frustrating due to the small size of the pads, but with a fine tipped iron, some fine tipped solder and some patience, it is not too difficult to finish. In the end, a basic 24-hour only LED clock with an annoyingly-loud buzzer and two alarms is the result.
Even though it is not exactly practical due to a lack of time back-up and moderately hungry power consumption, it’s no worse than old fashioned mains clocks. I suppose, for AU$2.30 including postage, it’s not even costly given that the cheapest analog clock from IKEA retails for AU$2.49.