Is this the reason for burning my h-bridge? - Page 1
Forum section: electronics / beginners

author: markusmaker
author_rank: Contributor
timestamp: April 18, 2017, 08:13:34 am
content: 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.

author: lapm
author_rank: Frequent Contributor
timestamp: April 18, 2017, 08:17:52 am
content: 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...

author: RoGeorge
author_rank: Super Contributor
timestamp: April 18, 2017, 08:21:19 am
content: 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.

author: rs20
author_rank: Super Contributor
timestamp: April 18, 2017, 08:25:56 am
content: 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 someveryspecial oscilloscopes, or in the case that you're using isolated/differential probes.

author: Seekonk
author_rank: Super Contributor
timestamp: April 18, 2017, 08:39:29 am
content: As far as the lockup, always put a large cap like 2200uF at the motor boards power terminals to handle current surges.

author: markusmaker
author_rank: Contributor
timestamp: April 18, 2017, 08:59:25 am
content: 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?

author: markusmaker
author_rank: Contributor
timestamp: April 18, 2017, 09:03:19 am
content: 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).

author: rs20
author_rank: Super Contributor
timestamp: April 18, 2017, 12:20:49 pm
content: Quote from: markusmaker on April 18, 2017, 08:59:25 amSaying 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:Bangwith 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 onanyUSB powered device, even when not connecting to mains:Bangwith either mains-powered or battery-powered oscilloscope.

author: markusmaker
author_rank: Contributor
timestamp: April 18, 2017, 05:59:22 pm
content: 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.

author: markusmaker
author_rank: Contributor
timestamp: April 19, 2017, 06:37:01 am
content: @Rorence I am open to every advice.

author: markusmaker
author_rank: Contributor
timestamp: April 19, 2017, 01:38:36 pm
content: 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?

author: nuno
author_rank: Frequent Contributor
timestamp: April 19, 2017, 03:41:15 pm
content: 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.