Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Crystal frequency pulling

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Chat Zone » Archive through 02 March, 2012 » Crystal frequency pulling « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 780
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 05:54 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hi All, I want to alter the frequency of a 4MHz crystal by a few kHz. I know you can add a variable capacitor in series with the crystal, to vary the frequency a little. Looking on the Web, I found some references to using a small inductor in series as well as the variable capacitor.

Just wondered if anybody has dabbled in this, and can give some values for the inductor needed, and what sort of frequency variation can be obtained.
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 196
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 06:29 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I think maybe a few KHz is a little optimistic. I think it'll be difficult to 'pull' it more than a hundred Hz or so either way from the centre.
Top of pagePrevious messageNext messageBottom of page Link to this message

vlf
Frequent Contributor
Username: vlf

Post Number: 294
Registered: 10-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 07:16 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

cjaysharp is correct gordon, xtals are cut for Fundamental Series or Parallel Resonant frequency, or cut for an Overtone; overtone xtals would make use of an inductor tank-tune L/C for the desired overtone frequency... otherwise, fundamental xtals operate at the stated frequency to pull them depend on the type having been cut for it's frequency; however they normally do not pull more than +/- 100 Htz.

At 4Mhz in a colpitts Osc circuit, a C-value between 47 to 100pf would do... and will depend on output you require too, as you pull the xtal it's output will reduce too... look at the Parallel Resonant Circuit, it has no need for an inductor, but requires a parallel cut xtal, that normally this is the type offered at most web-sites, however it's best to check this first.

See below URL, lots of useful circuits:

http://hem.passagen.se/communication/txo.html

Regards, Brian L.

(Message edited by vlf on 18 February, 2012)
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 197
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 08:42 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

You can, if you're feeling very adventurous, 'modify' a crystal, you can raise or lower the frequency significantly (significantly is relative to the accuracy of the crystal) by 'penning' it or raise it by grinding it.

I'm interested to know why you'd want to move a crystal by KHz though?
Top of pagePrevious messageNext messageBottom of page Link to this message

terry
Frequent Contributor
Username: terry

Post Number: 653
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 09:54 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I used to add a preset cap via a switch to the crystal in CB radio's to effectively add a channel 41 to a 40 channel set.


Terry
Top of pagePrevious messageNext messageBottom of page Link to this message

g6osv
Frequent Contributor
Username: g6osv

Post Number: 151
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 18 February, 2012 - 10:10 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Ahhh but that is by a pll the shift is multiplied by the phse locked loop.
Ian
been there done that
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 781
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Sunday, 19 February, 2012 - 11:19 am:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hi All, Thanks for the suggestions so far. The reason for altering the crystal is I found a PIC LED clock project on the Web, and I have all the parts. Connected it up on a breadboard, works, but the clock loses about 3 seconds in an hour. The normal solution would be to adjust the timing in the software, but I only have the HEX code. Not sure if having the crystal on a breadboard would affect the timing this much, but from what has been said this should only be a few hundred ppm max.
Top of pagePrevious messageNext messageBottom of page Link to this message

foxyrick
Valued Member
Username: foxyrick

Post Number: 13
Registered: 01-2012

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 12:25 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

That's quite a bit out then. It equates to the crystal being off by over 800ppm, and needing raising by nearly 3.5KHz. Do you have a few other 4MHz crystals you could try? You might get lucky. Or try leaning it to one side, that works for my automatic watch

I would suspect that the code is a bit dodgy myself though, rather than the crystal being that far off unless it's a cheap one from somewhere foreign with poor QC.
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 199
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 12:32 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I'm not so sure, I think the use of a prescaler with a timer will multiply the error.
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 782
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 12:50 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I did try it with a 3.2768MHz crystal, and the time was out by a similar factor, so I thought the software was probably to blame. There might be some other projects on the Web, that might be more accurate, but the display I have is a 4 digit CC multiplexed type, so the choices are limited.
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 200
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 12:53 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

So there were two versions of the code? A link might be helpful :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 784
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 01:11 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

There are two versions of the code for 12 and 24 hour clocks, but both are for 4MHz crystals. When I used the 3.2768MHz, I calculated what the time should be, but it was still out by about 1 second in a thousand. The project is here

http://www.electronica-pt.com/circuitos/en/pics/85-digital-clock.html

Just realised, the ASM is included. Could someone have a look, and see if there is a simple fix in the software.
Top of pagePrevious messageNext messageBottom of page Link to this message

alexr
Frequent Contributor
Username: alexr

Post Number: 201
Registered: 02-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 03:41 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Looks more like a hardware problem to me. It could be that your circuit layout is causing parasitic oscillations that are driving the PIC rather than the crystal or maybe the PIC configuration bits are not set to enable the crystal oscillator. Either way the PIC is not being driven by the crystal.

I say this because if you were loosing 3 seconds per hour when using a 4MHz crystal then using a 3.2768MHz crystal you should be loosing about 10 minutes per hour. The fact that your error remains about the same indicates that the crystal is not driving the PIC.
Alex
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 201
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 04:08 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Doubt It's parasitic oscillation if the clock is accurate to 3 seconds, (Gordon said he'd calculated the time using the 3.2768MHz Crystal) it's the Crystal that's being affected by the breadboard or the software isn't as accurate as it should be or perhaps both.
Top of pagePrevious messageNext messageBottom of page Link to this message

alexr
Frequent Contributor
Username: alexr

Post Number: 202
Registered: 02-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 04:33 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

As I understand it the time was out 3 seconds per hour with the 4MHz Xtal then with the 3.2768MHz crystal it was out by a similar amount. If that is true then the crystal can't be controlling the oscillator frequency.
Alex
Top of pagePrevious messageNext messageBottom of page Link to this message

vlf
Frequent Contributor
Username: vlf

Post Number: 296
Registered: 10-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 04:56 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Hi... I use bread-board for R.F. experiments, and measured the capacity between any two side-by-side tracks, to be 3.2pf... thus, I ensure osc/xtals and alike R.F. areas, get a 3 to 4 track spacing where possible; also I place links to Ve, two tracks away either side from any working R.F. tracks for screening.

It's possible the extra tracks if there side-by-side holding the xtal, is reducing it's fundamental frequency !, recommend check this area out...

It's just occurred to me that again, are you sure your using a fundamental parallel xtal at 4Mhz... otherwise if it's an overtone, this would account for the large seconds drift.

Regards, Brian L.

(Message edited by vlf on 20 February, 2012)
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 785
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 05:07 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Sorry, what I meant was with the 3.2768MHz crystal, I worked out the percentage slower it should be, if the circuit was counting right. If I worked it out right, I should get 2949 pulses from the seconds LED, in a hour. I got about 3 less, so it is still about the same error. This assumes that it is not parasitic oscillation, and the PIC counting is at fault. If I measure the frequency from osc. out at pin 15, I get about 4.000300MHz, with a 4MHz crystal, no adjustment.

(Message edited by gordon on 20 February, 2012)
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 202
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 05:39 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I thought that was what you meant, that the error is fairly constant makes me think it's the breadboard pulling the crystal enough to give you the error and/or the software.

The assembly listing is also in the ZIP file so simulating it using the stopwatch in MPLAB should give an idea of how accurate it is.
Top of pagePrevious messageNext messageBottom of page Link to this message

cjaysharp
Frequent Contributor
Username: cjaysharp

Post Number: 204
Registered: 06-2010

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 20 February, 2012 - 07:13 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Blimey, I've just created a project around the code, set up some complex breakpoints so I can trap the timer intervals and looked at the special function registers then thought 'is that *all* the SFRs?'

I think I'm spending too much time with the bigger chips :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

rob_guyer
Regular Contributor
Username: rob_guyer

Post Number: 31
Registered: 08-2011

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, 25 February, 2012 - 01:47 am:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Substitution of this Xtal proved it OK but Xtals can shift frequency markedly sometimes when a connection point on the quartz slice develops a hairline fault, allowing an unwanted vibration node to emerge. Check by tapping the suspect while listening to a CW receiver.
Top of pagePrevious messageNext messageBottom of page Link to this message

gordon
Frequent Contributor
Username: gordon

Post Number: 787
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 28 February, 2012 - 11:46 am:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

I have managed to do a few experiments with putting an inductor in series with the crystal. Using a 100uH inductor in series, I get the crystal vibrating several hundred Hertz lower. Not really enough to correct the timing. An additional effect is the crystal frequency is more sensitive to temperature.

I am giving up on this solution, and will look for a different clock project.
Top of pagePrevious messageNext messageBottom of page Link to this message

atferrari
Frequent Contributor
Username: atferrari

Post Number: 1205
Registered: 05-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, 02 March, 2012 - 10:05 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Maybe here?
http://g4oep.atspace.com/pulling/pulling.htm
Agustín Tomás - Buenos Aires - Argentina

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page