Shunt Current Sensing / Common Modes / DC Motor Drive

Thread Starter

manofsteel520

Joined Oct 6, 2019
2
Hello world! First post here. I’m looking for feedback/advice on a motor controller / current sensing system. I'd like to replace the existing fritzy controller, which opens six skylights via ~30V geared DC motors. I’d like to control mine with an Arduino (maybe someday it’ll be based on time of day, rain, etc). I’m hoping to fit this in the original 2-gang electrical box, so ideally the circuit is simple and small. I’m planning to design my first PCB (through-hole) to keep it compact. For motor drivers, I chose SN754410 half bridge drivers and they’re working well. The trick is current sensing, used at the limits of travel.

The existing system seems to operate the motors until they begin to stall, and release them a couple seconds later. I figure this is to tighten the skylights against the seal, and I should maintain this approach. Isolated current sensors seemed expensive (especially since I need six) so I plan to use 1-Ohm 1/4-W shunt resistors and measure the voltage drop with analog inputs on the Arduino. Continuous currents are ~0.2A and stall current is 1-2A.

Now, the issue: Arduino inputs are only 0-5V. If I put the shunt resistor on the high side, I’ll destroy the input channel with 30V common mode vs ground. I tried putting it on the low side and seem to have damaged the half bridge. On that chip, 5V logic and 30V supply share a ground but have separate VCCs. I imagine it really wanted its GND grounded (not ~0.2-2V above) and so a high side shunt was better.

Then, I have to remove 30V of common-mode voltage to feed the Arduino only the differential voltage across the shunt. While I’d rather not use more chips than necessary, this seems to be a good job for a difference amplifier. Since the Arduino input is relative to ground (and to avoid having a negative supply rail), it's probably best to use a single-supply amp. I’m planning to buy some but thought I’d stop to ask if there isn’t a simpler way.

Ideas for feedback:

Is there anything more clever I could do with my power rails? I’m assuming Arduino ground and motor ground should be tied together, so I’d have a 30V supply and a 5V regulator. Is there some way to avoid the common mode? Keep the shunt on the low side but use a smaller resistor to not upset the half bridge, and amplify the signal?

Should I forget that half bridge chip and go with four relays to make an H-bridge? Then the shunt could be on the low side. Or, do some (reasonably priced) motor drivers have integrated current sensing?

Are there better alternatives to measuring 0.2-2A than a shunt resistor?

Thanks very much for your help!

Circuit for Forum Post.PNG
 

Picbuster

Joined Dec 2, 2013
1,047
Use a shunt in the motor gnd feed ( 10-20mlli Ohm) use an opamp en put the output into your mpu.
( the input of your opamp will face 0,02 x 2A = 0,04V max amplify 50 X gives you 2V radiometric to current)

Picbuster
 

Thread Starter

manofsteel520

Joined Oct 6, 2019
2
Thank you for the replies! Ok, fair, a small value resistor is entirely sensible, and having it on the ground side will avoid the common mode voltage issue. I ordered some 10mOhm and will amplify the signal.

Could you spare another moment to comment on the choice of op-amp for this? Given that the Arduino doesn't want to see any voltage below ground and I hadn't planned on establishing any negative voltage, I figured a single-supply / rail-to-rail op-amp would be best - I ordered some LMC6484. It still has a small amount of clipping, which is fine for this project, but I was curious how experienced people handle this. Perhaps an "ordinary" amp and a negative voltage rail? (I'm not too familiar with the latter.) There's also probably some clever way to guarantee that the output voltage never drops below zero.

@Sensacell, those hall-effect sensors seem nice. Unfortunately, I'm going to keep this project through-hole. It seems that similar sensors start around $15 for the 5A range, and given that I need six it would get a bit pricey.

Thanks again!
 
Top