Can I use a MEMS oscillator?

Hello. I'm working with the ATMEGA 32U4 and I want to make a super tiny board. Is it OK for me to use a MEMS oscillator like this one (see link below), instead of the 16MHz crystal oscillator and two capacitors?

Thanks for any advice.

Sure, but you can buy crystals or resonators with built in caps that are about the same size.

1 Like

You really need to look at the 32U4 data sheet for Crystal specs and cross reference to the MEMS oscillator datasheet. Area of concern (if any) would be loading by the uC that could "pull" the MEMS off freq.

You did note the link stated none available?

I agree with jremington that you can get very close to the size with standard 16MHz crystals packages.

image

There is a xtal & 2 caps under the epoxy in the pix left of XTL1/XTL2

It sounds like you are trying to steer me away from it. I was noticing from the datasheet (correct me if I'm wrong) that I need to configure the MCU for an external clock. Is that right? And if so, it seems like it might get complicated, based on what I read here: Help for Changing the ATMega328's clock source (external clock) - Using Arduino / Microcontrollers - Arduino Forum

I like the idea of a crystal with built in caps. I will see if I can find something like that.

And why does it need to be 'super tiny' ?

Is this a commercial device and what experience of SMT stuff do you have ?

That data sheet is your very best source of information on the MCU.

It's not commercial. I have been making my own SMT boards for flight controllers. But they are not for drones. I build ornithopters (flapping wing aircraft) and the requirements are a little different, so I like to design my own boards.

Being able to use the arduino platform is important for me. Most drone controllers are not arduino compatible, and I don't know how to put my own code on them. I also want to connect servos directly to the board without having a separate "power distribution board" like they use for drones. If I used an arduino nano I would need something like that too.

They do need to be small and light, but I have to admit the weight difference between the MEMS oscillator and the crystal with caps isn't enough to matter. I just liked the idea of simplifying the board a little. I use solder paste and reflow technique for the SMT chips and I have been successful with that so far.

jremington, I wasn't questioning the data sheet, only my ability to understand it correctly. hahaha

The data sheet says that if you use an external oscillator as the MCU clock, you must configure the fuses accordingly. What do you not understand about that?

OH I thought the Mems device qualified as an external oscillator but I wasn't 100 percent sure.

In terms of a crystal with built in caps, is this a good device to use? JGC42-9362_CSTNE16M0V53L000R0 (murata.com)

It would, and the fuses would need to be set for "external oscillator". Mind that the oscillator output connects to a specific one of the two pins normally used for the crystal.

The linked device is a ceramic resonator, not a quartz crystal, but it should work fine if the frequency tolerance is within your specifications. That sort of resonator is what most AVR-based Arduinos have.

Thank you for your help!

@nathanchronister On this forum we give tips, background information, different views and so on. In the end, you decide what to do, it is your project.

Now is the right time to learn about fuses. The ATmega chips have fuses that sets for example how the clock should be used.

Can you show a schematic and pcb layout ?
I would buy a board, such as the Pro Micro.

Thanks. I have started reading more about the fuses.

Here is my schematic and one of the board layouts I am considering (not quite finished).

PCB_Basic_2022-08-23 (2).pdf (52.2 KB)

Schematic_Arduino Mini FC_2022-08-23.pdf (51.7 KB)

Every GND pin of the ATmega should be connected to GND. Every (A)Vcc pin should be connected to 5V.
Should the Vbus (pin 7 of the ATmega) be connected to Vcc, I don't think so, but I didn't look into it.

Where are the decoupling capacitors ? The 2.2µF is not enough.

There is no reset circuit ?

The AREF has no capacitor to GND, your analogRead() will be a little noisier.

Thanks. I will connect the GND pins to each other and the Vcc pins to each other.

My device is normally powered by a 7.4 volt battery. The servos receive 7.4 volts directly from the battery. The microcontroller receives power through the 5 volt regulator. However there are times when I want to power the microcontroller from the USB. This would be when I am writing code and I don't have the battery connected. So, to allow it to be powered either from the USB or the 5v regulator, I connected the USB and regulator both to Vcc.

In terms of decoupling capacitors, it has the 10uF tantalum cap in addition to the 2.2uF. I'm actually wondering if I should have another, smaller cap, as shown in this example:

Capacitor Link

There is no reset circuit. :blush: I just unplug it if I ever need to.

Thanks for the tip about the aref pin. I thought it didn't matter since I wasn't using the external reference. I have had problems with noisy reads though so I will try that.

You can take the average of a number of analogRead() instead of the 100nF at AREF.

A decoupling capacitor is typical 100nF. It is used for the high frequency noise at the 5V line generated by the ATmega chip itself. Even a low ESR electrolytic capacitor has a higher impedance for high frequencies.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.