mcf5225x rtc driven from 60Hz line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mcf5225x rtc driven from 60Hz line

455 Views
leb
Contributor I

My application, running on the mcf52254, includes motor speed control.  To do so a rectified sine wave from the 60Hz line is fed into one of the ATDs for line synch.  I also have a 32768Hz crystal connected to the RTC.  I'm asking if anyone has connected the rectified sine wave to RTC_EXTAL and configured the RTC in the clock module for external oscillator rather than crystal.  I don't know if the waveform is suitable for the RTC.  If it worked it would reduce the component count, no issues with getting the RTC crystal going and be at least as accurate as most wall clocks.

Labels (1)
Tags (2)
0 Kudos
1 Reply

331 Views
TomE
Specialist II

> I don't know if the waveform is suitable for the RTC

That's a good idea, but I'd guess the sine-wave wouldn't be suitable. Referring to "2.8 Clock Source Electrical Specifications" to find the required slew rate for the RTC_EXTAL pin, and find they don't give ANY specifications for this pin, slew voltage or frequency! There's no mention of any hysteresis on the input, so you can probably assume there isn't any.

You'll have to give it a 60Hz square wave.

I've seen devices that use a filtered mains sine-wave as a clock input start running really fast when there's some noise on the mains. Like the switching noise from a Motor Controller. Like you're building.

I'd suggest you SERIOUSLY low-pass filter it to remove all spikes and glitches, and then turn it into a square wave via a Schmitt trigger. You can use an HC14 or build something out of a few transistors if you can't afford the space or money for the HC14. You could use op-amps to do the filtering and the squaring. Circuit examples here:

Schmitt trigger - Wikipedia, the free encyclopedia

Tom