Revolutionary Analog Wall Clock with Servo Mechanism
This unique analog wall clock distinguishes itself by employing a standard model servo to indicate the time. While its display principle aligns with that of a regular wall clock, two significant distinctions set it apart. Unlike a standard model servo, which cannot cover a full 360° rotation, the clock face must be modified to accommodate this limitation. Additionally, displaying both hours and minutes simultaneously using a single servo is unfeasible. Consequently, the clock is programmed to showcase the hours during the initial part of each minute and then shift to displaying the minutes for the remaining duration of that minute.
Precision Timing with PIC18LF1320 Microcontroller
Generating ‘Seconds’ with Clock Crystal
The heart of this clock circuit revolves around a PIC18LF1320 microcontroller, utilizing a 32.768 kHz clock crystal to generate the ‘seconds.’ Operating at 8 MHz, the controller core and peripherals are clocked by the internal RC oscillator. Test point TP1 provides a pulse per second. To set the time, two push-buttons are employed—one for adjusting minutes and the other for hours. These buttons also serve to activate the mechanical adjustment mode. A connected LED blinks once per second when the servo indicates the hours and remains off during minute displays. The hand signifies minutes during the first 50 seconds of each minute and transitions to showing hours for the remaining 10 seconds.
Adjustment and Power Management for Servo Operation
The circuit incorporates two potentiometers to adapt the clock’s operation to the mechanical travel of the servo. A third potentiometer compensates for any drift in the clock crystal, allowing compensation for an error of ±100 ppm or a drift of over 4 minutes per month. Jumper JP1, when fitted, reverses the servo’s anticlockwise rotation during clock adjustment. Transistor T1 controls the servo power, ensuring efficient energy use. Given the servo’s consumption, which is too high for a battery-powered clock, T1 acts as a power management solution.
Power Supply Options and Face Customization
The circuit operates on three 1.5 V cells, though a plugtop adapter supplying 5 V or NiMH rechargeable cells can also power it. The microcontroller’s ‘brown out’ feature prevents deep discharging of batteries by resetting the microcontroller if the voltage falls below 2.7 V. The face of the clock can be personalized using a downloadable “universal” face with a 120° display, suitable for servos with a travel between 120° and 180°. To adjust the servo travel, a step-by-step calibration process is detailed, ensuring precise alignment of the hand with clock markings.
User-Friendly Time Setting and Calibration
Setting the time involves using dedicated buttons: one for adjusting hours and the other for minutes. Holding down the buttons facilitates rapid adjustments. For periodic adjustments, potentiometer P3 can be tuned to compensate for minor time discrepancies. Careful calibration of P3 is essential as it can offset several minutes per month. Moreover, it is crucial to note that P3 does not impact the frequency supplied by test point TP1, maintaining the clock’s accuracy. www.elektor.com/090023