The Cheapest Crystal Oven

oven

The crystals you’ll find attached to microcontrollers or RTCs are usually accurate to 100 parts per million at most, but that still means if you’re using one of these crystals as a clock’s time base, you could lose or gain a second per day. For more accuracy without an atomic clock, a good solution is an oven controlled crystal oscillator – basically, a temperature controlled crystal. It’s not hard to build one, and as [Roman] demonstrates, can be built with a transistor and a few resistors.

The heating element for this OCXO are just a few resistors placed right on the can of a crystal. A thermistor senses the heat, and with more negative feedback than the Hackaday comments section, takes care of regulating the crystal’s temperature. A trimpot is used for calibrating the temperature, but once everything is working that can be replaced with a fixed resistor.

This deadbugged circuitry is then potted in five minute epoxy. That’s a bit unconventional as far as thermal management goes, but the results speak for themselves: [Roman] can get a clock with this circuit accurate to a few seconds per year.

31 thoughts on “The Cheapest Crystal Oven

  1. I think that’s supposed to read “The heating element for this OCXO are just a few resistors placed right on the can of a crystal”, not “can of a resistor”.

  2. If you want to use something like this to turn a MCU into an accurate clock, there’s also another option: stick an NTC to the crystal case, and use that to measure the temperature. Then implement a software compensation table.

      1. Considering that the point of this OXCO is to be used for a PIC-based binary clock.

        The MCU’s there, the NTC’s there as part of this project; I didn’t look at what PIC he used for the clock to see if it has built-in ADC, but assuming for the sake of argument it doesn’t: is switching to another MCU from the same family, or adding an external ADC, really “vastly” more complex? Not IMO.

        1. It’s hardware complexity vs software comllexity. If your strength is code, then no, it’s not more complex. But if your strength is hardware, then the hardware solution is easier.

          Personally, I hate lookup tables for things that can be solved by math or changing hardware.

      2. It’s not really vastly more complicated, if you know some programming. The hardest part is probably finding the values for the table. This means that you’d have to take the device through a range of temperatures and measure a reference clock. A good reference clock can be taken from a GPS signal, so that leaves the temperature range. As far as the temperature, you don’t even have to measure the actual value, or do a NTC conversion. Just log the NTC value and the clock adjustment, and that’s it.

        Once you have the table, the actual code itself is maybe 10-20 lines.

  3. Prolly as cheap as accurate. He could at least wrap some isolating material around it, so there’s no temperature gradient around the crystal oscillator.Otherwise, nice idea

    1. As the link shows, it all gets covered in epoxy, though I think some thermal paste between the transistor and the Xtal case might help.

  4. An OCXO accurate to a few seconds per year? That’s as good as a TCXO!
    </obligatory-putdown>
    But seriously, reading the linked article, it turns out that figure is an estimate of the whole system’s time-keeping accuracy when calibrated to within 1 second over a week or two, not of the oscillator’s stability.

    Nitpicking the design, he used a TO-92 Darlington driving some resistors to dump heat. My first impulse would be to reduce the component count by using a TO-220/TO-263 with the collector right on the +5V rail. The heat-sink lug, of course, goes against the flat side of the crystal can, dumping all the heat right where you want it with quite low thermal resistance.

    1. Don’t forget you need to cover the major areas, including:

      the project (pointless, esoteric, been done, not a hack, why replicate a 15 cent part, not another bloody Arduido!);
      the technology (not another bloody Arduido!, 555 is a better choice, you can do this analog y’know, back in my day…);
      the editors (crap summary, noob mistakes, poor grammar, can’t spell, shilling scams);
      the posters (morons, asshats, editors);
      the rest (who uses MySpace?, HAD is rubbish now, a girl!?!, I can do this better, is this an advert?)

      1. Tony, HaD editors now just need to copy your comment into their Standard Disclaimer file! B^) And concatetinate it to the end of every posting as the first comment!

        1. I actually forgot “not open source enough”.

          That moronic comment was made on that pointless USB rechargeable soldering iron Kickstarter thingy – he felt the tip should have been a 1940′s-style lump of copper, not an off-the-shelf Weller tip.

      2. Really with such a thorough list you are making the first baby step towards a software design document. We could fully automate the negativity in the comments thread so humans don’t have to bother reading or replying anymore! Of course the project must be opensource and thus will go quite meta as people argue about what specific license to use, what language, those goddamn package dependencies, in my day we didn’t use libraries, perl is write only, who is going to document all this and so on.

      3. I’d be impressed, but [Tony] probably likes the Raspberry Pi and therefore his legitimacy as a poster is severely in question… no sense taking him seriously.

        j/k [Tony], I’m impressed. [Ren]‘s suggestion is very valid.

    2. Also need the negative feedback to improve HaD’s accuracy in spite of the inherent bias/offset, errors, non-linearity etc

  5. Copy what those guys did for the MS430 watch in firmware. They vastly improve the accuracy of the watch *without* even needing to mod the watch or heat the crystal. They calibrate the crystal vs temperature (via the uP internal temperature sensor). They claim to be within a few seconds per year.

  6. Aircraft inertial navigation systems use, for instance, 3 separate gyro units, who’s outputs are then averaged, to compensate for drift. Who’s up for some unconventional crystal circuits? ;)

    1. How would you do that? Where would you find some environments that average out the temperatures of the crystals?

  7. Probably a daft observation, but will the capacitance of the PIC’s xtal oscillator circuit not drift with temperature, pulling the frequency of this ovened crystal off?

    It might be be a slight improvement to do exactly the same to one of those four legged oscillator cans so the rest of the resonant circuit is kept warm too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s