Author Topic: 152 kHz crystal oscillator (impossible to find the crystal)  (Read 4690 times)

0 Members and 1 Guest are viewing this topic.

Offline ltz2000Topic starter

  • Regular Contributor
  • *
  • Posts: 103
152 kHz crystal oscillator (impossible to find the crystal)
« on: April 21, 2015, 12:01:07 pm »

I need to generate crystal accurate 152 kHz square (cmos logic) signal. MHz range oscillator followed by divider was the obvious solution. For example 4.864 Mhz / 32 = 152 kHz and internet search told me that such crystal is used for stereo transmitters. Should be easily available. Far from that.

Then I tried to match other division ratios with crystals available from Mouser/Digikey. No luck.

Maybe two divide-by-n dividers in series?

The last stage should probably be divide-by-two to make sure that the high and low periods are equal which is important in this case.

A custom made crystal is far too expensive for this project. Any ideas?

 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5213
  • Country: nl
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #1 on: April 21, 2015, 12:34:19 pm »
A country flag would help. I had a quick look and I can buy them locally for 3 euro.

http://www.hf-electronics.nl/Webwinkel-Product-3621698/Kristal-4.864-Mhz.html

Keyboard error: Press F1 to continue.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5408
  • Country: gb
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #2 on: April 21, 2015, 12:37:04 pm »
Is it exactly 152kHz? What's the purpose of it so we can gauge any other specs such as jitter.

My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.

PIC10F320 for example with a cheap canned oscillator if frequency accuracy is important, or the internal oscillator if not.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5408
  • Country: gb
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #3 on: April 21, 2015, 02:39:08 pm »
If you already have an MCU on your board, or some way of generating I2C, the SI5351 is pretty darned excellent, don't know why I didn't mention it before, I use it in a couple of my products.
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #4 on: April 21, 2015, 03:04:53 pm »
An AD9850 DDS chip driven with a 10 MHz source will give you 152.0000002346933 KHz, is that close enough? At least 10 MHz crystals are easy to find.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 916
  • Country: us
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #5 on: April 21, 2015, 04:36:31 pm »
Digikey can custom program a 'programmable oscillator' for your desired frequency.

e.g.

http://www.digikey.com/product-search/en?pv254=82&FV=fff4000d%2Cfff8004f&k=crystal+oscillator&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25

Less than $5 + shipping etc.

There's lots of solutions versus having to build your own divider circuit... All depends on your actual needs (accuracy, voltage range, etc).

cheers,
george.
 

Offline ltz2000Topic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #6 on: April 21, 2015, 05:09:31 pm »

Good ideas. Thanks for everyone.

What's the purpose of it so we can gauge any other specs such as jitter.

Vibration exciter driver in an old scientific instrument. Currently it has free running oscillator phase locked to an external reference. The instability of the oscillator is causing problems especially when starting the system.

My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.

Interesting, that came in to my mind too. My plan B was to use the existing PLL circuitry and simply fine adjust the n of the counter according to the PIC ADC input voltage. Not elegant but probably works.

Or it could be possible to use the PIC for the whole phase locking.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5408
  • Country: gb
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #7 on: April 22, 2015, 01:28:18 pm »

Good ideas. Thanks for everyone.

What's the purpose of it so we can gauge any other specs such as jitter.

Vibration exciter driver in an old scientific instrument. Currently it has free running oscillator phase locked to an external reference. The instability of the oscillator is causing problems especially when starting the system.

My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.

Interesting, that came in to my mind too. My plan B was to use the existing PLL circuitry and simply fine adjust the n of the counter according to the PIC ADC input voltage. Not elegant but probably works.

Or it could be possible to use the PIC for the whole phase locking.

I made one yesterday with a PIC10F322 using its NCO, plus a canned 10MHz oscillator for the reference. Note the sidebands, due to the way the NCO works, there's a bit of FMing on there shown as spikes at about 24kHz intervals. It's very slightly off due to the resolution of the NCO, at 152,001Hz.

Canned oscillator alone takes 10mA, PIC only about 2mA, and much less if slowed down, it's running at full speed.

BOM cost about £1.20 / $1.80.

An SI5351 would give far better performance, but it's a bit of a bugger to program.





Code: [Select]
#include <xc.h>
#include <stdint.h>

#pragma config FOSC=INTOSC
#pragma config WDTE=OFF
#pragma config PWRTE=OFF
#pragma config MCLRE=ON

#define NCO1CLK_FREQ (10000000UL)
#define NCO_FREQ (152000UL)
#define NCO_INC (65536.0-(512.0*NCO1CLK_FREQ/NCO_FREQ)) // Needs to be double to maintain precision

int main(void)
{
OSCCONbits.IRCF=0b111; // 16MHz
ANSELA=0; // Digital I/O
TRISAbits.TRISA2=0;

NCO1CON = 0xC0; // Enable module and output, fixed duty cycle mode
NCO1CLK = 0x00; // NCO1CLK pin/RA1
NCO1INCH = (int8_t)(NCO_INC/256);
NCO1INCL = (int8_t)(NCO_INC);

while (1)
{
NOP();
}
return 0;
}

« Last Edit: April 22, 2015, 01:30:29 pm by Howardlong »
 

Offline ltz2000Topic starter

  • Regular Contributor
  • *
  • Posts: 103
Re: 152 kHz crystal oscillator (impossible to find the crystal)
« Reply #8 on: April 22, 2015, 07:51:49 pm »
using its NCO

I wasn't aware of the NCO. Makes things a little bit easier...

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf