Microcontroller goes off when motors start

QR1.sch (53980Bytes)
QR1.brd (33630Bytes)

 

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.

 

Try to power the atmega with

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

that works fine, i’ve

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

put a fairly big cap between

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.

i’ve already got a 104

i’ve already got a 104 capacitor near the motordriver between vss and the ground, also near the atmega32 a 103

Do i need a larger one?

**Yes 104 isnt large enough.**<br><p>Yes 104 isnt large enough. Use an electrolytic cap 100uF or larger near the battery.

Do you have a voltage regulator on the board? Check that it still works with a voltage drop of 800mV.

104? 104 what? pF? nF? uF? F?

104? 104 what? pF? nF? uF? F?

104 = 100nFThats 0.1uF so go

104 is just a code http://www.csgnetwork.com/capcodeinfo.html

104 = 100nF

Thats 0.1uF so go for something bigger like 100uF

ehh… 104F would be one big ass cap :slight_smile:

Noise suppression caps?

Try putting a 0.1uF cap in parallel with each of your motors to reduce noise from back EMF!  Hopefully this will solve your problem.

i’ve bought

i’ve bought some electrolytic capacitors on ebay, so i have to wait until I have received them

make it a bit simple :slight_smile: put

make it a bit simple :slight_smile: put 6V regulated to 5V with L7805 for the MCU and separate battery pack for motors

Here is a link to my robot

Here is a link to my robot schematic which has a total of six capacitors and controls motors and AVR from 4xAA batteries:

http://sourceforge.net/projects/roboticscode/files/Bluetooth%20Remote%20Control%20Tank/RC%20tank_no%20PWM%20schematic.pdf/download

Thanks, it is working!

Thanks, it is working!

Motherboards FTW!

I collect any old (or new!) electronics that are about to get tossed. I got two motherboards a while back and just decided to take all the parts off of one of them. I found nearly 20,000uF of caps on there! Mind you, some of them were only rated up to 6.3v so I won’t use them for 5v systems but I would suggest scrounging around a bit for some old electronics if you can. 20,000uF is enough to power a Picaxe 08M for days in low power mode!

I thought it was working

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!