A little background:

I need to generate a 40KHz frequency as accurately as possible.

(One of my other posts is here: Stable frequency generation)

My code is solid- I'm using an Uno R3 and generating the most accurate frequency I can at this point. The only way to get a more accurate frequency is to upgrade the ceramic resonator to a crystal oscillator.

So, my over-arching question is: How do I actually upgrade the ceramic resonator to a crystal oscillator?

Things I'm considering are:

Is it worth it to actually upgrade my Uno R3 - and is it even possible? Is there a clone that drives the ATMega328p with a crystal oscillator that I could use instead? Is there simply just a better model for this application?

2 Answers 2


It's really easy to take an ATmega328 chip and wire it up on it's own. There are even instructions on the Arduino site on how to do it. Take a look at http://www.arduino.cc/en/Main/Standalone .

You could even pull the 328 out of the Uno, add the crystal and a few caps and then program it with the Uno board. I've done this a few times myself and it worked just fine for my needs.

  • I was trying to avoid using a bare chip as I'm using a 12v supply to power the Uno and utilizing the onboard 5v for some other circuitry.
    – Ramrod
    Apr 27, 2015 at 23:35
  • A 7805 voltage regulator would be easy to add to that circuit to give you a nice 5v to power the atmega and any other circuitry you have. They are relatively cheap and plentiful as well. Apr 28, 2015 at 3:07

Looking at the Arduino R3 reference design, it should have a crystal! But in practice it seems that the manufacturers are cutting corners and using a resonator because it is cheaper. I don't like your chances of fitting an xtal instead of a resonator. Unless you are a soldering expert and have suitable facilities, the most likely outcome is a dead board.

If your board has the MCU chip in a socket, you could bend the xtal pins so they don't go into the socket and solder a xtal and a couple capacitors to them. Not exactly a production line solution, but it will be fine if you just want a one-off - and anyone reasonably at home with a soldering iron could do it.

Freetronics (an Australian company) make a R3 compatable with xtals for both processors. These are very well made (I own two), and have a prototyping area as well. Downside is the higher cost. See http://www.freetronics.com.au/products/eleven#.VT3F-PCo1BA

  • The eleven may have its LEDs on the edge (where they belong), but the reset button is still in the middle of the board, which is not R3 compatible, and won't be reachable with a shield on top. Besides, two identical crystals this close together is kinda stupid. They could have done with one crystal and use a buffer to bring the clock to the other microcontroller. And yes, AUD 40 is expensive. Apr 27, 2015 at 8:28
  • @JorisGroosman The site I pointed to is AUD 29.00 - a bit less but still quite expensive (and they are out of stock)
    – kiwiron
    Apr 27, 2015 at 8:55
  • @kiwiron I do like the idea of slightly bending the pins as a one off solution... Although the Eleven would work perfectly if I could find one. Without trying to get off topic from my original question, can I run my code on a Freeduino? (I would be able to solder a crystal into the kit).
    – Ramrod
    Apr 27, 2015 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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