Sensing Motor current

Hello, I want to read a bidirectional motor current in a H-bridge configuration from let's say -8A to 8A. But the motor normally rotates at 0.2A with no load, so it should be sensible enough to also read such small value.

The only way I found was this way:

I,ve seen Rsense on the ground but it wont measure current when the motor is stopping, because all mosfets would be off and no current flowing to the ground, only around a closed loop between the mosfets and diodes in brake mode..

I want to use max9918 like on the picture it seems a great idea and I would be able to measure on current both ways. The problem is that I cannot find it in any physical store in my country.

Do any of you know other well known chips that can do the same thing ? Probably I could find thise here.

Thanks in advance, Marcos Moura.

The problem is that I cannot find it in any physical store in my country.

Which is ?

Hi. If you measure in GND or 12 volts, you won't get negative values. A negative voltage can't be processed by your Arduino so you'd have to convert it in some way. But you probably need an amplifier anyway for this.

What currents do you expect to measure when all mosfets are off ?

By the way, a motor stopping is not the same as a stopped motor, and both don't necessarily mean all mosfets are off.

It is the max9918 like on the picture,

The motor works at 0.2A no load and can go as high as 10A If stalled.

If the shunt resistor is 1ohm lets say I would get values from -10v to 10v

What I want is something that can convert me this diferential voltage on the shunt resistor to lets say 0-5V So 0V output will be -10A at the motor and 5v output would be 10A at the motor.

Lets say the motor is rotating onde direction, and then I turn both lowside mosfets on. The motor will fast stop and have a high current which I want to measure.

If the shunt is at the ground it will only measure when I am powering the motor but I need the current at all times ;D thats why the R shunt would need to be inside the bidge.

marcosmoura: It is the max9918 like on the picture,

The motor works at 0.2A no load and can go as high as 10A If stalled.

A hall effect current sensor like the ACS711 or ACS712 will do this job too, choose the 5A bidirectional rated one. Hall current sensor outputs are fully isolated from the current carrying path. They have a lot of noise though.

With a shunt make sure the maximum voltage across the shunt is something like 0.1V or so, definitely not 5V or it'll act more as a room heater than a shunt. At 10A a 10 milliohm shunt will give 0.1V and dissipate 1W.

You might look at using a ZXCT1009 chip.

http://diodes.com/datasheets/ZXCT1009.pdf

I,ve seen Rsense on the ground but it wont measure current when the motor is stopping, because all mosfets would be off.

If all MOSFETS are off, no current will flow either. You are trying to measure the generator effect of the motor but no current will flow unless you turn either the top pair or bottom pair on.

DigiKey.com has 382 in stock at $1.53 each.

rmetzner49: If all MOSFETS are off, no current will flow either. You are trying to measure the generator effect of the motor but no current will flow unless you turn either the top pair or bottom pair on.

DigiKey.com has 382 in stock at $1.53 each.

Then what happens to the current inside the motor windings? The MOSFETs have an internal diode só the reverse current flows Jack into the source, as the back EMF spike is greater than the voltagem source.

Digikey charges me 18€ just for shipping it is crazy expensive

rmetzner49:
If all MOSFETS are off, no current will flow either.

Not true, the body diodes will conduct whenever the motor is spinning fast enough
for the back-EMF to exceed the current supply voltage.

I will have to find a shop online with lower shipping prices, or maybe I could order some samples, as I am a student in the university.

I've read after some research that to measure the current like I want to and at the same time use pwm to control the motor can be a little tricky.

I will try something with some opamps I got and see if I can get something working.

Not true, the body diodes will conduct whenever the motor is spinning fast enough for the back-EMF to exceed the current supply voltage.

What can I say, it was getting late. :)

You could try to put the Amp sense in the Power [u]Supply[/u] to the H-bridge,

http://www.ebay.com/itm/DIY-5A-Range-AC-Current-transformer-module-Current-sensor-module-for-arduino-NEW-/171447596465?pt=LH_DefaultDomain_0&hash=item27eb12b5b1

I am just beginning with Arduino, so I couldn't possibly tell you any code or script

That was suggested before, but he for some reason also wants to measure brake current. I'm not sure how well that would go, but you can't do that by measuring in the power supply.

I still couldn't find the appropriated device for this.

I'm now looking into hall-effect current sensors from -10 to 10A what are your thoughts about them? woud they be accurate for 100mA? it is the minimum acuraccy and needs to be bidirectional.

Datasheets tell you the linearity and accuracy and noise levels...