Monday 15 June 2015

microcontroller - How can I sense the motor's current?



I need to drive a DC motor @ 24V, 6A with a MOSFET. How can I sense the current that the motor is drawing with a microcontroller? I have to know when the motor is stalled.



Answer



You place a small sense resistor (typically < 100m\$\Omega\$ for the voltage and current involved) in series with the motor and measure the voltage drop. There are two methods: high-side and low-side, depending on the position of the sense resistor.


Low side is easiest, as the voltage drop you want to measure is directly related to ground, but it lifts the low side of the motor's voltage a few tens of millivolts above ground too, and not everybody likes that. If it's no more than these few tens of mV it shouldn't be a problem though, and you can use an opamp to amplify the voltage in a simple non-inverting amplifier configuration. A 10m\$\Omega\$ resistance will give you a 60mV drop, which is acceptable, and at the same time high enough to measure properly. You don't necessarily need a physical component for this; a 1cm PCB trace 0.5mm wide has a 10m\$\Omega\$ resistance.
Make sure to select an RRIO (Rail-to-Rail I/O) opamp.


For high-side measurement you have to use a difference amplifier to measure the voltage drop. There are special ICs for that, some of which have the shunt resistor integrated, for maximum accuracy.


enter image description here


But you can also construct your own difference amplifier with an opamp. If you just want to detect a stall you probably don't need the A/D converter but can use a simple comparator. Be sure to filter the measured voltage with a capacitor.


A (not very thorough) search turned up the SiLabs Si8540 high-side sensor, available from Mouser from USD 0.65 quantity one.


edit

The Zetex/Diodes ZXCT1009 is comparable, but only needs 3 pins of its SOT23 package.




Further reading:
Linear Technology Current Sense Circuit Collection (warning: heavy product plugging!)
Collection of documents on current-sense amplifiers by Maxim


No comments:

Post a Comment

arduino - Can I use TI&#39;s cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...