I'm using a 10W/12V PCB mount SMPS for a project. In the same board I'm using an ATMEGA2560. When there is a power fluctuation, the ATmega freezes and all the communication is halted. How can I fix this problem?
Asked
Active
Viewed 111 times
0
-
USe a better power supply and remove it or add a Line filter or show layout in photo and all datasheet links and load schematics with measurement techniques for possible errors. Also any inductive switching noise nearby? – Tony Stewart EE75 May 18 '22 at 12:01
-
@TonyStewartEE75 There are some inductive loads connected next to it. – Lex May 18 '22 at 12:07
-
2What kind of power supply are you using? Where do the power spikes come from. What is your schematic an layout (do you have capacitors near the supply lines of the ATmega?) – kruemi May 18 '22 at 12:07
-
2You have many problems but lack necessary details above to answer it – Tony Stewart EE75 May 18 '22 at 12:08
-
1These are some generic solutions https://electronics.stackexchange.com/questions/49824/microcontroller-with-a-long-wire-for-digital-input/49825#49825 – Tony Stewart EE75 May 18 '22 at 12:17
-
Also twisted pair cables at right angles crosstalk less – Tony Stewart EE75 May 18 '22 at 12:18
-
@kruemi I am using ECE10US12 by XPpower. – Lex May 18 '22 at 12:19
-
your layout is the problem – Tony Stewart EE75 May 18 '22 at 12:20
-
@TonyStewartEE75 Attached schematics for more info. Hope this helps. – Lex May 18 '22 at 12:43
-
1The logic diagram is not a physical layout. Show detailed photos and measurement probes with Gnd location – Tony Stewart EE75 May 18 '22 at 12:47
-
1@Lex - Hi, In future, when you are asked to supply more details, please edit *that* question to improve it - don't delete that one and post an updated version. Thanks. – SamGibson May 18 '22 at 13:18
1 Answers
2
The Schematic looks ok. So it's most likely down to the layout.
- Reduce interfence power
- Make your circuit more resitant to interference
- If there are inductive loads powered by DC, give them freewheeling diodes. If they are powered by AC use snubbers
- For the switching power regulator, use the layout guides the supplier of the component suggests. Don't do anything fancy.
- The capacitances must be close to the VCC pins. Keep Power and Ground traces as short as possible and keep the close together.

kruemi
- 2,994
- 16
- 29