Welcome!

Welcome to the forum for collectors, restorers and fans of flip clocks. Please Sign Up if you would like to take part.

By the way, signing up is free..

Announcement

Collapse
No announcement yet.

Motor Swapped Sony TFM-C770W

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Motor Swapped Sony TFM-C770W

    As we all probably know, the motors in the Sony TFM-C770W are just not good. They continually fail and mine was no different. I had picked up one these Sony's at a flea market for $5 not knowing their problems at the time. Opening up the interior showed, as always, a dead motor. It also however showed tons of empty space inside of the case. That led to the start of this project, taking a modern compact stepper motor and adapting it to function as the mechanism motor. This involved three induvial problems to solve, power, drive and control.

    First up was power. The original motor in this clock is a AC synchronous motor. Any Stepper motor that replaces it, as well as the controller would need a low voltage DC power supply. For this i used one of the many bare low voltage ac rectifying power supplies off amazon. In this a case a 5VDC 2A model. The Clock actually has both a 4.76 and 4.99V Rail but these are AC and of a unknown power rating. It was placed in the empty space behind the back left of the mechanism. The AC input was wired directly into the old clock motor power connections
    Click image for larger version  Name:	IMG_20230304_081433_HDR.jpg Views:	0 Size:	334.2 KB ID:	27777
    Next up was drive. I bought many small stepper motors for this project. However I settled on the common 28byj-5v+uln2003a motor and driver combos found all over amazon. The uln2003a driver was secured down right between the radio and the clock mech. Pushed up right to the front as to avoid blocking the ventilation slots. Also the leds on the driver boards were blocked out with electrical tape. They leak a lot of red light which is not desirable. The motor shaft of the 28byj-5v needed to be adapted down to the original gear. It was simply filed down and gear carefully press fit on. For reference the original gear has a shaft diameter of around 3.5mm. The stepper motor was simply hot glued in place of the old one.
    Click image for larger version  Name:	IMG_20230304_081426_HDR.jpg Views:	0 Size:	459.0 KB ID:	27779
    For control, I went with a Arduino pro micro to drive the stepper motor. Specifically a 5V 16mhz model as this allows for better clock accuracy. it simply was the easiest thing for me to use. There are better controllers for the same price out there, such as a esp32 based board, this was just the most similar. The controller is connected to pins 8,9,10,14 and everything is driven in raw calls. This isn't the best way to do this likely but is close to the most predicable run time wise. I am intentionally doing noting else on port B of the Arduino and made sure I'm not interfering with anything else. So far this is netting me a gain of about 3 seconds per day and i may be able to improve that further. Current code as follows
    Code:
    #include <util/delay.h>
    void setup() {
    DDRB = B11111111;
    }
    void loop() {
    PORTB=B00000011;
    _delay_us(4023);
    PORTB=B00001100;
    _delay_us(4023);
    PORTB=B00010000;
    _delay_us(4024);
    PORTB=B1000000;
    _delay_us(4024);
    }
    I do have more plans for this clock. The alarm light is out and i may replace that with a green led as well, as the working radio light. My black light still works but i can see it being replaced with led backlight strips. I may also take neutral orange strontium aluminate paint (dries clear glows orange in uv) and paint over the clock digits. This is to get a much brighter face without introducing more visible light into the room. Any ways that's all. I'll happily answer questions if anyone has any.​
    Attached Files

    #2
    It's now been about a week and its about time I gave an update on how this is going. After a 60hr run we gained only 2 seconds of time, a very respectful performance, roughly 10 parts per million. An yet, the plan is to change how the Arduino keeps time, adding a rtc chip and even changing the . This may seem like a drastic step, and yet it is necessary if I want to keep proper time in the future. The code posted makes one critical assumption that is required for the clock to keep good time, that the Arduino processor clock source is consistent. To spoil the conclusion at the start, The Arduino clock sources, epically on the pro mini I used are not.

    To give a more detailed explanation on the time keeping. The code above runs on hard coded system delays. Such delays are directly timed based on processor clock cycles, all the way down to one clock cycle. On a perfect 16mhz Arduino that is 62.5 nanoseconds. This allow extreme levels of precision in adjusting the timing when using it as a clock. Even if the Arduino clock isn't accurate to 16mhz you can just time out and adjust the delays to match, as long the clock is consistent. Luckily for me someone else has already measured the frequency shift of the exact Arduino that i had used. Link to the full page.
    Click image for larger version

Name:	promini_tempco_small.png
Views:	243
Size:	14.9 KB
ID:	27837 Click image for larger version

Name:	promini_small.png
Views:	218
Size:	22.5 KB
ID:	27838
    As the graphs show, the processor clock frequency on the Arduino is not good as the temperature changes. Across the temperature ranges tested the processor clock shifted 4000hz. 4000hz out of 16,000,000hz doesn't seem bad but that becomes error of about 3 min per day, That's really not that useful for time keeping. So how can we fix this? We the simple answer is to use a better clock source. There are Arduino's out there that use a proper quartz crystal, Those while being much much more accurate can still have temperature drift issues. The only reason I managed such accuracy was having the clock run open case in my basement which has a consistent temperature.

    To fix this the plan is to use and external Real-time Clock chip. These chips have extremely accurate temperature compensated crystals inside . Normally these chips are used to directly keep the time and then send the time out to connected devices. More useful to me however is the direct crystal output. This gives a perfectly accurate clock source. This solves one half of our timing problems.
    Click image for larger version

Name:	IMG_20230310_192054_HDR.jpg
Views:	220
Size:	608.6 KB
ID:	27839
    The other half of our problem is translating that accurate pulse source into clock movement. For this the Arduinos have a solid solution already. Built in the cpu in the Arduino are counting timers. The timers are extremely flexible., most apt to our situation is the ability to run code when the timer hits a certain value. This is where we'll be advancing the motor, Now normally these times are attached to the internal processor clock. However they can be attached particular external pin on the cpu. Of course the Arduino pro mini does not have this pin connected out and this is why I'll be switching controllers. Likely to the mt-tiny, the longest board in the above photo
    Click image for larger version

Name:	atmel 32u4 timer1.png
Views:	218
Size:	91.4 KB
ID:	27840.

    Some other notes before I wrap up for the day. The UV led tape came in and it works really well for the clock face in the test run. The leds to replace the radio and alarm lights are still way out in shipping. More updates on the clock soon, probably going to install and code tomorrow. Thanks for you time.

    Comment


      #3
      TLDR, but you definitely need an RTC chip if youre using arduino to keep time. You can short the battery pins because you don't need the battery backup with flip clocks, just the accurate time keeping.

      Comment


        #4
        Cool project! Did you end up taking it any further w/ RTC or any other mods?

        Comment

        Working...
        X