NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Why no Capacitors used on Oscillator?

June 20, 2009
by BobaMosfet
BobaMosfet's Avatar

Hello,

I notice in the ATMEL reference for the ATMEGA168, on pages 30-33, for the frequency range of the crystal Oscillator used on pins 9 & 10 (XTAL1 & XTAL2), they recommend grounding each leg of the oscillator with a 22pF capacitor to ground, for stability against stray signals.

Why wasn't this done in the kit/tutorial that came with the ATMEGA168?

June 20, 2009
by BobaMosfet
BobaMosfet's Avatar

Is this actually why there are two 22pF capacitors in the kit?

June 20, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi BobaMosfet,

Capacitors around the crystal oscillator are recommended for helping the oscillator get started when it first turns on, and also have a small effect on the actual crystal frequency. However, when you're working on a solderless breadboard, there are fairly significant "stray capacitances" all over the place -- between every two adjacent rows, for example -- on the order of a few pF. This can be trouble in analog circuits, but for the oscillator, it ends up being an OK thing, and actually provides the capacitance needed for the circuit to function. If you want a few more (analog) details on the oscillator, let me point you to this Pierce oscillator page. Hope that helps!

Mike

June 21, 2009
by BobaMosfet
BobaMosfet's Avatar

Mike,

Thank you. I must admit, I envy you guys, getting started in life filling your heads with this stuff at MIT. You guys have a very bright future ahead of you. And I for one am so very grateful that you are sharing your know-how, reducing many complicated engineering problems down to fun and relatively easy steps that virtually anyone can do to make some fairly impressive first forays into electronics.

Your breadth and depth of knowledge in this area is always impressive. THANK YOU.

June 22, 2009
by wayward
wayward's Avatar

BobaMosfet,

with apologies to hevans/mrobbins guru team, who's to say we can't get there ourselves? =)

BTW. smart money is on dylanjkjk97 ;)

August 05, 2009
by BobaMosfet
BobaMosfet's Avatar

As an additional note, I tracked down the manufacturer of these crystals and they are in fact crystals, not oscillators. These are parallel cut crystals and drive at 14.75MHz pure (not an overtone). Adding the appropriate capacitors (in this case, they should be 20pF, not 22pF) helps make sure the signal is stable and not pulled in a direction by other interference.

My new Oscilloscope arrives in a couple of days and I'm going to actually clock the frequency on these with and without the capacitors to see what it looks like.

August 05, 2009
by wayward
wayward's Avatar

Speaking of oscilloscopes, I was thinking about buying one, but those things, it seems, tend to be quite expensive if quality is desired. I did see some digital oscilloscopes for sale; I guess the same holds for them. What is a good price range for a "beginner's oscilloscope"?

August 05, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi wayward,

For what it's worth, we (NerdKits) recently bought a used HP 54111D oscilloscope from eBay seller waste-not-recycling, and paid $160 + $60 shipping = $220 for a very nice used digital oscilloscope. It has 2 channels, nominal 250MHz bandwidth, 8192 sample deep memory, color screen. The only downsides are that it was built in 1988, weighs about 70 pounds, and is a bit bigger than a tower PC case -- it's huge! We got lucky and it was in perfect working condition, but we did spend several weeks searching eBay looking for something like this and are very happy with it.

Mike

August 07, 2009
by mongo
mongo's Avatar

Wow, this brings back memories! The Pierce oscillator is a handy little circuit, but I have found that it's a little unstable if you load the output much. I get around that by just adding another inverter or two as buffers. Since there are usually 6 on a chip, there are plenty to play with. One thing to remember though, is that it probably only works on CMOS chips because of their high input impedance.

I have seen digital O-scopes for as little as $200.00 in the past. Though they are usually slower (25MHz or so), they still have plenty of uses. There was one that actually connects to the parallel port of a PC making the computer part of the scope. Personally, I like that idea because there are so many things that can be done through software that are very costly if built into the scopes. Again. these aren't the fastest cars on the track but most are at least 2 channels which handles most of the tests you can throw at them.

August 10, 2009
by BobaMosfet
BobaMosfet's Avatar

Well, I went ahead and probed my crystal and it came out right on the nose at 14.74Mhz, and at 2.28V. I found that having the noise-canceling capacitors there, or not, had no real affect on my project design. In fact, as noise goes, the only noise issue I had was the standard 60Hz cycle that is all around us from power generation.

February 26, 2010
by michaeldallas
michaeldallas's Avatar

Just for fun, I attempted to measure the capacitance of adjacent rows on the board with an L/C Meter IIB by Almost All Digital Electronics. As stated, the board seems to have significant capacitance in it. The measurements shown range from 300pF to over 1000pF depending on the rows chosen.

February 27, 2010
by Hexorg
Hexorg's Avatar

Mmm, michaeldallas, let's build a tesla coil using those breadboards!

February 27, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi michaeldallas,

The 300-1000pF seems suspiciously high to me. It's more in the range of a few pF row-to-row. My guess is that your L/C meter is either picking up some noise, or alternatively something odd is happening because there's row after row of capacitively-linked breadboard rows.

Mike

February 27, 2010
by michaeldallas
michaeldallas's Avatar

The measurement seemed high to me as well. That's why I stated how the measurements were taken. I cannot speak for the equipment used. (I didn't design it and don't have full information on its strengths and weaknesses.)

To be more descriptive, the measurements didn't read like a straight capacitor. They moved erratically and ranged up and down during the measurement period - i.e. 600pF to 1100pF on a given row set. I suspected that this could be due to the several sets of wires set in rows accumulating and discharging capacitance as the device attempted to charge and discharge the capacitor.

Nevertheless, the measurements show that there is a significant "non-zero" effect going on. I find it eye opening to how the mere presence of wires and connections may affect the functioning of the circuit design. This is old stuff to engineers but fun to learn for a newbie none the less. I would be interested in someone more clever than I resolving how much capacitance a bread board could actually contain.

March 02, 2010
by Chaosrider
Chaosrider's Avatar

Hi,

I may be wrong but bear with me. I tried a few times to learn analog electronics but always have given up due to personal life/work time constraints.

I think what may be a good way to measure it would be to make a basic RC circuit (as in resistor capacitor) and use a scope to measure actual charge time vs expected one.

I guess the down side would be that you would need a fairly quick scope to be able to pick it up.

Maybe someone more experienced could say if the approach would work or not.

Thanks

Post a Reply

Please log in to post a reply.

Did you know that you can connect to certain car computers via the OBD-II port with a microcontroller? Learn more...