Author Topic: Is this the reason for burning my h-bridge?  (Read 5048 times)

0 Members and 1 Guest are viewing this topic.

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Is this the reason for burning my h-bridge?
« on: April 18, 2017, 08:13:34 am »
Hi there,

I build a litte "robot" car (https://digistump.com/wiki/digispark/tutorials/robot) which uses two L9110S (https://www.bananarobotics.com/shop/HG7881-(L9110)-Dual-Channel-Motor-Driver-Module) to drive the two motors. I use a Digistump Oak and using a RF24L01 module for RC. (The RC control is also an Oak with a RF24L01 module). The RC worked fine all the time when the motor controller was not connected. If the motor was connected sometime the Oak just locked up as if it has been reset and needed a power cycle to work again.

So here is a little schematic of the whole scene:


To understand if driving the motors lead to a under-voltage on the Oak (3,3V needed) which could probably cause this reset/hang, I took a oscilloscope to measure battery voltage (should be 4,8V) , Oaks VCC (should be 3,3V) and the motor voltage. Now what happened that the M2 L9110S was going up in smoke.

So as you see my setup, did I shorten the L9110 with the CH1/CH2 and CH3 ground ? As CH3 ground depends on the motors direction if it is ground? So would it be working to take CH3 ground on the battery ground to get the motor voltage?

Thanks.
 

Offline lapm

  • Frequent Contributor
  • **
  • Posts: 564
  • Country: fi
Re: Is this the reason for burning my h-bridge?
« Reply #1 on: April 18, 2017, 08:17:52 am »
Based on that picture looks like your grounding right motors one coil side throw oscilloscope to power ground... If your driver chip try's to drive that connection to high -  high current will flow - and high power is dissipated... :-BROKE
Electronics, Linux, Programming, Science... im interested all of it...
 
The following users thanked this post: markusmaker

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6784
  • Country: ro
Re: Is this the reason for burning my h-bridge?
« Reply #2 on: April 18, 2017, 08:21:19 am »
A good practice is to have another battery just for the low power electronics. Otherwise, depending on your motors and wiring, power glitches coming from the brushed motors may reset the microcontroller.
 
The following users thanked this post: markusmaker

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2320
  • Country: au
Re: Is this the reason for burning my h-bridge?
« Reply #3 on: April 18, 2017, 08:25:56 am »
As lapm said but perhaps not 100% clearly, all grounds on an oscilloscope are connected*. You thus created a connection from the negative terminal of the battery, via CH1 ground to CH3 ground, to one of the terminals of the motor. This is an absolute 100% no-no, as if the L9110 tried to bring that terminal of the motor high, it's tied to ground and as such an enormous current will flow, destroying the L9110. Promising yourself that the code won't try to do that is just silly, you never want to put yourself in a situation where a programming error results in smoke.

Just use a multimeter to do your measurements, or if you must use an oscilloscope, connect all the grounds to the same point and use the math mode to subtract the two terminals of the motor.

BTW, thanks for drawing such a nice diagram. It's wonderful when a question-asker puts effort in!

* Except for some very special oscilloscopes, or in the case that you're using isolated/differential probes.



« Last Edit: April 18, 2017, 08:29:16 am by rs20 »
 
The following users thanked this post: markusmaker

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: Is this the reason for burning my h-bridge?
« Reply #4 on: April 18, 2017, 08:39:29 am »
As far as the lockup, always put a large cap like 2200uF at the motor boards power terminals to handle current surges.
 
The following users thanked this post: markusmaker

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Re: Is this the reason for burning my h-bridge?
« Reply #5 on: April 18, 2017, 08:59:25 am »
Hi RS20,

thanks! I came up with the idea of shorting with the different grounds after watching that video yesterday evening :-)

Another question regarding the oscilloscope, as the Migsic is battery powered it has no connection to mains ground and so is "safe" for checking USB connected devices?

 

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Re: Is this the reason for burning my h-bridge?
« Reply #6 on: April 18, 2017, 09:03:19 am »
Yes there was much noise and glitches on both battery and Vcc on turning on the motors. (I saw that because on first round I just did not measure the motor voltage).
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2320
  • Country: au
Re: Is this the reason for burning my h-bridge?
« Reply #7 on: April 18, 2017, 12:20:49 pm »
Another question regarding the oscilloscope, as the Migsic is battery powered it has no connection to mains ground and so is "safe" for checking USB connected devices?

Saying something is "safe" is far too vague.

Battery-powered oscilloscope: All probe grounds are connected to each other.
Mains-powered oscilloscope: All probe grounds are connected to each, and to mains earth.

What written above are the facts, it's up to you to figure out whether such connections could cause unintentional damage. For example;

Connecting one ground clip of probe to any node other than ground on a USB device powered via mains: Bang with mains-powered oscilloscope, OK (but a bad habit I suggest) with battery-powered, floating oscilloscope.

But, connecting ground clip of one probe to ground and ground clip of second probe to any node other than ground on any USB powered device, even when not connecting to mains: Bang with either mains-powered or battery-powered oscilloscope.
 

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Re: Is this the reason for burning my h-bridge?
« Reply #8 on: April 18, 2017, 05:59:22 pm »
OK thanks for clarification RS20 - so I am prepared now for the next setup. Luckily the oscilloscope did not take any damage, so 4$ for the motor driver was fortunately a cheap learning then.
 

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Re: Is this the reason for burning my h-bridge?
« Reply #9 on: April 19, 2017, 06:37:01 am »
@Rorence I am open to every advice.
 

Offline markusmakerTopic starter

  • Contributor
  • Posts: 11
  • Country: de
Re: Is this the reason for burning my h-bridge?
« Reply #10 on: April 19, 2017, 01:38:36 pm »
Here is a screen capture from the Micsig while watching the battery voltage. I stated where the motors are turned on/off and when the microcontroller locks up.



So by using a cap (2200uF) before the motor driver VIN I can get rid of the spikes?
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Is this the reason for burning my h-bridge?
« Reply #11 on: April 19, 2017, 03:41:15 pm »
There are other potential issues on both the "system" and on how you are measuring, but I usually find it to be a good solution to just insert a diode between the battery + and Oak's Vin (power to the bridges should come directly from the battery); if that's not enough, try adding a 47uF to 220uF cap after the diode, to GND.

update: You should probably add the cap to the driver's power input anyways, I don't see any "bulk" capacitor on the driver's photo (unless they're on the other side), which is actually kind of strange.
« Last Edit: April 19, 2017, 03:45:21 pm by nuno »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf