rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

A+ killed by a L298N

Wed Feb 11, 2015 5:41 pm

Hi all,

I killed my Pi A+...and I cannot understand why. Please, see picture attached.
I have been testing the motors with the L298N and my A+. Everything seemed fine until....the A+ suddenly passed away.

A+ autopsy:
-No burnt smell.
-Doesn't boot at all. No lights at all.
-It gets very very hot, the CPU becomes extremely hot when the USB is plugged.

I really appreciate your feedback!!!
Thanks!
Attachments
4.jpg
Pi_L298N
4.jpg (60.26 KiB) Viewed 2933 times

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 5:53 pm

Odd that it didn't fail immediately. Did you have any software (your motor drive program) running at the time it died?

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 5:57 pm

Ravenous wrote:Odd that it didn't fail immediately. Did you have any software (your motor drive program) running at the time it died?
HI Ravenous,

Thanks for the reply. I cannot upload a better picture and I know it is hard to see the details.
Yes, actually I was testing turning motors on/off with a simple Java program. Only that!!
Please, is that important?

User avatar
joan
Posts: 14257
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 6:00 pm

I can't see anything obviously wrong. Were you using pins 11, 13, 15, 16 for the gpios (gpios 17, 27, 22, 23)?

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 6:03 pm

Well if you had made a silly wiring error, I would have expected it to fail immediately.

Check your wires which you screwed to the board, to make sure there isn't a long, very fine strand of wire somewhere causing a short. (Possible.)

Other than that, I can't think what caused it to run for a while, then fail...

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 6:06 pm

Hi,

Please, see below:

GDIO 0 (pin 11)
GDIO 2 (pin 13)
GDIO 3 (pin 15)
GDIO 4 (pin 16)

and ....
GROUND (pin6) to the L298H bridge (GROUND)

I was thinking...
if the motor suddenly stalls, can this burn the Pi?
Thinking the pi might have received a sudden high current in the GDIOs. That makes sense?

User avatar
joan
Posts: 14257
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 6:41 pm

rocinante wrote:Hi,

Please, see below:

GDIO 0 (pin 11)
GDIO 2 (pin 13)
GDIO 3 (pin 15)
GDIO 4 (pin 16)

and ....
GROUND (pin6) to the L298H bridge (GROUND)

I was thinking...
if the motor suddenly stalls, can this burn the Pi?
Thinking the pi might have received a sudden high current in the GDIOs. That makes sense?
Not really, at least not if the wiring is as indicated on your diagram. I take it the gpio numbers you use have something to do with your Java library. See http://elinux.org/RPi_Low-level_periphe ... .28GPIO.29 for the Broadcom numbers.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 7:29 pm

Actually, check this out: http://pi4j.com/pins/model-b-plus.html

I can only figure out that...a red wire touched a black wire at a certain moment.
That simple thing costed me $24 :-( . Happy I was doing this with a cheap a+

Thanks a lot for your replies!

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 8:22 pm

I've had a pi connected to a L298N in that exact fashion for a long time and not had any issue, could there have been an accidental short somewhere else?
Doug.
Building Management Systems Engineer.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 9:09 pm

BMS Doug wrote:I've had a pi connected to a L298N in that exact fashion for a long time and not had any issue, could there have been an accidental short somewhere else?
Hey thanks for your answer.

Dump questions:
1. I have 3v motors but from the L298N supplies 6V to the motors. I know this is not the most suitable scenario and in the future the motor will stop working. That's fine with me.
In theory, the raspberry doesn't care about that....I guess, right?I am thinking that somehow too much current might have gone back to the raspberry through the GDIO and killed it.

2: A mobile power battery can kill a raspberry? I believe a battery cannot send enough current to the raspberry to fry it but who knows!? By the way, I use a Duracell.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 9:23 pm

There shouldn't be any danger to the pi from overvolting the motors.

What voltage was the battery that you connected to the Pi?

How did you connect it?
Doug.
Building Management Systems Engineer.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 9:27 pm

BMS Doug wrote:There shouldn't be any danger to the pi from overvolting the motors.

What voltage was the battery that you connected to the Pi?

How did you connect it?
It is a typical USB 5V 2A 4400mAH mobile battery power. I use the standard USB cable from the battery into the microUSB plug in the raspberry

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: A+ killed by a L298N

Wed Feb 11, 2015 9:32 pm

rocinante wrote:
BMS Doug wrote:There shouldn't be any danger to the pi from overvolting the motors.

What voltage was the battery that you connected to the Pi?

How did you connect it?
It is a typical USB 5V 2A 4400mAH mobile battery power. I use the standard USB cable from the battery into the microUSB plug in the raspberry
That's whatI thought from your picture, there should be no danger to your pi from that. I've been connecting pi's to a similar battery on a almost daily basis.
Doug.
Building Management Systems Engineer.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Wed Feb 11, 2015 9:42 pm

Thank you for your great help.

I really believe my raspberry had a short circuit for less than a second and that fully fried the board.
I will make preparations for my A+ funeral. Although the raspberry is dead, still getting very hot when plugged. It might be half-dead.

Thanks again!

User avatar
Douglas6
Posts: 4759
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: A+ killed by a L298N

Wed Feb 11, 2015 10:49 pm

Pis are like batteries. They're either working or they're dead. Poor little guys.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Thu Feb 12, 2015 6:11 am

After your help guys, I decided to buy a new A+ and take the risk again.
Everything works great with same diagram.

I certainly believe one the wires slightly touch "wrong place" when the robot was moving.

Thanks again!

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: A+ killed by a L298N

Thu Feb 12, 2015 8:59 am

If you suspect a short circuit could have occurred somewhere, that is probably the cause. Accidentally getting 6V onto one of the GPIO pins might have killed it. (I got a higher voltage onto a GPIO pin, because the circuit board wasn't held down properly and slid towards the power supply. Instant death!)

If you still have the dead board, keep it - the dead board makes a useful drilling template and size guide when making cases, without having to interfere with a good board. Just put a label on it so you know which one is dead!

You mentioned the 6V battery and 3V motor - this may not be so bad, because I think the L298 drops around 1.5 or 2V in the motor circuit. So your motor isn't gettng the fll 6V anyway.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Thu Feb 12, 2015 6:20 pm

Ravenous wrote:If you suspect a short circuit could have occurred somewhere, that is probably the cause. Accidentally getting 6V onto one of the GPIO pins might have killed it. (I got a higher voltage onto a GPIO pin, because the circuit board wasn't held down properly and slid towards the power supply. Instant death!)

If you still have the dead board, keep it - the dead board makes a useful drilling template and size guide when making cases, without having to interfere with a good board. Just put a label on it so you know which one is dead!

You mentioned the 6V battery and 3V motor - this may not be so bad, because I think the L298 drops around 1.5 or 2V in the motor circuit. So your motor isn't gettng the fll 6V anyway.
Exactly. That is exactly what I suspect. The Pi went dead in less than 1 millisecond because somehow the red power supply wire from the 9V batteries slightly touched the GND wire in the L298N. Notice how close the connectors are in the L298N! Nasty.

Regarding the motors, for sure they are getting more than 3V. They are running very fast.
Anyway, they are a cheap component.

Thanks for your answer!

User avatar
joan
Posts: 14257
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: A+ killed by a L298N

Thu Feb 12, 2015 6:27 pm

rocinante wrote: ...
Regarding the motors, for sure they are getting more than 3V. They are running very fast.
Anyway, they are a cheap component.
...
If you use PWM on the gpios you can effectively limit the voltage seen by the motor (and control the motor speed). 100% will give 9V, 50% will give 4.5V, 33% will give 3V etc.

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Fri Feb 13, 2015 4:33 pm

joan wrote:
rocinante wrote: ...
Regarding the motors, for sure they are getting more than 3V. They are running very fast.
Anyway, they are a cheap component.
...
If you use PWM on the gpios you can effectively limit the voltage seen by the motor (and control the motor speed). 100% will give 9V, 50% will give 4.5V, 33% will give 3V etc.
Actually, I have the ENA and ENB jumped and my robot tank doesn't even have power to change direction. It can only goes straight or reverse. Certainly, this L298N is dropping a lot of power....believing this bridge is not the most suitable for robots with small motors.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: A+ killed by a L298N

Fri Feb 13, 2015 4:51 pm

rocinante wrote:Actually, I have the ENA and ENB jumped and my robot tank doesn't even have power to change direction. It can only goes straight or reverse.
With tank tracks, they sometimes "dig" into a carpeted surface and you need a lot of torque to turn. Two wheels is far better sometimes!

As you say it might be voltage drop across the 298 driver itself, or the motors aren't big enough, or simply too much weight... :?

Have you tried the chassis without the motor driver - simply hard-wire the motors to 3V worth of batteries, forward for one and reverse for the other? If it struggles to turn then, you know the chassis is the problem...

User avatar
joan
Posts: 14257
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: A+ killed by a L298N

Fri Feb 13, 2015 4:55 pm

rocinante wrote: ...
Actually, I have the ENA and ENB jumped and my robot tank doesn't even have power to change direction. It can only goes straight or reverse. Certainly, this L298N is dropping a lot of power....believing this bridge is not the most suitable for robots with small motors.
A 9V supply is plenty. I've used 5V (from Pi) without problems. The L298N does not drop that much.

You don't have to use ENA/ENB for PWM motor speed control. You can apply PWM to the gpios connected to IN1/2/3/4.

plugwash
Forum Moderator
Forum Moderator
Posts: 3454
Joined: Wed Dec 28, 2011 11:45 pm

Re: A+ killed by a L298N

Fri Feb 13, 2015 5:07 pm

Another thing I notice about your board is that there is only one ground terminal and you seem to show a tee in the wiring between driver board, pi and battery.

if the ground to the motor drive board came disconnected while the ground from battery to pi remained connected bad things could easilly happen.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: A+ killed by a L298N

Fri Feb 13, 2015 5:12 pm

Oh, also as Joan says, more voltage on the battery will help turning too.

I've never used the L298, only the much smaller L293D (though with both sides wired in parallel), and they are enough for quite a heavy robot at 12V! I really think your L298 is good enough.

Also - your diagram shows 6 alkaline AA cells. Note that alkalines can have problems supplying high current, which tank tracks will need when turning. When I did some experiments with a 4 wheel drive robot, I measured current draw when turning, and it was probably 2x or 3x the straight-line current. With a tank track it will probably be the same ratio, if not worse...

So, try more batteries, or higher-current batteries?

rocinante
Posts: 20
Joined: Wed Feb 11, 2015 5:25 pm

Re: A+ killed by a L298N

Fri Feb 13, 2015 5:27 pm

plugwash wrote:Another thing I notice about your board is that there is only one ground terminal and you seem to show a tee in the wiring between driver board, pi and battery.

if the ground to the motor drive board came disconnected while the ground from battery to pi remained connected bad things could easilly happen.
Very true. I didn't even think about that possibility. If a wire gets disconnected, the consequences might be very painful. Actually, I am making sure now all wires keeps in the proper place at ALL times.

Return to “Troubleshooting”