Current Measurement / DC Motor Drive

Submitted by Nick M on

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?

Circuit for Forum Post.PNG

Hi Nick, You have done a great job sorting out things but a shunt method approch for 2A current rating is not recommended. Normally when trying to measure the current of motors shunt is not prefereed because of the peak current that motor consumes, in your case since it is a DC motor this current will vary based on the load. The other reason is 200mA to 2A is a big variation voltage drop across the shunt resistor will not be linear for this entire region and you might get poor results. Also the resistors tend to age fast because of this huge current and your values will vary based on aging and external temperature. 

Have you considered the ACS712 option? 

  Joined August 11, 2018      35
Saturday at 01:52 PM