Go Down

Topic: Help to power and crystal schematics design on ATmega2560 (Read 246 times) previous topic - next topic

easyanton

I am working on a custom board with a ATmega2560 microcontroller (datasheet) and need a little help with the power and crystal design.


Crystal:

I have chosen the crystal resonator "Yangxing Tech X322516MLB4SI 16MHz" (datasheet) because it is one of JLCPCB  "basic" component.

I have used two ceramic capacitor 22pF, but when I look online people use anything from 10 to 30 pF. What will the right capacitor be?


People also do different wirings

Some do
XTAL1 => pin3 and XTAL2 => pin1
Others
XTAL2 => pin3 and XTAL1 => pin1

Does the wiring matter on such a crystal or what is the right one?






Power:

I also see many different ways to handle power. Is there anyone who can verify that my setup is OK?





missdrew

The crystal in not polorized, so it does not matter, and the caps can be between 10 & 30 pF - 22pF is widely available.
I see no need for the inductor on the power feed.


easyanton

The crystal in not polorized, so it does not matter, and the caps can be between 10 & 30 pF - 22pF is widely available.
I see no need for the inductor on the power feed.


Thank you for a quick answer!

So you think this will be fine?




MarkT

The crystal in not polorized, so it does not matter, and the caps can be between 10 & 30 pF - 22pF is widely available.
I see no need for the inductor on the power feed.
Its best practice to quieten down the analog supply rail like this.  A lot of digital hash will be filtered out.
If you aren't using the ADC or analog comparator its irrelevant.  I've not personally seen much problem with the ATmega's though - but for noisier chips or if the supply is switch-mode its definitely worth having.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

PerryBebbington

The capacitors should be placed on the board as physically close to the power pins as possible with the shortest possible leads.

Paul__B

Glad to see you are not attempting to put a linear regulator on the board like the original Mega 2560.  :smiley-cool:

If - for whatever reason - you needed a step-down regulator, the proper approach is to mount a pre-made switchmode regulator module as a "daughterboard".

srnet

On the power supply point, I would indeed choose to use a linear power supply regulator, an LDO type, if you intend to use the board for LoRa or GPSs.

These devices operate at below RF noise levels and sensitivity can be affected by a few dB when switching supplies are used.

It does depend on the switch mode supply itself of course, some might have a worse affect than others.
No PMs please, they dont get answered.

easyanton

Glad to see you are not attempting to put a linear regulator on the board like the original Mega 2560.  :smiley-cool:

If - for whatever reason - you needed a step-down regulator, the proper approach is to mount a pre-made switchmode regulator module as a "daughterboard".
I actually need 3.3 volts for an ESP-01 module. Do you have the opportunity to explain what I should do / use. I do not quite understand what you mean?

TomGeorge

Hi,
Do you realise that C1, C2, C3 and C4 in your post#2 are not all in the one postion on the PCB.
Each of the 0.1uF caps will be at an IC that uses the 5V rail, the cap as close as possible to the ICs power pins.

What is your project and why use the 2560 controller?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
Can you please tell us your electronics, programming, arduino, hardware experience?

Do you have the tools to solder the SMD TQFP IC?

Have you developed a working prototype  for proof of concept?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

srnet

I actually need 3.3 volts for an ESP-01 module. Do you have the opportunity to explain what I should do / use.
The advice depends on what you are intending to use the ATmega2560 for, and you have not said.

Do you need a 5V version for instance ?

I have just submitted a ATmega2560 base PCB for manufacture and its a 3.3V version, I have no use at all for a 5V version and I cannot rememember the last time I needed to use a 5V logic only device.

No PMs please, they dont get answered.

easyanton

Hi,
Can you please tell us your electronics, programming, arduino, hardware experience?

Do you have the tools to solder the SMD TQFP IC?

Have you developed a working prototype  for proof of concept?

Thanks.. Tom.. :)

Hi Tom,

I work with software on a daily basis, but not as close to hardware as this project is.

It's a private hobby project and I'm doing it to learn more about hardware! Everyone has to start somewhere!

I have made a poc on a breadboard that works as it should, with an Arduino Mega, ESP-01 and an MB102 power supply, for my 5v and 3.3v system.

So therefore ATmega2560 and the 3.3 volts for ESP-01

JLCPCB will handle the soldering.


easyanton

The advice depends on what you are intending to use the ATmega2560 for, and you have not said.

Do you need a 5V version for instance ?

I have just submitted a ATmega2560 base PCB for manufacture and its a 3.3V version, I have no use at all for a 5V version and I cannot rememember the last time I needed to use a 5V logic only device.


ATmega2560 16MHz is 4.5V-5.5V. The JLCPCB does not sell the 8MHz version and since my POC works, I will stay as close to it as possible.

I have written a bootloader that can handle A and B firmware, and written an MQTT protocol for an ESP-01 so that I can update the firmware on a 2560 chip over the internet, in a secure way.

The rest of the chips' pins are in terminals on the board so I can use them later.

Now I'm trying to make it into a custom board, with 5v for the 2560 and 3.3 for the ESP.

wvmarle

Just use a linear regulator to step down the 5V to 3.3V for the ESP. The ME6211-3.3 is one of many different options.

Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up