• +965 51122049
Keyestudio ACS712-20A Current Sensor Module for Aduino

Keyestudio ACS712-20A Current Sensor Module for Aduino

KWD1.750KWD1.750
0%Off

Keyestudio ACS712-20A Current Sensor Module for Aduino


 
(Out of stock)

 


Share:

Introduction

ACS712-20A Current Sensor is used to measure the intensity of current. It contains ACS712ELC-20A chip, based on Hall Effect. You should protect it from influence of magnetic field when using it.
thumb
 

 

Parameters

  • Chip:ACS712ELC-20A
  • 5V Power Supply and Power Indicator On-board
  • This module can detect 20A positive and negative current,corresponding analog output at 100mV/A.
  • Output voltage is VCC/2 without current flowing.

 

Connection Diagram


thumb
 

 

Sample Code

#include   //invoking I2Clibraries coming with Arduino
#include 
LiquidCrystal_I2C lcd(0x27,16,2); 
int temp;
// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  lcd.init();
    delay(100);
    lcd.backlight();
    Wire.begin();  //initializing I2C
    lcd.clear(); //clear screen
    delay(100);
    lcd.setCursor(2,0);
    lcd.print("ACS712 TEST");
    delay(200);
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  float current = analogRead(A0);
  temp=current;
  temp=temp-512;
  current=temp/19.3;
  //lcd.clear(); //clear screen
  // print out the value you read:
  Serial.print("current=");
  Serial.print(current);
  Serial.println("A");
  lcd.setCursor(0,1);
    lcd.print("Current=");
    lcd.setCursor(8,1);
    lcd.print(current);
    lcd.setCursor(15,1);
    lcd.print("A");
  delay(300);        // delay in between reads for stability
}


Download Address of Wire and LiquidCrystal_I2C Libraries:
https://drive.google.com/open?id=1JUS0I9U2N30nYCxN323SlGm9Ywm_GRp2


 


Add your review

Your email address will not be published. Required fields are marked *

Please login to write review!

Upload photos

Looks like there are no reviews yet.

Related Products