[SOLVED]My circuit fried my Arduino. I can't point out the mistake myself...

Hello Forum

Right now, I am in a lot of trouble. I've made the following diagrams (in Eagle) and before routing them in Eagle, I've tested everything on breadboard EXCEPT I didn't add the eight diodes to the output lines of the L298, as this was a request from my electronics teacher after I pulled the breadboard apart. The fact is, that everything was working and playing nice without the eight diodes when setting it all up on breadboard.

Here is my Eagle schematics for you to see: (would you prefer another link, than my Dropbox?) https://www.dropbox.com/sh/ytt9y21tavdpgsp/i_TjfbBq2J

I have connected everything on the pcb I produced in Eagle, and checking every connection twice against my Eagle schematic, all connections seems fine (equal to my schematic). But here comes my real problem. When supplying 12v for the L298 through the connector named "12v" I can measure about 11.5v in the connector called "GND_5V" - which is the connector providing a common ground and 5v for my two buttons and the hall sensor.

I really don't understand why I am able to measure 11.5v in the connector going to the Arduinos 5v and gnd? - those 11.5v obviously killed my Arduino... If I leave my unipolar 6 leaded stepper unconnected from the "STEPPER"-molex, I can't measure any voltage traveling from the 12v line to the Arduino's 5v line, but when I connect the stepper (I have checked that it is wired up correctly) I can measure the 12v traveling into the 5v line, which has, as i said, killed my Arduino.

My own guess is that it has something to do with the eight diodes, as everything worked great without them when trying everything on my breadboard. But I really don't know if the diodes is my real problem.

Can someone please help me point out, what the failure(s) in my schematic are? as I can't figure them out myself. That would be wonderful, if you need any more details please ask for them :-)

Thank you best regards Johannes T. Nielsen

You've likely fried something in the L298 that is allowing 12V through to the 5V supply.

Never NEVER leave those diodes out. Why would your electronics teacher ask for you to leave them out? One pulse is all it takes to fry a circuit. Are you sure that is what he said?

Your schematic has the freewheel diodes connected to GND and +5V - they absolutely must be connected to GND and 12V, the motor supply, otherwise you pipe 12V straight into the 5V supply. This is why it burnt out everything.

When commissioning a new board be paranoid and check all the supply voltages before connecting everything together, here this would have saved you a nasty surprise. If you have access to a bench power supply you can both limit the current and wind the voltage up slowly to check nothing is taking too much current or getting too high a voltage - well worth doing.

BTW all the high current paths need to be short, wide traces (they are carrying amps, not milliamps...) they also should have as little loop area as possible otherwise you'll generate a lot more noise/interference on nearby signals.

Doh! MarkT caught it. I missed that the diodes were connected to the wrong supply.

To Polymorph: I think I didn't express me clear enough, sorry. He told me to add them in my schematic after I tested everything on breadboard with success, without using them. When he told me to add them in, I had already pulled all the connections from the breadboard and I didn't want to set everything up again just to test it out with the diodes (which I can see now, I should have done...), instead I just added them to my schematic. He told me to just connect them to ground and +5v, therefore I did so in my schematics, and therefore I couldn't locate the mistake myself, as I thought he was right about what he was telling me to do.

To MarkT Thank you very much for your clear and helpful answer! I'll try to edit my schematic and upload them again, for someone to confirm my errors are corrected. Thank you for all your tips, I'll remember them. This is my first Eagle schematic, so bear with me, if anything looks a little weird.

I'll upload my new schematics soon, thank you.

As far as I can see, everything should be fine now? :-) https://www.dropbox.com/sh/9dexkb3cf837jnc/P57eUyIscg

Hi, just looking at your PCB pattern, it might be wise to widen the track width on the supply and output tracks to the stepper from the L298, you have sufficient room.
Add some bypass and filter capacitors to help with regulation and any noise from the stepper.
I also noted the silkpattern gnd and +5 does not match the bottom layer text - 5V +.
I don’t know if this is your first PCB but its usable, some more use of the top copper layer could have helped your layout.
A good way to learn and good to see you have got this far before requesting help, well done.
Good to see you have room for a heatsink on the L298 if its needed.

Good project…Tom… :slight_smile:

Hello TomGeorge Thank you very much for looking at my schematics, I'll add some of the things you describe. It is indeed my first PCB designed in Eagle by myself. Previously I used to design schematics in Fritzing and solder them on.. hmm.. what is it called, you know the pcb with small holes in it, soldering every connection manually.

Thank you Best regards Johannes T. Nielsen

No worries Johannes, good start, even though you can tighten up the layout, don't, your effort at the moment is good and the way it is, tracing your tracks will be easy are learning. Veroboard is what we call it here, good stuff but PCB is nicer.

Tom... :)

Veroboard, never heard that name before. You learn something new every day, isn't that what they say ;-) - Now I know the right name of this.

Thank you very much to all of you for helping me out on this one, I'll write you back when I know if my changes are working

best regards Johannes T. Nielsen

Definitely worth improving the layout a bit - widen all high current tracks - definitely, add decoupling to the motor supply (470uF electrolytic perhaps), and 100nF ceramic cap on the +5V pin of the L298 to ground (always required for every logic chip, never skimp on them). Make a ground plane.

I'd also move the motor and power connectors much closer to the L298 and have the diodes clustered there too - short traces for high current, no big loops - you don't want to be making a radio transmitter!

We call "perfboard", as in perforated board, here. If I can speak for an entire country. ;')

I'm kind of surprised that your circuit worked without those diodes on the breadboard. Maybe you never powered down the stepper, so there was always two transistors on in an H bridge.

UPDATE I've now connected the diodes to 12v+ instead of 5v+, now everything runs smooth without anything smoking ;-) - luckily the H-bridge didn't die the same way as the Arduino... I changed the chip on the Arduino, and it is working again, thank god...

To MarkT Am I understanding you right about this: It would be a good idea to add a 100nf cap. between the 5v+ pin on the H-btidge and the common ground? - If I understand you right, I think I already did make a groundplane, just not on the schematic uploaded here, I used the polygon tool in eagle to mark my board, changed some numbers under "isolate" (I think it was called isolate, found it under properties for the polygon) and then clicked the ratsnet-button - isn't that how a groundplane could be created, or am I talking of something else?

To PolyMorph Actually I knew about the word perfboard, I just forgot that this was the word for it too ;-) - As I said, my circuit was working great without the diodes connected. I had indeed powered the stepper down multiple times when testing, and it was always functioning the right way even thought ... :-)

Usually for a ground plane, you’d draw a polygon, right click on it and Name it Gnd. Then Ratsnest to fill it in and complete the Gnd connections.
I draw them (top & bottom layer) just outside of the dimension lines so you can rip them up & see traces better. You can see the blue & red dotted lines here.
The Unrouted lines are pads that will connect to the ground plane when Ratsnest is clicked.

To CrossRoads I think I understand what you mean. Instead of making a wire which connect all the grounds together, you are creating a "ground layer" which connect all the grounds, right? :-)

Exactly. Most boards are double sided, put a layer on both sides. Scatter some vias also Named GND to make sure they are well connected.

I see, thank you very much.
I really appreciate all the answers I’ve got, you’re the best guys :wink: