Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
I have a problem with l298 driven by attiny2313. I've designed a circuit and ordered a pcb. It seems that it works almost fine, except for one dc motor (connection marked on board image in the attachment)(: When I try to drive this motor, uC resets. I can drive it a *bit* - until the current it takes exceeds 0.1A.
For starters, change the cap immediately right of the regulator with an electrolyte of around 22µF and add a 100nF cap over the controllers supply lines - right at the pins, on the solder side.
Too bad you got the PCB made without asking about it, as there are numerous issues with this layout.Well done is done, so let's try and compensate by patching the board.
I'd rather redesign the board. I can afford one more pcb prototype:)
Would you advise to route manually?
But ONLY AFTER you get this first board to work properly else you will have a third then a forth etc until one finally works.
I see on the first PCB a trace from pin 10 of the IC in the middle of the PCB (processor) to one of the motor diodes. This ground trace is not good!!! Is it when the motor is connected to the bottom connector that there is a RESET? If so that would not be surprising. Cut that trace and run it directly to the H-bridge.
The processor should have its 100nF by-pass cap very close to its Vdd/Vss pins. I don't see this. You can solder a leaded cap directly to the processor pins on the bottom of the PCB.Exactly what motors do you have? Low cost motors can have big differences from one to the next.Small value caps on the motor terminals is a good idea as corrado suggests.
I'd say something's weird. Maybe there is something wrong with your board? A shorted trace? Maybe the chip is bad? I just can't think of any other reason that one channel would work while the other wouldn't. EDIT: Maybe the motor is affecting extremely noisy and shutting the regulator or MCU down. (I'm just throwing thing out here with no evidence whatsoever. I tried following the board traces around, but it's... too much of a pain. )One thing I do know is... shouldn't you have small capacitors across the leads of the motors as close as possible to them?
QuoteFor starters, change the cap immediately right of the regulator with an electrolyte of around 22µF and add a 100nF cap over the controllers supply lines - right at the pins, on the solder side.I redesigned the board a bit, changing the said diodes, and replacing the first cap you wrote, but I don't which other cap you mean. I see that all supply lines are fitted with 100nF caps.
QuoteToo bad you got the PCB made without asking about it, as there are numerous issues with this layout.Well done is done, so let's try and compensate by patching the board.I'd rather redesign the board. I can afford one more pcb prototype:) Would you advise to route manually?
One thing you should try, if you haven't already... Swap the motors around - does the problem follow the motor or stay at the same output?The answer to that may contain a lot of the key.
Quote from: Soeren on August 03, 2011, 10:40:15 PMOne thing you should try, if you haven't already... Swap the motors around - does the problem follow the motor or stay at the same output?The answer to that may contain a lot of the key.Nope, that doesn't change anything. Maybe the mess in the routed traces is responsible for the problem..
Anyways - thanks, I look forward to reading some more suggestions. In the meantime I'll try to route manually. Have a nice trip, thanks!