Circuit schematicCrystal oscillator circuit

I am trying to design a real-time clock circuit using a 32.768 KHz oscillator. I have no access to a datasheet for the microcontroller that I am using, but I know it requirese a 330K resistor and an oscillator of this frequency. I decided to use a 12.5 pF crystal, so I estimated 15 pF for the loading capacitors.

This is only a 2 layer board, and the copper pour on the underside of the crystal (Y1) is grounded. A thick trace can be seen underneath C4 and R1, this is a power line that powers the controller (can be 3.3v or 5v). Trace widths between crystal and controller are .17 mm.

The problem is that my real time clock is not "ticking". I have narrowed the issue down to this circuit. If I have made some obvious mistake, I apologize. I am no engineer.

Crystal Datasheet (CFS-206): https://www.mouser.com/datasheet/2/77/CFS-145%20CFS-206%20CFV-206_E-1131372.pdf

  • \$\begingroup\$ What uC needs a 330k R ? That seems to be your problem Maybe ~1k~10k \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Apr 16 '18 at 20:06
  • 1
    \$\begingroup\$ A schematic would be nice. We could infer it from the layout, but most of us are kinda lazy. Now, I'm wondering, what is this MCU for which you don't have any datasheet? How can you even design a circuit around a MCU for which you don't have any datasheet? \$\endgroup\$ – dim Apr 16 '18 at 20:14
  • \$\begingroup\$ @dim This is for a proprietary MCU. I am trying to recreate a cartridge for a game console, and this MCU is a custom chip. I had to reverse engineer a schematic using a multimeter. The cartridge plays just fine, but the clock does not work. \$\endgroup\$ – WeaselBomb Apr 16 '18 at 20:19
  • 1
    \$\begingroup\$ Do you fully trust this MCU? Are you 100% sure about the way to hook the crystal you mentioned? How did you know without documentation? It is going to be difficult for us to answer if this is a custom MCU without specs. The mistake could be anywhere. \$\endgroup\$ – dim Apr 16 '18 at 20:27
  • 1
    \$\begingroup\$ It is some issue with PCB design What makes you believe that when it is unclear what load caps the crystal needs (include a datasheet) and what the MCU needs (also include a datasheet). You seem to assume that your circuit "must work" but fail to include any proof for that. At 32 kHz the PCB design is irrelevant, as long at the connections are there (and not 1 meter long) it will just work provided the schematic is correct. I could just "guess" that your MCU isn't configured for a crystal osc. if you disagree then prove I'm wrong with some datasheets. \$\endgroup\$ – Bimpelrekkie Apr 16 '18 at 20:38

This oscillator is for a very low frequency crystal, 32 kHz. These crystals are very delicate (electrically), their resonant impedance is of the order of 30-40 kOhms, not 15 - 50 Ohms as for 30-50 MHz crystals. The 32 kHz crystals need exceptionally low driving power, 1 uW or so, so in order to not to overedrive them, the circuit needs sizable limiting resistor , as in this SiLabs example, 300 kOhms. Or a very low-voltage driver. The resistor must be at the OUTPUT of silicon inverter, not at input. This all is normal for a 32-kHz crystal.

Again, the circuit is very delicate. The (internal) feedback resistor must be about 10 to 25 MOhms. Therefore, any pin contamination by "no clean" solder flux can screw the oscillator badly. For the very same reason many circuits of this kind are protected by some blob of epoxy coating, to prevent accidental moisture condensation. So I would recommend to clean the board thoroughly up, especially UNDER the MCU IC itself, in hard to get places.

Another potential reason for the failure to start oscillating could be the additional parasitic capacitance on XTAL traces. When the circuit was on a breadboard, all pins were hanging in open air, and parasitic capacitance was less. I would try to reduce the C4 and C5 (board designation) to 8 - 10 pF, to give the circuit a bit more margin. And try something like 100k instead of 330k, for the same reason.

But I would start from cleaning first.

| improve this answer | |
  • \$\begingroup\$ Thank you, I will try the cleaning idea. If that does not work, I will try changing the capacitor values. \$\endgroup\$ – WeaselBomb Apr 17 '18 at 3:59
  • 1
    \$\begingroup\$ This fixed the issue! The clock now runs perfectly after soaking in isopropyl alcohol and scrubbing. I suppose there must have been some flux residue I couldn't see. Thank you! \$\endgroup\$ – WeaselBomb Apr 17 '18 at 5:02

You might unsolder the XTAL and measure the microcontroller transfer function.

You might insert an AC-coupled 30,000Hz signal into Xin pin, of amplitude 0.1 volt.

Expect the exact same frequency but 10X larger, on Xout pin. Perhaps even 100X larger.

Now reduce the 0.1 volt input to 0.01 volt. Expect a linear drop in Xout.

Repeat for 0.001 volt on Xin.

And for each of these 3 input cases, record the PHASESHIFT.

Can you set up a simulation, and verify the IC phaseshift + external phaseshift will be exactly 180 degrees at 32768 Hertz.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.