This is the Allegros ±25A, ±31A, ±12A, ±15A ACS711 Hall effect-based linear current sensor an integrated overcurrent fault output, which provides you a low-resistance ~ 1.2mΩ current route including electrical isolation reach to 100 volts. This model receives a bidirectional current input up to 25A and the output of a proportional analog voltage at VCC/2 with a typical error of ±5 percent. The ACS711 operates at 3V ~ 5.5V suitable for 3.3v and 5V system purposes. This Allegro’s ACS711 Hall effect-based linear current sensor Series has integrated fault output; therefore be advised that you need to read carefully the ACS711 datasheets.
There are many uses for the current sensors, for example, some devices are used for power metering, control system diagnostics, current measurement, control some complex loads from electric motors, use for battery charge integration, battery charge monitoring, battery charge condition, commercial appliances, automotive, voltage safety cut-out devices, surge trip protection, high voltage current readings, and many more.
The key features of ACS711 are designed for bidirectional input current from -25A ~ 25A / -12A ~ 12A / -15A ~ 15A / -31A ~ 31A these sensors can survive up to 5 times the overcurrent conditions with the use of a Hall-effect sensor which means that the CHIP can electrically isolate the current path from the sensor for 100V usage which allows the sensor to placed anywhere along the current path and to be used in applications that need electrical isolation. in addition, the ACS711 series has a 100kHz bandwidth with excellent accuracy and reliability the output voltage is extremely stable, particularly since the sensor has zero magnetic hystereses and the overcurrent FAULT output latches LOW when current exceeds negative/positive 25A and operates at a temperature range of -40°C to 125°C. in addition, the schematics below include 4 ACS711 series with 2 LC & EX packages, The first schematic use ACS711ELCTR – 12A / ACS711ELCTR – 25A and the next one is ACS711EEXLT – 15A / ACS11EXLT – 31A depends on your suitable applications. for more technical readings please follow the datasheet below.
Requirements
- Arduino IDE | PlatformIO
- Test Boards :
- Note: The Diagram below is using ESP32 (please refer to your MCU’s respective pin-outs & bus configuration)
- Resistors (See below diagram for required value & alternatives package)
- Capacitor(See below diagram for required value & alternatives package)
1. Wiring Diagram / Schematics for ACS711ELCTR – 12A / ACS711ELCTR – 25A
2. Wiring Diagram / Schematics for ACS711EEXLT – 15A / ACS11EXLT – 31A
Source Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
#include "esp_adc_cal.h" //You can download this library below. const int ADCpin = 34; //The GPIO Pin 34 (GPIO34-Analog ADC1_CH6) connected to ACS711 VIOUT double voltage = 0; //Set as a variable for storing the values double voltageRef = 0; //Set as a variable for storing the values void setup() { Serial.begin(115200); Serial.print("14CORE ACS711 - Hall Effect Linear Current Sensor Test Code "); delay(2000); Serial.println("Initializing..............................................."); delay(2000)) voltageRef = avgVal(ADCpin, 50, 5); //Set as a reference voltage without load. } void loop() { voltage = avgVal(ADCpin, 50, 1); //Set to read a voltage values from VIOUT Serial.print("Voltage: "); Serial.print((int)voltage); Serial.println(" mV"); Serial.print("Current: "); Serial.print(((voltage - voltageRef)/45)); Serial.println(" A"); //Serial.println(((voltage - voltageRef)/45)); // Uncomment to used for graph/plotter in Arduino delay(1000); } double avgVal(int pin, int filterLen, int delayMs) //Averaging function for reading values to eliminate ADC noise of ESP-dev-Board { int value = 0; double voltage; for(int i=0; i < filterLen; i++) { value += analogRead(pin); delay(delayMs); } voltage= readADC_Cal(value/filterLen); return voltage; } uint32_t readADC_Cal(int ADC_Raw) //Set an ADC calibration then convert to a value { esp_adc_cal_characteristics_t adc_chars; esp_adc_cal_value_t val_type = esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, 1100, &adc_chars); return(esp_adc_cal_raw_to_voltage(ADC_Raw, &adc_chars)); } |
PCB Milling / Gerber File
- Download PCB Milling File | LC Package | EX Package
- Download Gerber Viewer | Windows | Linux