| Electronics > Beginners |
| Load capacitors, MCP79410 with attiny and whatnot |
| (1/1) |
| Moriambar:
Hi. After a long time I'm here to discuss one of my long term failed projects, from which I'd like to learn. I used an mcp79410 RTCC with an attiny85 to have basically something activated on calendar based events. The problem is that I was never able to provide the correct load capacitors for the 32.768kHz crystal, no matter what the design. I was basically using a 9pF crystal from citizen, and calculated that for the given 3pF capacitance of the pins, 3pF of stray capacitance from the pcb (I read that 2-4pF is usually a suitable value, I don't know how to calculate that precisely), I should use two 6pF capacitors to obtain the 9pF total load capacitance. I tried several boards mixing 6 and 7 pF capacitors, trimmed the frequency but found out that no matter what I do the clock always seems to be off calibration (out of minutes in a month). I know this post is perhaps a bit confused (that's why I posted it here and not on the design forum), but can you please help me on how to face this problem properly and obtain a good result with the mcp79410? ps: I run from battery,3xAA cheers |
| mvs:
--- Quote from: Moriambar on April 09, 2019, 11:04:45 am ---I was basically using a 9pF crystal from citizen, and calculated that for the given 3pF capacitance of the pins, 3pF of stray capacitance from the pcb (I read that 2-4pF is usually a suitable value, I don't know how to calculate that precisely), I should use two 6pF capacitors to obtain the 9pF total load capacitance. --- End quote --- Check your math CL=(Cx+Cosc)/2+Cstray CL=(6pF+3pF)/2+3pF=7.5pF --- Quote ---I tried several boards mixing 6 and 7 pF capacitors, trimmed the frequency but found out that no matter what I do the clock always seems to be off calibration (out of minutes in a month). --- End quote --- 1 minute in a month is around 23ppm... Depending on environment temperature change, initial aging, etc... it might be even in spec. PS Have a look at RTC with integrated temp compensated crystal, like DS3232M. +/-5ppm in -40/+85* C range and no mess with load caps. https://datasheets.maximintegrated.com/en/ds/DS3232M.pdf |
| Moriambar:
--- Quote from: mvs on April 09, 2019, 02:41:00 pm --- --- Quote from: Moriambar on April 09, 2019, 11:04:45 am ---I was basically using a 9pF crystal from citizen, and calculated that for the given 3pF capacitance of the pins, 3pF of stray capacitance from the pcb (I read that 2-4pF is usually a suitable value, I don't know how to calculate that precisely), I should use two 6pF capacitors to obtain the 9pF total load capacitance. --- End quote --- Check your math CL=(Cx+Cosc)/2+Cstray CL=(6pF+3pF)/2+3pF=7.5pF --- Quote ---I tried several boards mixing 6 and 7 pF capacitors, trimmed the frequency but found out that no matter what I do the clock always seems to be off calibration (out of minutes in a month). --- End quote --- 1 minute in a month is around 23ppm... Depending on environment temperature change, initial aging, etc... it might be even in spec. PS Have a look at RTC with integrated temp compensated crystal, like DS3232M. +/-5ppm in -40/+85* C range and no mess with load caps. https://datasheets.maximintegrated.com/en/ds/DS3232M.pdf --- End quote --- Thanks. I now finally understand the formula, so basically for 9pf I shoud put there 9pF capacitors, right? (9pF+3pF)/2+3pF=9pF (assuming 3pF is good as an estimate on the stray capacitance). I will definitely check out RTCs with integrated compensated crystals, I hope to find the right one! ps: the number I gave where after trimming done in the RTC79410 (which is ~127ppm), so the actual factor was ~150ppm (127 + 23 since they had the same sign). Cheers |
| Navigation |
| Message Index |