Allegro ACS 712 Current Sensor
Posted: Sun Dec 18, 2011 2:00 pm
Introduction.
The Allegro ACS 712 is a hall effect current transducer, which in the case of the version being used here can measure up to a maximum current of 5A.
The device used is the PPBOB-08882 supplied by Proto-Pic as a Break Out Board (BOB)
Equipment Needed.
EB-006 Multi-Programmer
EB-005 LCD Display
EB-016 Protoboard
16F877A Microcontroller
ACS712 Current Sensor
Digital Multimeter
Various Test Leads
Also a 1nF and a 0.1uF Capacitors are needed.
Calculations.
The ACS712 output has a very linear operation.
The min & max outputs are as follows
@ 0A output = 2.5V dc
@ 5A output = 4.5 dc
These are read by the ADC input on the PIC Microcontroller.
This gives a span of 2V
i.e for every volt output from the ACS712 = 2.5A input
Slope = FScale/Span
Slope = 5/2
Slope = 2.5
Offset = 2.5 * 2.5 = 6.25
Current = (Slope * Fscale) - Offset
Current = (2.5 * 4.5) - 6.25
Current = 5A
In practice it was found the displayed current value was half the true value.
This was compensated for my multiplying the final value by 2.
Error Detection.
The flowchart will detect if the ACS output goes
Below 2.5 V – Under Range
Above 4.5 V – Over Range.
In these cases the display clears and a warning is displayed.
Current Testing.
The test current was generated by a 6V battery pack and a 2.2R high power resistor.
This was connected in series to the ACS712 through a digital multimeter.
The theoretical current should have been 2.7A, according to ohms law, but the loading pulled the battery voltage down to about 3.3 V.
This gives a current of 1.5A, which is the approximate value that was displayed.
I think it would be fairly easy to modify this project to function as a multirange power meter.
Reading voltage using a 2nd ADC input and a potental divider chain for voltage scaling.
Other versions of the sensor are available that read upto 30A full scale.
Otherwise a current transformer could be used to step down to match this sensor.
Flowcode file below
The Allegro ACS 712 is a hall effect current transducer, which in the case of the version being used here can measure up to a maximum current of 5A.
The device used is the PPBOB-08882 supplied by Proto-Pic as a Break Out Board (BOB)
Equipment Needed.
EB-006 Multi-Programmer
EB-005 LCD Display
EB-016 Protoboard
16F877A Microcontroller
ACS712 Current Sensor
Digital Multimeter
Various Test Leads
Also a 1nF and a 0.1uF Capacitors are needed.
Calculations.
The ACS712 output has a very linear operation.
The min & max outputs are as follows
@ 0A output = 2.5V dc
@ 5A output = 4.5 dc
These are read by the ADC input on the PIC Microcontroller.
This gives a span of 2V
i.e for every volt output from the ACS712 = 2.5A input
Slope = FScale/Span
Slope = 5/2
Slope = 2.5
Offset = 2.5 * 2.5 = 6.25
Current = (Slope * Fscale) - Offset
Current = (2.5 * 4.5) - 6.25
Current = 5A
In practice it was found the displayed current value was half the true value.
This was compensated for my multiplying the final value by 2.
Error Detection.
The flowchart will detect if the ACS output goes
Below 2.5 V – Under Range
Above 4.5 V – Over Range.
In these cases the display clears and a warning is displayed.
Current Testing.
The test current was generated by a 6V battery pack and a 2.2R high power resistor.
This was connected in series to the ACS712 through a digital multimeter.
The theoretical current should have been 2.7A, according to ohms law, but the loading pulled the battery voltage down to about 3.3 V.
This gives a current of 1.5A, which is the approximate value that was displayed.
I think it would be fairly easy to modify this project to function as a multirange power meter.
Reading voltage using a 2nd ADC input and a potental divider chain for voltage scaling.
Other versions of the sensor are available that read upto 30A full scale.
Otherwise a current transformer could be used to step down to match this sensor.
Flowcode file below