⬆️ ⬇️

The second life of the old clock

In continuation of the acquaintance with LaunchPad mps430, I propose an article on the restoration of the performance of the old pendulum wall clocks.



image



The old pendulum wall clock with the battle of 1952 was caught. The mechanism had signs of repair and was a disappointing sight. In watches of this class, unlike mechanical wrist watches, the axes of gears do not rotate in stones (rubies) but in the holes of brass plates. This, with prolonged operation and the absence of regular lubrication, leads to an increase in gear play in the seat. Backlash accumulates in proportion to the number of gears, and the clock eventually stops walking. I do not know how this is treated in science, but on my watch there were traces of core in the area of ​​the seats, thus, apparently, they tried to reduce the diameter of the broken holes. In general, I did not begin to restore the fully mechanical move.

It was decided to replace the spring stroke with an electromechanical while maintaining the previous functionality, namely, displaying time and combat, as well as adding new features.

To work, we need: a pair of stepping motors from the printer, RTC, controller, keys for controlling motors, an ionistor for storing parameters and timing in the absence of external power, well, little things ...

Mechanically, it looks like this:



Initially, the clock had 2 springs, one running gear, the second one for a fight, a pendulum, which ensures the accuracy of the movement, and so on. After extracting unnecessary parts of the upgrade, there is a minute and hour gear + running step, as well as a few gear, hammers and a step that controls the fight. In the picture above, the running motor, from below - "combat". A separate dance with a tambourine turned out when calculating the number of steps of the running motor to move the hand for 1 minute. Since the printer manufacturers do not take into account the gear ratios of the old Soviet watches (I used gears mounted on the motor shafts by the printer manufacturers), it turned out that 14 half steps are usually needed to move the pointer for a minute, and 16 half steps are required every 25 minutes time testimony not swam. With the fight is easier. For the blow it was necessary to have 3 motor turns (576 half-steps).

Here is another picture:





Next is the electronics.

Here is the diagram:



')

As an RTC, I ordered Extremely Accurate I²C RTC literally on ebay, which means “terribly accurate”. The terrible accuracy of datasheet is determined by the built-in quartz and temperature sensor, which connects / disconnects to / from the quartz correction capacitances. In principle, when checking the accuracy of the move, I was pleased with the result. For a week, did not notice the departure more than a second.

The controller is our favorite msp430g2553, the eldest of the TI launchpad set. It carries on board 2 hardware serial interfaces, one of which will communicate with the RTC over I2C, the second will pour debugging information onto the computer via RS232.

Motors are low-current (not that not accurate, but that they consume little current), the 7-channel transistor module ULN2003A is quite suitable for control. True, 8 channels are needed, but there were no other modules in the magic box, so the 8th channel assembled a BC547C transistor and a pair of Schottky diodes protecting against reverse induction. It turned out that 5B was enough to power the motors.



On the 34063, a DownStep DC-DC voltage converter is assembled from 5 upwards (within reasonable limits) to 3.3V for the acceptance of RTC and msp430.



As a control body, a mechanical encoder was amputated from the body of an old, latent radio tape recorder. in the diagram it is shown as 2 buttons in a circle (the encoder itself). Also involved is its central button. To tighten its outputs to the power, we will use the internal msp430 resistors.





For feedback (control response), add an LED.



Then it's time to describe the conceived feature. The RTC has built-in memory, stored on batteries, and accessible as other registers via I2C. The idea is as follows. Since we have a stepping motor, we can, knowing the point of reference, understand the position of the arrows at the moment and store this position in the RTC memory. When external power is cut off, the RTC continues to count down the time and store data on the last position of the arrows. When the power returns, we take the old position from memory, the current time, consider the difference, and let the arrows down to the current time. Those. An automatic watch is obtained.

The starting point is set by setting the arrows at 12:00 and pressing the central button of the encoder for a long time.

Next, the encoder sets the current time and at the beginning of the sixth signal, by briefly pressing the central button, synchronization is performed (the clock links the current position of the hands and the internal RTC time).

Here is a video of the half-hour battle and the work of the encoder:



After this procedure, we have the full right to carry out the soundtrack of the move, namely the battle. Every hour we will beat the appropriate number of times, every half hour 1 time, but with greater speed. Actually, 1 strike is in fact a blow of one hammer and the subsequent blow of two more. The video is audible.



To carry out a quality fight, we also need to know the relative position of the main gear that drives the hammers. To do this, when the power is turned on, we “park”. We turn the combat motor in the opposite direction until it stops. Fortunately, the motor is weak, and when you reach this stop, it starts to just buzz. Then, using the empirically obtained number of steps, we bring the “combat” gear to the desired position.

The fee is made LUT partly. If it weren’t a SOIC RTC package, I would do it as usual. And so, he left a place for falling out, that's what happened:



back side:





The program is written in C under CCS5

Here are the sources:



The picture must be opened winrar th.



The style of the clock, except for the amputation of the pendulum, is preserved.



Total:

1. Revived the old clock

2. Added new features

3. Pumped mechanics, electronics and coding.

Source: https://habr.com/ru/post/162905/



All Articles