Let's Make Robots!

Microcontroller goes off when motors start

 

I'm building a wireless controlled robot with a tank kit and a dual motor gearbox. I'm controlling the motors with a l298 and an atmega32 micocontroller.The problem is that when i turn on the motors they probably cause a dip in the power and that makes the atmega32 turn off. The statusled which goes on when the wireless connection is started goed off. I wish i had a scope or something so i could check this. With my multimeter i could not detect much, the voltage dropped from 6 to 5.8 volts. I used 4 alkaline 1.5v AA batteries.

I had this problem before when i had the motordriver on a prototyping board. but i fixed it with a ld1117 those can only handle about 800mA. But also without the ld1117 the atmega32 turns off.

I think this are the options:

  • batteries can't give enough power, all power goes to motors, micocontroller stops
  • design problem
  • other...

Does anyone knows what the problem could be? i've attached my schematics.

 

AttachmentSize
QR1.sch52.71 KB
QR1.brd32.84 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I thought it was working with the electrolytic capacitor but when the tracks where on there was a higher current so it still stopped. I made a ld1117 between the power supply and the atmega and the capacitor behind it that should work but no. And just before posting a new question i read your post again and especially the part with "Check that it still works with a voltage drop of 800mV". I than remembered something about the ld1117, it need a supply current at least 1v higher. And i was going from 6 to 5v so with a voltage drop it would not work.

So now with 6 batteries it is working!

 

put a fairly big cap between power and ground near the motors, it sounds like a decoupling problem.  This cap will provide power during the surge when the motors first turn on.

that works fine, i've connected the atmega to the stk500 and the motors to the batteries

But this is not what i want as a solution, cause than i have more batteries and 2 thing that can run out of power

Try to power the atmega with four AA batteries and the motors with other four AA batteries.