Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: kaposai on May 15, 2009, 04:08:36 PM

Title: Crystal placement
Post by: kaposai on May 15, 2009, 04:08:36 PM
Hello everyone,

I wanted to add a 16mhz crystal to my circuit but I don't know where to put it in the board. I've seen other projects where the crystal is placed relatively close to the microprocessor. But since this has a been a build-as-you learn project, that special spot is already occupied. Is there any problem by placing the crystal a little bit far away? Is there any problem with the timing if the leads of the crystal are of different lengths?

Thanks for any input.
Title: Re: Crystal placement
Post by: SmAsH on May 15, 2009, 04:11:05 PM
how far away from the pins are we talking? an inch or a foot?
Title: Re: Crystal placement
Post by: kaposai on May 15, 2009, 06:17:33 PM
about 2 inches
Title: Re: Crystal placement
Post by: SmAsH on May 15, 2009, 09:55:18 PM
im not too sure, if the mcu is in a socket you could try putting the crystal underneath the chip...
Title: Re: Crystal placement
Post by: TrickyNekro on May 16, 2009, 01:06:47 AM
I don't think you are going to have a problem but try placing it as close as possible...
Title: Re: Crystal placement
Post by: SmAsH on May 16, 2009, 01:42:37 AM
just a thought, but you may be able to solder it underneath the board...
Title: Re: Crystal placement
Post by: kaposai on May 16, 2009, 05:07:52 PM
It's not going to look as cool as having it at the top, but I'll give it a try. I guess I can fit the capacitors nearby too. Thanks.
Title: Re: Crystal placement
Post by: Asellith on May 21, 2009, 12:14:52 PM

The Reason you want the crystal close by is because your producing a 16 Mhz signal and transmitting it over a trace or wire. I.E. an antenna. The longer the transmission line the more chance of picking up noise or if you hit the right magic length you can introduce noise into other things from the crystal. That is unlikely due to the fact that the crystal oscillator is not producing much in the way of power. On the flip side that makes it more susceptible to noise. A noisy clock can make an MCU do screwy things.
Title: Re: Crystal placement
Post by: Soeren on May 21, 2009, 12:45:56 PM
Hi,

The main reason for close mounting is that the traces adds capacitance of an order that counts at that frequency.

2 inches is not recommendable at all, half an inch is about what I'd recommend as a maximum.