ATmega reset by using transformer power supply

ATmega reset by using transformer power supply!!! is any problem with my design ?!?!!!

  • Power Supply

    Votes: 0 0.0%
  • ATMEGA

    Votes: 0 0.0%
  • LM2596

    Votes: 0 0.0%

  • Total voters
    0

Thread Starter

hossein ghapanchi zadeh

Joined Nov 7, 2017
13
I am doing a project to control 4 DC motors (24V) with Atmega 644P. I used LM2596 for 5V (for MCU) and 24V (for relays) power supply. all motors are connected to the DC power of 5 and 24 V power supply I mean motor power and input of LMs are same. the problem is when I connect transformer to convert 220Vac to 24Vdc ( including full diode bridge and 2 capacitors 4700uF 50V) the micro controller reset during 2 motors movement but when I use switching power supply instead of transformer MCU works without any problems

all Vcc pins of MCU are connected to ferrit and grounded by 100nf capacitor. outputs of microcontroller are connected to uln2803 .

the mcu works fine to drive each motor separately or even two motors in different direction but when I want to move two motors in same direction (up) the mcu reset but after try it it works!!!! this problem doesn't occur when I use 220Vac to 24Vdc 10A switching power supply.

I added two 1000uF capacitor close to the MCU power pin and every thing works fine without reset it!!!! the transformer is 250VA and motors are 4A!!! I used GSIB2060 diode bridge!!!

Untitlhed.png
 

dendad

Joined Feb 20, 2016
3,721
It sounds like your analog 24V supply does not have enough current capacity. How big is your transformer?
Starting all motors together pulls the 24V supply down enough to drop the volts. Motors draw a large current to start
Try running the motors using PWM and FETs instead of relays, and ramp the start speed up, not applying full power. Another thing you can do, stagger starting the motors.
And try a series diode between the 24V supply and the 5V reg, with a 2200uF cap on the reg input. Then the motors will not discharge the reg input filter cap, and the 5V reg can run on the stored energy in the bigger cap while the motors start.
Full circuits and info would help fix your problems.
 

ebeowulf17

Joined Aug 12, 2014
3,275
I sometimes mangle numbers, but I'll try here anyway:

Each motor is 4A @ 24V:
4 * 24 = 96VA

4 motors:
4 * 96 = 384VA

Transformer rated at 250VA.

Sounds to me like your transformer is underrated for running four motors at once.
 

Thread Starter

hossein ghapanchi zadeh

Joined Nov 7, 2017
13
Dear ebeowulf17
thanks fir your reply
maximum 2 motors work together.
you and dendad are correct the problem is supply does not have enough current capacity.
(I remote it without MCU and without any stop or delay it works)
but I wanna learn how to solve it! and whats my wrong in this design.
 

dendad

Joined Feb 20, 2016
3,721
I think basically, your design does not have enough power surge rating to just turn a couple of motors on to full power.
Can you run the motors with PWM and FETs or must you use relays? And did you try the diode isolation I suggested earlier?
 

ebeowulf17

Joined Aug 12, 2014
3,275
I think this schematic missed
  • What is the value of R22?
  • Also, what is its purpose? It seems like the last thing you want is to drop more voltage coming out of your power supply.
  • Finally, it looks like you're missing a ground connection. I assume the left side of your bridge rectifier (marked 1) connects to ground, or else I don't see how you'd get DC voltage from it.
 

Thread Starter

hossein ghapanchi zadeh

Joined Nov 7, 2017
13
R22 is 0.22 ohms to limit current for motors and parallel with MKT 0.33J, I remove it and the problem get worst.
yes, sorry my bad. you are correct the pin marked 1 of the bridge is the ground
 

ebeowulf17

Joined Aug 12, 2014
3,275
R22 is 0.22 ohms to limit current for motors and parallel with MKT 0.33J, I remove it and the problem get worst.
yes, sorry my bad. you are correct the pin marked 1 of the bridge is the ground
Where on that schematic do the motors get their power from? Is it through the thermal fuse, at the same point that goes to feed the LM2596?
 

dendad

Joined Feb 20, 2016
3,721
This is why it is a good idea to post the FULL circuit diagram. It is really hard to help without that.
If you want help, please assist us to understand what you are doing. For some reason, so many thread starters are reluctant to put the info forward. And after a lot of messages back and forward, they say "oh, and I did this......." and add some detail that would have explained the problem at the beginning.
If we know all at the start it does save a lot of time and hassle.
Is this about what you have for the power supply?
PowerSupply.jpg
Drawing it in line like this makes it a bit easier to see.
 
Last edited:

Thread Starter

hossein ghapanchi zadeh

Joined Nov 7, 2017
13
I tried to show every thing but some time I lose to show or write some details hope you excuse me for that
Any way, I put the capacitor but I forgot to put it on this schematic(220uf 50V aluminium electrolytic capacitor ).
And the motor powers are from same point as LM2596 input.
I try to separate them by diode or resistor but nothing change !!
 

dendad

Joined Feb 20, 2016
3,721
Put the motor power directly on the bridge rectifier output, not the regulator input. See how that works.
If you are running the motors from the reg i/p, is the thermal switch operating on start up?
And what are the 0R22 and 4u7 parts there for? Get rid of them.

Try this...
powersupply2.jpg
 
Last edited:

dendad

Joined Feb 20, 2016
3,721
Can you post a picture of your setup. Running from the bridge output should be a lot better as there are isolation diodes and a battery to keep the processor running. Obviously there is something different from you wiring and the diagram.
 

dendad

Joined Feb 20, 2016
3,721
Another thought, make sure the -Ve lead from the motors goes directly to the bridge -Ve to prevent the motor current running through the processor regulator leads. It is always a good idea to keep the high currents away from the controller circuit. layout is important and bad layout of a switch mode supply can cause real troubles. have a look at the app notes
 
Top