1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Pulling a Ceramic Resonator

Discussion in 'Microcontrollers' started by jpanhalt, Aug 23, 2017.

  1. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,891
    Likes:
    501
    Location:
    Cleveland, OH, USA
    ONLINE
    Chip = 16F1829
    Ceramic resonator: muRata (source: DigiKey), 8 MHz
    PCB = soldered breadboard FR4

    Problem: In HS mode (datasheet specifies that mode for 4 MHz to 20 MHz), frequency is 0.3% high. Still within spec, but would like to pull it lower. Rock stable for frequency. In XT mode, frequency is better, but not as stable.

    Attached an EZ micrograbber to one leg (OSC1/CLKIN) and frequency got better. The datasheet shows some external resistors:
    upload_2017-8-23_11-10-30.png

    Space is very limited, so any modifications take more time, even just swapping resonators. I am wondering whether it is being over-driven. Question: Can RP and/or Rs be used to pull the frequency down?

    Other suggestions?

    John

    BTW: Curious bit in the errata: The OSTS status bit remains clear when using 4XPLL through version 4. Problem was easily discovered. I guess I wasn't the first to find out.
     
  2. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,328
    Likes:
    585
    Location:
    Peterhead, Scotland
    ONLINE
    I would expect C1 and C2 to have an effect on the frequency, the same as they would with a quartz crystal.
    Increase the values to lower the frequency.
    JimB
     
    • Thanks Thanks x 1
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,891
    Likes:
    501
    Location:
    Cleveland, OH, USA
    ONLINE
    Yesterday, I tried a cap labeled 4 pF and it pulled it way too slow. Based on your comment, I remembered that I had some smaller ones. It looks like about 2.2 pF does it. And, I can probably get it squeezed in.

    Thanks for jogging my memory.

    John

    Edit: 3.3 pF (label) got me to 0.1% high after soldering. Of course, with a temporary lead to ground, it was right on. ;)
     
    Last edited: Aug 23, 2017
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,328
    Likes:
    585
    Location:
    Peterhead, Scotland
    ONLINE

    Why not use a small variable capacitor (trimmer).
    JimB
     
  6. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,891
    Likes:
    501
    Location:
    Cleveland, OH, USA
    ONLINE
    For a final version, I might put a little trimmer there or use my SMD's. It is really easy to put those things in parallel. This is just to get my lightning detector antenna tuned up. For now, I can live with 0.1% as it is very steady compared to using the internal oscillator on the PIC.

    John
     
  7. BobW

    BobW Active Member

    Joined:
    Apr 28, 2010
    Messages:
    501
    Likes:
    52
    Location:
    Canada
    I'm surprised that the capacitors are so small. I typically use 22 pF caps on the resonator. I guess I'll have to have another look at the spec sheet.
     
  8. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,891
    Likes:
    501
    Location:
    Cleveland, OH, USA
    ONLINE
    The Ceralock line (muRata) of resonators I use have built in capacitors. They are Type CSTLS, and their datasheet gives a value of about 47 pF for the included capacitors.
     
  9. BobW

    BobW Active Member

    Joined:
    Apr 28, 2010
    Messages:
    501
    Likes:
    52
    Location:
    Canada
    I wasn't familiar with those ones. Nice that they have the capacitors built in. For something like frequency measurement where the clock frequency is critical, I always use a crystal. It may actually be cheaper since you save the cost of a trimmer capacitor. I see that Digikey has some ridiculously cheap 8 MHz crystals. I didn't check the specs though.
     
  10. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,891
    Likes:
    501
    Location:
    Cleveland, OH, USA
    ONLINE
    Hi Bob,
    My first choice was, of course, the capacitors. Unfortunately, I had forgotten that I had some leaded capacitors less than "4 pF" from another project. So, the crux of my question was whether those resistors shown in the Microchip schematic could be be used to pull it slightly lower.

    Then, I remembered that I had some mica capacitors down to 1.0 ± 0.5 pF and ceramics a bit higher . They are relatively huge but solved the problem. In another thread, it is asked what is on our "to order" list. I have added some 3.9 pF ceramic, COG capacitors, as my choices were 3.3 pF and 4.7 pF. The latter was too high. My capacitor meter is a DE5000 LCR, which is generally quite satisfactory, but fails in sorting such low value capacitances.

    My main concern was linearity about the target frequency. From 436 kHz to 564 kHz, the response is absolutely linear (given 0.1 kHz resolution), so I am not particularly worried about that small offset now.

    Right now, I am on a bit of a tangent to get a faster 32-bit x 24-or 32-bit division routine.

    John
     

Share This Page