Circuit #4 : Isolated Current Measurement
Sometimes you need to measure large currents in a current path that must be isolated from the microcontroller. A Hall-effect sensing element such as the Allegro ACS712 is a perfect solution to this problem, as shown in this circuit.
The high current path is galvanically isolated within the ACS712 thus does not share a common ground reference. This isolation means that you can put the current sensor anywhere in the current path: at the high side, low side, or somewhere in the middle.
The output voltage is 2.5V when no current is flowing, higher when current flows from the IN+ to the IN- terminal, and lower than 2.5V when current flows the other way. The ACS712-30 device is designed to measure currents up to 30A. For every 1A change in current, the output voltage changes by 66mV (the sensitivity). Other varieties of the ACS712 are designed to measure different current ranges and have different sensitivities. The output voltage will never go above 5V or below 0V.