Fine tuning a crystal in code

Go To Last Post
97 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why would you use a GPS for driving a freq counter ??

Most uses the 1PPS as a "strobe" reference for a clock or other timing circuits.

 

Looking at the 1PPS ref pulse is boring , and would usually be done in TI (Time interval mode) , not frequecy mode.

 

If you need a stable/disciplined 10MHz input as the reference for your freq counter , then you'd need a GPSDO (GPS-Disciplined Oscillator)

The Oscillator in a decent GPSDO would be an OCXO  , and usually be 10MHz. As this is the instrument reference standard.

Inside the GPSDO you'd have an OCXO or a DOCXO , that has better specs than a TCXO.

 

/Bingo

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> GPSDO

That’s what we’re talking about. I was just saying “GPS” as shorthand. According to the manual for my counter, I can get another digit of precision when using an external 10 MHz source. A GPSDO is the cheapest/easiest way to do that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

If you need a stable/disciplined 10MHz input as the reference for your freq counter , then you'd need a GPSDO (GPS-Disciplined Oscillator)

The Oscillator in a decent GPSDO would be an OCXO  , and usually be 10MHz. As this is the instrument reference standard.

Inside the GPSDO you'd have an OCXO or a DOCXO , that has better specs than a TCXO.

True, but those are more expensive....

 

Bingo600 wrote:

Why would you use a GPS for driving a freq counter ??

Err ? - In order to check the counters time base.

 

Bingo600 wrote:

Most uses the 1PPS as a "strobe" reference for a clock or other timing circuits.

Looking at the 1PPS ref pulse is boring , and would usually be done in TI (Time interval mode) , not frequecy mode.

Either works, and a reciprocal counter does not care which you decide.  I usually choose Hz, because what else I am measuring is defined in Hz

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

Bingo600 wrote:

Why would you use a GPS for driving a freq counter ??

Err ? - In order to check the counters time base.

 

That's what I do.

 

My frequency counter, an old Racal unit, has a TCXO and is pretty stable during a day. If I need to take accurate measurements I dig out the GPSDO and do a check at the start of the session. I bought my GPSDO on eBay, from China, for about 50 (USD/UKP/EURO - all seem to be about the same).

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lautman wrote:
> GPSDO That’s what we’re talking about. I was just saying “GPS” as shorthand. According to the manual for my counter, I can get another digit of precision when using an external 10 MHz source. A GPSDO is the cheapest/easiest way to do that.

 

Not necessarily.

What is your counters time base spec ?

If it easily accepts 10.000MHz external, you could order a  

  Murata  XTCLH10M000CHJA1P0   Oscillator VC-TCXO 10MHz ±0.5ppm (Tol) ±0.28ppm (Stability) 15pF CMOS 3.3V 8-Pin SMD T/R  $8.59  from Mouser, which is cheaper than a GPSDO.

To improve on that, maybe borrow a GPS to calibrate that.

 

Possible GPS could be Mouser #: 485-790 - anything with an inbuilt antenna, and a 1pps out, is convenient.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I drive all my instruments 10MHz reference inputs from a Trimble Thunderbolt GPSDO.

The TBOLT is connected to a modified Video RGB amplifier (75..50 ohm mod) ,and those outputs are connected to the instruments.

 

That what works for me (but i'm also reading the time-nuts list).

 

Are you a time-nut if you have:

 

5 GPSDO's  - 3 active

6 Rubidium clocks

10+ DOCXO/OCXO's

 

HP 5370B, HP 53332A , HP 5384A , PM 6680B , Racal 1991

 

Or must one have a Caesium ref & a H-Maser

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

  Murata  XTCLH10M000CHJA1P0   Oscillator VC-TCXO 10MHz ±0.5ppm (Tol) ±0.28ppm (Stability) 15pF CMOS 3.3V 8-Pin SMD T/R  $8.59  from Mouser, which is cheaper than a GPSDO.

 Possible GPS could be Mouser #: 485-790 - anything with an inbuilt antenna, and a 1pps out, is convenient.

 

Not much cheaper than a DIY Lars GPSDO

https://www.eevblog.com/forum/pr...

 

 

Edit:

The Square OCXO's have really come down in price

https://www.ebay.com/itm/1-USED-...

 

The Sine's are also low , they usually accept 10$

https://www.ebay.com/itm/1pc-Bli...

 

I'd use a Sine for the DIY GPSDO

 

But maybe a square for clocking an AVR in an isolated box (Square ==> Harmonics ==> Noise in the Lab)

 

/Bingo

Last Edited: Wed. May 22, 2019 - 07:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could you use a proxy for the time? Have your smartphone's own mobile/wifi/GPS antenna get time from whichever signal it can find and trust then (presumably with Bluetooth?) have an app that you write on the phone talk to the AVR to give it an accurate time every few hours or something?

 

AFAIK my phone is never more than a second out, year on year.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think a simple fact is forgotten.....

 

note that you indeed have a 11 minutes change in a year, but you will be adjusting your clock 2 times a year for daylight savings time and back.

so the clock should never be off by more than 6 minutes (which was acceptable to you) .....

So using a 20ppm cristal should not be a problem.

 

with respect to the AC I do not know how stable the 60Hz Us system is, but in europe we have had a number of instabilities on the net that caused clocks to go off by minutes over night.

They tried to correct for that, but as everybody corrected their clocks.... you had to do that 2 times.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

Who-me wrote:

  Murata  XTCLH10M000CHJA1P0   Oscillator VC-TCXO 10MHz ±0.5ppm (Tol) ±0.28ppm (Stability) 15pF CMOS 3.3V 8-Pin SMD T/R  $8.59  from Mouser, which is cheaper than a GPSDO.

 Possible GPS could be Mouser #: 485-790 - anything with an inbuilt antenna, and a 1pps out, is convenient.

 

Not much cheaper than a DIY Lars GPSDO

https://www.eevblog.com/forum/pr...

Nice project, but it consumes some time to build that up.

The OP does not need to lock 10MHz to 1pps, just measuring the phase between a GPS-1pps and his divided 32.768 -> 1Hz would be enough, and there even an easy 8b bit MCU capture will give a 25ppm span, with 0.1ppm LSB

He can then give a calibrate certificate with every unit.

He could even build in a 1pps accept, so users can do their own GPS checking at any time in the future.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lautman wrote:

mojo-chan wrote:

use a TCXO.

 

Yeah, this is my backup.  I haven't thought that much about it yet as I'm still trying to figure out if I can get a regular xtal to work with sufficient accuracy.  The larger issue is I'm trying to keep this battery-powered AND have no physical interface (e.g. pushbuttons).  I'm leaning toward a Particle Photon or EPS8266, either of which would broadcast a hotspot and web page for five minutes after the battery is installed.  Configuration will be performed via the web page.  Then the radio shuts down and the processor sleeps until awakened by an RTC (ideally, one per minute) and updates the time variables and display (e-ink).  The advantage of the Photon over the ESP8266 is that it already has an RTC driven by its own 32.768 xtal.  This is the xtal I'd be trying to correct. 

 

If I go to a TCXO, that's an additional part (and cost), and I can't use it to drive a counter while the rest of the MCU sleeps (like an AVR) with either the Photon or an ESP8266.  So I'd need an RTC with a TCXO built in, capable of interrupting the MCU awake.  Maybe those exist, but, as I said, I haven't gone on the hunt yet.

 

Try this PCF2129AT. It's got decent accuracy, under a Euro. The only thing that is annoying about it is that after reset the registers can be nonsense, e.g. the 0th day of the month. But once set it's fine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

Could you use a proxy for the time? Have your smartphone's own mobile/wifi/GPS antenna get time from whichever signal it can find and trust then (presumably with Bluetooth?) have an app that you write on the phone talk to the AVR to give it an accurate time every few hours or something?

 

AFAIK my phone is never more than a second out, year on year.

 

I build something like that years ago. I had an app for a Nokia with Symbian OS that would flash the screen. A photodiode on the clock could read the flashing and set the time. I thought about Bluetooth or IR but visible light is the only universal system available on all phones. Nowadays I'd probably look at NFC instead.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:
note that you indeed have a 11 minutes change in a year, but you will be adjusting your clock 2 times a year for daylight savings time and back.

 

I've just finished hard coding some DST dates into some firmware, in time for the EU to cancel it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mojo-chan wrote:

I build something like that years ago. I had an app for a Nokia with Symbian OS that would flash the screen. A photodiode on the clock could read the flashing and set the time. ..

Interesting, was that some slow modulation, (single digit baud? :) )  that could be decoded in the clock ? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've also done a clock, which derives basic time ticks from the AVR crystal oscillator, and time accuracy is pretty bad, altthough I've never bothered to measure it accurately. This would be just a few lines of extra firmware, because it sync's itself once a day with a DCF clock (another project of mine) and it's also connected to 2 PC's which keep time via NTP.

 

When you go into the details, crystals can be quite complex devices. I have a 100+ page PDF somewhere, just describing crystals and their properties. Also posted it here on AVRfreaks long ago.

For an accurate crystal oscillator everything has to fal in line. One screwup and you introduce errors.

 

20ppm is better than the regular uC crystal, which tend to be 200ppm. (and Which I have on my clock).

Initial frequency deviation is easy to compensate for. Bresenham is a good algorithm for it.

I devise a 10ms timer interrupt from my crystal, which adds about 10.000.000 to a long.

Every time the long is larger then 1.000.000.000 the clock ticks a second, and substracts a billion from the long.

By tweaking those 2 numbers you can calibrate from any clock frequency to 1ppb. ( Or even better if you use larger numbers)

 

But trying to calibrate a reguar uC crystal to those numbers is sheer folly. Frequency is not only temperature, but also randomly over time.

One of the biggest errors remaining seems to be dirt on the crystal. That dirt can move and that changes the mass distribution on the crystal, which changes it's frequency.

 

For around EUR12 you can get a 0.1ppm TXCO form Ali and the DS3231 (or similar) can also be around 100ppb. (There is at least one site on the 'net which did some long term (half or whole year or longer) measurements on drift on a batch of thes cheap timekeepers.

 

lautman wrote:
Anything else I’m missing?

Attached the crystal document.

Sorry I lied. it is 308 pages about crystals.

Attachment(s): 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
6 Rubidium clocks

Can’t Afford an Atomic Clock? Get a Molecular One! | Electronic Design

...

...; the device dissipates just 66 mW.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

picked up one of these recently have not had time to explore it yet!

https://www.amazon.com/CANADUINO...

 

Jim

 

 

Oh. THAT is too cute. I want to make a clock now. The trick is to make a free running clock that watch the time signal and sets itself when the time signal is good. I think there are some check bits in the 60 bit data packet.

 

The chip comes from Finland? Kirikou would be proud!

 

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

Last Edited: Wed. May 22, 2019 - 03:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

By the way, you can call the USA time standard at 303-499-7111 & listen to WWV live.

This number has been in use for at least 45 years...way back when I called it often (read about it in pop science mag), not knowing about long distance charges & our folks got a Huge phone bill. 

 

===

Wow the internet is pretty amazing... in 5 minutes I was able to locate the article I read back in March, 1973...they forgot to mention it cost $$$ to call every few hours

 

In those years, I had a radio that could get the signal by tuning 5MHz. My watch was ALWAYS correct as I'd do this a couple times a week.

 

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
My current Casio wristwatch gains several seconds in a month.

...

David. (who just corrects his wristwatch by comparing with my MSF wall clock)

The probable minimum range of specific Casio watches would be a fit for your location.

What is the range ... | About WAVE CEPTOR / Atomic Timekeeping | WAVE CEPTOR, Atomic Timekeeping | Timepieces(Watches) | CASIO

via Wave Ceptor | Casio USA

IIRC, some Casio sport watches also have RCC.

 

edit : a UK retailer :

http://www.thewatchhut.co.uk/search/search.asp?q=radio

via https://www.nist.gov/pml/time-and-frequency-division/radio-stations/wwv/manufacturers-time-and-frequency-receivers

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. May 22, 2019 - 03:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
In those years, I had a radio that could get the signal by tuning 5MHz.
Likewise though, IIRC, 10MHz on a Heathkit shortwave receiver (in storage)

SDR in a USB dongle is inexpensive; SDR in a box is relatively inexpensive.

youtube, WWVB SDR, impressive SNR

youtube, WWV SDR, noisy (same as on the Heathkit)

 

edit : typo

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. May 27, 2019 - 07:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

mojo-chan wrote:

I build something like that years ago. I had an app for a Nokia with Symbian OS that would flash the screen. A photodiode on the clock could read the flashing and set the time. ..

Interesting, was that some slow modulation, (single digit baud? :) )  that could be decoded in the clock ? 

 

Yeah, pretty much. I did one frame on (16ms) for a 1 and 2 frames on (32ms) for a 0. So the baud rate would have been about 24bps average.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
I think there are some check bits in the 60 bit data packet.

DCF77 (and other) time signals only have 59 bits. The last bit is not send to mark the start of the next packet.

 

The next biggest thing is the quality of the receivers. I've only used the cheapest, which are barely good enough to decode the time signal itself.

 

With DCF77, the 77.5kHz carrier wave itself has information for aditional accuracy. It may be som phase modulation, or just a stable frequency itself derived from an atomic clock.

They've really tried to put some extra's in.

 

And there are a handfull of parity bits in the signal.

I never used the parity bits myself, even tough it would be trivial to add.

I do make an estimation of the quality of the DCF signal, and I do that by measuring the widht of each bit. The width of the received bits vary with the quality of the reception and can be easily measured, and the signal rejected if the deviation gets too big.

 

But I have to confess: it's not perfect either. Every now and then my clock is off by exactly one bit. and the bit can be in the minutes or hours. Seconds usually drift because of bad uC crystal accuracy.

I once started on an algorithm to compare the received time with the local time, or receive multiple minutes and compare them with each other.

It may be about once a year that the reception is off, and apparently it does not annoy me enough to spend some time on those extra sync ideas.

//===========================================================================
/* Interupt routine called on every pinchange of the DCF input.
The time between the changes are used to decode the DCF signal.

Correct decoding depends on TIMER_RESOLUTION. 2500 -> 400 ticks per second.

Note: DCF bit times should be 100ms for logic 0 and 200ms for logic 1
but my receiver has bit times of approx. 90 and 180 ms.
Statistics about actual pulse widhts are collected. */

static TTimer2 Tmr;

ISR( INT0_vect) {	// SIG_INTERRUPT0)
	static int16_t OldTime = 0;		// Timer value of previous interrupt.
	int16_t NewTime;				// Timer value of this interrupt.
	int16_t TimeDiff;				// Timer difference.
	static uint8_t SyncCount;		// Number of minute sync pulses decoded.
	static uint8_t BitFound;		// A valid dcf bit is decoded.
	static uint8_t Error = false;	// Set on receiver errors.
	static uint8_t BitCnt = 0;		// Number of bits received for this minute.
	static uint8_t *pTime = &Dcf.Minutes;// Start storing data here.
	static uint8_t SyncIndex;		// Index for storing a decoded dcf time.

	NewTime = Tmr.Read();
	TimeDiff = NewTime - OldTime;
	OldTime = NewTime;

	if(  ( TimeDiff > MAX_PULSE_OFFSET)			// Store these pulse widhts in the debug array.
			&&( TimeDiff < MAX_PULSE_OFFSET + MAX_PULSE))
	  PulseWidths[TimeDiff - MAX_PULSE_OFFSET]++;

	if(  ( TimeDiff > PW_0 - PULSETOL)
			&&(TimeDiff < PW_0 + PULSETOL)) {	// 100ms Pulse = logic 0.
		if( BitFound == true) {	// Cannot find 2 bits in a row.
			Error = true;
			DcfErrorCount++;
		} else
			Pw0++;					// Accumulate statistics for debugging.

		BitFound = true;
	} else if(  (TimeDiff > PW_1 - PULSETOL)
				&&(TimeDiff < PW_1 + PULSETOL)) {	// 200ms Pulse = Logic 1.
		if( BitFound == true) {	// Cannot find 2 bits in a row.
			Error = true;
			DcfErrorCount++;
		} else
			Pw1++;					// Accumulate statistics for debugging.

		BitFound = true;
	} else if(	(( TimeDiff > PW_PZ_0 - PULSETOL)&&( TimeDiff < PW_PZ_0 + PULSETOL))
				  ||(( TimeDiff > PW_PZ_1 - PULSETOL)&&( TimeDiff < PW_PZ_1 + PULSETOL))  ) {
		// Delay of 800ms or 900ms between normal bits. Ignore these pulse widths.
		if( BitFound == false)	// Must have found a  valid bit before this delay.
			Error = true;

		BitFound = false;
	} else if(	((TimeDiff > PW_MINUTE_0 - PULSETOL)&&(TimeDiff < PW_MINUTE_0 + PULSETOL))
				  ||((TimeDiff > PW_MINUTE_1 - PULSETOL)&&(TimeDiff < PW_MINUTE_1 + PULSETOL))) {
		BitFound = true;

		if( BitCnt != BIT_COUNT_MINUTE) {
			// Always set Bitcount to initialize for a new minute.
			// Bug: This pulse is skipped for leap seconds.
			Error = true;
			BitCnt = BIT_COUNT_MINUTE;
		}
	} else {
		// Else: TimeDiff has an illegal value.
		BitFound = false;
		Error = true;			// We encountered an illegal pulsewith.
		DebugEvent |= FLAG_DEBUG_PULSE;
		DebugPWidth = TimeDiff;
		DcfErrorCount++;
	}

	if( BitFound ) {
		// A bit is found, now process it: Store, Calc Parity, Synchronize.
		switch( BitCnt) {
		/*
				case 0:				// First bit of each minute must be "0".
				// Bug: This could miss a leap second.
					if ( TimeDiff > (PW_1 - PULSETOL))
						Error = true;
					break;
				// Bug: Un decoded bits.
				// case 15: "Abnormal transmitter operation.
				// case 16: "Summer time" anouncement. (Last hour before change).
				// case 17: "CEST" (Central Europe Summer Time) is current time (UTC+2).
				// case 18: "CET" (Central Europe Time) is current time (UTC+1).
				// case 19: Leap second announcement (last hour before change).
				case 20:				// Start of encoded time, must be "1".
					if( TimeDiff < (PW_0 + PULSETOL))
						Error = true;
					break;
		*/
		// case 28: Calculate even Parity over 7 minute bits.
		case 29:				// If we stored the minutes.
			Dcf.Minutes &= 0x7F;// Erase parity bit.
			pTime = &Dcf.Hours;	// Start Storing Hours.
			break;
		// Bug: case 35: Calculate even parity over 6 hour bits
		case 36:				// If we stored the Hours.
			Dcf.Hours >>= 1;	// Hours are coded in 7 bits.
			Dcf.Hours &= 0x3F;	// Throw parity bit away.
			pTime = &Dcf.Days;
			break;
		case 42:				// If we stored the day (of the month).
			Dcf.Days >>= 2;
			pTime = &Dcf.WeekDay;
			break;
		case 45:
			Dcf.WeekDay >>= 5;
			Dcf.WeekDay--;		// Count from 0 to 6 insead of 1 to 7.
			pTime = &Dcf.Months;
			break;
		case 50:
			Dcf.Months >>= 3;
			pTime = &Dcf.Years;
			break;
		case 58:	// Bug: Calculate even parity over 22 date bits.
			// This bit may not shift the year value.
			// Bug: Return here is ugly and bit count must be incremented.
			BitCnt++;
			return;
		case BIT_COUNT_MINUTE:			// Sync pulse for the next minute.
			if( Error == true) {
				SyncCount = 0;
			} else {
/* 2015-12-19 Bug: Synching with an array for more reliability never worked as
intended. Therefore I disable it for now. Mayby I'll think of a better way
someday.

Simple solution is to narrow the sync down to a small time diff if we've ever
synched before.
Adopt: uint32_t MilliSecondsToday( void)? But not in this interrupt.

For now we just trust the decoded time.
*/
//				if( DcfValidSync) {	// Previously decoded DCF times are ok.
//					Clock = DcfSync[SyncIndex];	// Copy the old value, that one is verified.
//				} else
//				if( DcfLastSync == 0) {	// We have never synched before.
					Clock = Dcf;		// Use current value, there's nothing better.
//				}
				SyncCount++;
				SyncIndex++;
				if( SyncIndex > DCF_SYNC_TIMES)
					SyncIndex = 0;

				Dcf.Seconds	 = 0x00;		// These are not in the dcf time.
				Dcf.Hundredths = 0x03;		// Small correction compensates for receiver delay.
//				DcfSync[SyncIndex] = Dcf;

//				if( (DcfLastSync == 0)	// Sync, because we have never synced before.
//						||(DcfValidSync) ) {	// Sync, because we have a lot of sync pulses.
					DcfLastSync = 1;	// Lowest nonzero number.
//					DcfSyncCount++;
					DebugEvent |= FLAG_DEBUG_SYNC;
//				} else {
//					DebugEvent |= FLAG_DEBUG_SYNC_DELAY;
//				}
			}
			DebugSyncWidth = TimeDiff;
			BitCnt = 0;				// Fresh start for the next minute.
			BitFound = false;
			Error = false;			// No errors at start of a minute.
			pTime = &Dcf.Minutes;	// Start storing data with minutes.
			return;					// No shifting or storing of bits, no bitcnt increment.
		}

		*pTime >>= 1;
		if( TimeDiff > (PW_1 - PULSETOL)) {	// Time was logic 1.
			*pTime|=0x80;					// Store the DCF bit in the msb of *pTime.
		}
		BitCnt++;
	}
}

 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

david.prentice wrote:
My current Casio wristwatch gains several seconds in a month.

...

David. (who just corrects his wristwatch by comparing with my MSF wall clock)

The probable minimum range of specific Casio watches would be a fit for your location.

What is the range ... | About WAVE CEPTOR / Atomic Timekeeping | WAVE CEPTOR, Atomic Timekeeping | Timepieces(Watches) | CASIO

via Wave Ceptor | Casio USA

IIRC, some Casio sport watches also have RCC.

 

edit : a UK retailer :

http://www.thewatchhut.co.uk/search/search.asp?q=radio

via https://www.nist.gov/pml/time-and-frequency-division/radio-stations/wwv/manufacturers-time-and-frequency-receivers

 

 

Ah-ha.   I never knew that there were MSF wristwatches !!

I am impressed with the MSF receiver / clock motor unit in a $15 Radio Wall Clock.

Fitting a receiver in a wristwatch is pretty cool.

 

I tend to buy cheap Casio F-91W watches.   The strap lasts for a year or two.   Then I buy another watch.   Sometimes I buy a new strap.

The batteries last for much longer than the strap.

 

I suppose that I could buy a $500 digital watch.   The strap will still break.  My lifestyle does not demand millisecond accuracy.

 

David.

Last Edited: Fri. May 24, 2019 - 09:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was impressed by the "Wave Ceptor" watches they make. Some are full 6 band, i.e. world-wide coverage of low frequency time codes.

 

About accuracy, I think millisecond accuracy is unlikely with MSF or DCF77. As well as variations due to signal path I found that the edges produced by the cheap receivers have a lot of jitter. Sub 100ms is probably realistic with a good signal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good software should be able to correct variations in clock edges.

Yes,  I suppose that propagation at 300000 km/s means that it takes 1ms for the MSF signal to reach Wormshill.

 

If the software is really clever,  it could even compare MSF with DCF77.   (I should be able to get DCF77 in Wormshill but I have never tried)

 

David. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mojo-chan wrote:
Sub 100ms is probably realistic with a good signal.
Concur for AM

Unfortunately, the simple AM modulation with the small bandwidth available greatly suffers from external disturbances (including storms in the nearby of the transmitter) and it could be difficult to accurately detect the second mark in the time code, reducing the obtainable time accuracy at the receiver on the order of 0.1 s.

then add PM to likely reach 1ms.

CONCLUSIONS

...

Experimental tests, carried out using a synthetic time reference signal, highlights that the use of phase modulation allows for an overall synchronization error on the order of tens of microseconds, despite the reduced available bandwidth. For this reason, such an approach can be profitably considered for many industrial applications.

 

via (PDF) Inexpensive SDR-based longwave radio controlled clock for time dissemination in industrial wireless sensor networks

in https://www.avrfreaks.net/forum/fine-tuning-crystal-code#comment-2697791

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. May 24, 2019 - 10:13 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a side question back on the org. question.

 

If you just put a 32768 KHz crystal on a AVR that can measure temperature, then measure the speed, at let's say at 3 temperatures, (and the power voltage is regulated).

 

What is the real accuracy if you use those numbers to make compensation in SW ? (with a new crystal and one that is used (aged))

 

And the same question could be given to a 16MHz crystal and the internal osc.   

 

Are there someone that have real numbers?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did try this but it's not great.

 

First you have to calibrate the crystal. That is tricky because you need to measure the error and the temperature of the crystal accurately to find both where on the temperature curve it is and what the base error at 25C is. The temperature sensor on the AVR is low accuracy and heated by the AVR itself. You really need something contacting the crystal.

 

A proper TCXO will be laser trimmed in a temperature controlled environment to set the initial accuracy as low as possible, and the temperature sensor is on the die.

 

You can get a crystal module which is basically a crystal and oscillator circuit on a little substrate, factory trimmed... But they cost almost as much as a TCXO, so there is no point any more.

 

For the amount of faffing about you might as well spend €0.60 on a TCXO.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is not what I want. 

There is no need to calibrate just a need to know the speed.

If I have a board with the AVR, a 5V regulator and 32768Hz crystal and put it in a climate chamber at 0C 20C and 40C and messure the speed after 1 hour.

 

And then use that info to make a program that make a 1sec pulse (or what ever the clk are needed for), that are better that just 32768 pulses.

(if you want it to age a bit fast, in the old days it was common first to run for 24-48 hours at 70C)

 

 

I guess it's something like 1000 times better, but it's only a guess.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

david.prentice wrote:
Ah-ha.   I never knew that there were MSF wristwatches !!
Of all the watches I own my favourite that I wear most of the time is...

 

https://www.amazon.co.uk/Citizen...

 

 

This actually contains three radio receivers for DCF77 (Europe), WWVB (USA), JJY (Japan) so can get an accurate time update anywhere in the world. It also runs forever because the entire face is a solar cell so as long as it's in the sun then it charges and clearly runs on minimal current.

 

If this watch can do it I'd imagine any AVR could do something similar.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's a cool watch. I don't wear one any more as I always have a clock on the supercomputer in my pocket.

 

A coworker has a BCD clock. Talk about retro-geek! I love it. Maybe I'd make an avr atomic BCD clock, which would be mistaken for a bomb and cause lockdowns and swat teams... um... maybe not.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

If you just put a 32768 KHz crystal on a AVR that can measure temperature, then measure the speed, at let's say at 3 temperatures, (and the power voltage is regulated).

Do you mean the AVR measures temp, or you have a Xtal with an included thermistor ?  (those do exist, at least in MHz values)

 

Addit: I did find a 32kHz temperature sense Xtal, but these come in 6x2 cylinders, as they are intended to be used as temperature probes, with a separate standard 32kHz reference Xtal. Prices are hard to find on these.

https://www.axtal.com/English/Products/PiezoSensors/TemperatureSensors/
Hard to say if two of those tightly thermally coupled, would be better than a Thermister+Xtal, and if the aging of the two Xtals would track ? 

 

sparrow2 wrote:

That is not what I want. 

There is no need to calibrate just a need to know the speed.

If I have a board with the AVR, a 5V regulator and 32768Hz crystal and put it in a climate chamber at 0C 20C and 40C and messure the speed after 1 hour.

 

And then use that info to make a program that make a 1sec pulse (or what ever the clk are needed for), that are better that just 32768 pulses.

(if you want it to age a bit fast, in the old days it was common first to run for 24-48 hours at 70C)

I guess it's something like 1000 times better, but it's only a guess.  

1000 sounds optimistic.

The tempco curves are parabolic, and exceed 100ppm on the skirts, but in most uses, you rarely head to the edges... They also say +/- 10% on the fit equation, and ±3ppm/year aging spec rather gives you a chase-limit.

The biggest gain will be from an initial calibrate, where you will take the Xtal spec, and calibrate to say 1ppm granularity.

 

However, you can buy  ±5ppm Xtals, so you may decide that's good enough. You are not going to  improve a 5ppm xtal 1000x, but you might get 10x, 

 

Your 3 point curve sounds like you wanted to create and compensate the curve itself, but here you hit the memory effect, where current Xtal kHz is relates to the past thermal path.

 

You certainly could get 10 or 100 of those good ppm Xtals, and run them all in a chamber to see what batch variance you get, on the parabolas. 3 points there may eventually be ok, but you'd start with more points.

You could then use that batch curve, to craft a better match.

 

I have seen companies who chase specs buy a lot more parts than they need, and then select by test the best ones, and sometimes bin-allocate them.

ie if you can easily check a Xtal initial value to sub ppm, (post SMD reflow & anneal), you might be able to somewhat quickly check their parabola X-axis-movement, and parabola coefficient.

 

However, all of this rapidly gets very expensive,  so buying a TCXO  would be most managers & designers first choice :)

 

Last Edited: Sat. May 25, 2019 - 08:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you mean the AVR measures temp

Yes (many AVR's can do that, it not very accurate but I don't really care, I just want to know the speed error at known temperatures ).

And because I know the curve (but not offset) of the crystal change/error it's easy to calculate in between the two outer points. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

Do you mean the AVR measures temp

Yes (many AVR's can do that, it not very accurate but I don't really care, I just want to know the speed error at known temperatures ).

And because I know the curve (but not offset) of the crystal change/error it's easy to calculate in between the two outer points. 

 

Sure, that would be workable. If you have an AVR there anyway, you might like to automate that, so it generates a small correction table during the temperature ramps.

ie feed in a 1pps time base, and have the AVR do the work from there, while it is running in the test chamber.

If it reports both UP and DOWN ramp errors, you can get a feel for hysteresis/memory effects, and do a dozen using same-reel crystals/AVR, and you might be able to see if a batch-run calibrate is 'good enough'. (ie same table in all units )

Last Edited: Sat. May 25, 2019 - 08:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:
There is no need to calibrate just a need to know the speed.

If I have a board with the AVR, a 5V regulator and 32768Hz crystal and put it in a climate chamber at 0C 20C and 40C and messure the speed after 1 hour.

 

Err... You don't need to calibrate, but you did an extensive calibration?

 

Do you mean you want to just do one calibration and use the same table for every device? Well there is probably no need because the manufacturer has done it and publishes the table in the datasheet. You can problem get a spreadsheet if you email them. But that is only the start.

 

Each crystal has a different amount of error at 25C, so you need to calibrate that yourself. TXCOs are factory trimmed so no need. And then you need to write code that monitors the temperature at intervals, records the error, sums it and applies a correction factor ever day. The correction may last several seconds, and needs to work in such a way that it doesn't break your application.

 

Or just pay a few cents more and fit a TCXO.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Cliff

You have a nice "watch taste"  - I wear this Citizen EcoDrive - DCF77 synchronized

https://www.amazon.co.uk/Citizen...

 

 

 

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is the "slide rule" usable on either of those watches?

--Mike

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have never used it.

I don't fly ... So i don't need the fuel converter.

 

I just wanted a watch that:

 

1: Never needed batt change : EcoDrive (The black background is a sun cell)

2: Was accurate : DCF77 Sync

3: Was light : All Titanium

 

Have had mine for 11 years - wo. any trouble at all.

 

/Bingo

Last Edited: Mon. May 27, 2019 - 07:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think if I was to go back to wearing a watch, I'd get a mechanical one that ticks where you can see the works inside.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes the slide rules work. (I have 5 or 6 other watches with similar slide rules too, AFAIK they all rotate and are usable)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

A coworker has a BCD clock. Talk about retro-geek! I love it. Maybe I'd make an avr atomic BCD clock, which would be mistaken for a bomb and cause lockdowns and swat teams... um... maybe not.

 

It's an atomic bomb!  devil  S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. Here's what I'm imagining...

 

Using the atomic clock module to keep the time close, an avr and a tft display. Runs from the USB charger built into the desk. The tft shows a bohr model atom with the electrons orbiting and the time in bcd with light and dark "leds."

 

I have some xMega 192D3 parts and some petty big Mega somethings.

 

Silly enough for the avr projects section?

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
WWVB kit here (quite pricey)

https://www.universal-solder.ca/...

though decodes phase modulation; its one competitor is slightly less expensive :

404-1235UA-SS 14 inch UltrAtomic - Analog Wall Clock - UltrAtomic Time - Time - Browse Products

...

La Crosse Technology is introducing a line of radio-controlled clocks based on its innovative UltrAtomic® technology, designed to receive the phase-modulated enhanced WWVB broadcast signal that NIST has recently introduced. 

...

via

Manufacturers of Time and Frequency Receivers | NIST

...

 

VBPMC

WWVB Phase-Modulated Clocks (wall clocks, wristwatches, etc.)

 

...

via Help with WWVB Radio Controlled Clocks | NIST

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Using the atomic clock module to keep the time close, an avr ...
inexpensive, has a 1PPS signal, AVR's internal RC oscillator might be accurate enough between updates from WWVB.

Torby wrote:
Runs from the USB charger built into the desk.
Uncertain about its VUSB quality; some radio receivers have low PSRR.

Torby wrote:
The tft shows a bohr model atom with the electrons orbiting and the time in bcd with light and dark "leds."
Cool!

Torby wrote:
I have some xMega 192D3 parts and some petty big Mega somethings.
Probably more than enough compute power to add phase modulation decode if want the additional effort; radio controlled clock (RCC) AFE is simple, XMEGA ADC has enough ENOB, RCC data rate is low enough to do oversample-and-decimate (if necessary)

 


https://www.hkw-shop.de/index.php?lang=0&cl=search&searchparam=WWVB via HKW-Elektronik - Your specialist for radio wave technology

ATxmega192D3 - 8-bit AVR Microcontrollers

Extech CTH10A Humidity Meters | TEquipment via CTH10A: Digital Clock/Hygro-Thermometer | Extech Instruments

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
That's a cool watch. I don't wear one any more as I always have a clock on the supercomputer in my pocket.

Clock Wave

Clock Wave is an iOS app allows you calibrate radio controlled watch or clock anytime and anywhere.

...

edit : https://play.google.com/store/search?q=WWVB

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Jun 4, 2019 - 12:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
U.S.A. is a big country.   One WWV transmitter will struggle to give good coverage.
I'm over 2,100 km from the WWVB antenna arrays.  My La Cross S88907 weather station has no trouble syncing.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Mon. Jun 24, 2019 - 11:57 PM

Pages