Ks0185 keyestudio ACS712-30A Current Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:


 
<br>
==Introduction==
==Introduction==
ACS712-30A Current Sensor is used to measured the intensity of current. It contains ACS712ELC-30A chip ,based on Hall Effect. You should protect it from influence of magnetic field when using it.
ACS712-30A Current Sensor is used to measured the intensity of current. It contains ACS712ELC-30A chip ,based on Hall Effect. You should protect it from influence of magnetic field when using it.
<br>[[File:KS0185.jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0185.jpg|500px|frameless|thumb]]<br>


<br>
==Parameters==
==Parameters==
* Chip:ACS712ELC-30A<br>
* 5V Power Supply and Power Indicator On-board<br>
* This module can detect 30A positive and negative current,corresponding analog output at 66mV/A.<br>
* Output voltage is VCC/2 without current flowing.<br>


1.Chip:ACS712ELC-30A<br>
<br>
2.5V Power Supply and Power Indicator On-board<br>
3.This module can detect 30A positive and negative current,corresponding analog output at 66mV/A.<br>
4.Output voltage is VCC/2 without current flowing.<br>
 
==Connection Diagram==
==Connection Diagram==
<br>[[File:Ks0185-2.png|700px|frameless|thumb]]<br>


<br>[[File:1851.png|500px|frameless|thumb]]<br>
<br>
 
==Sample Code==
==Sample Code==
<pre>
<pre>
Line 62: Line 62:
</pre>
</pre>


'''Download Address of Wire and LiquidCrystal_I2C Libraries:'''[http://7326097.s21d-7.faiusrd.com/0/ABUIABAAGAAg_N-UvQUopOil8Qc?f=KS0185%EF%BC%880186%2C0187%EF%BC%89Libraries+of++Wire+and+LiquidCrystal_12C.zip&v=1471492088 1]
<br>
'''Download Address of Wire and LiquidCrystal_I2C Libraries:'''<br>
https://drive.google.com/open?id=1JUS0I9U2N30nYCxN323SlGm9Ywm_GRp2


<br>
==Result==
==Result==
In order to display data conveniently, add I2C LCD1602 Module. Then upload program and connect wires. After plugging in power, LED on this sensor is on and I2C LCD1602 Module displays the current intensity shown as below.<br>
<br>[[File:1852.png|600px|frameless|thumb]]<br>


In order to display data conveniently, add I2C LCD1602 Module. Then upload program and connect wires. After plugging in power, LED on this sensor is on and I2C LCD1602 Module displays the current intensity shown as below.


<br>[[File:1852.png|500px|frameless|thumb]]<br>
<br>
==Resources ==


==Resources ==
* '''Libraries and Code'''<br>
https://fs.keyestudio.com/KS0185


'''Datasheet'''


http://www.keyestudio.com/files/index/download/id/1479174135/
<br>


==Buy from==
==Buy from==


http://www.keyestudio.com/keyestudio-acs712-30a-current-sensor.html
*[https://www.keyestudio.com/free-shippingkeyestudio-acs712-30a-current-sensor-for-arduino-compatible-p0164.html    '''Official Website''']
 
*[https://www.aliexpress.com/store/product/Free-shipping-Keyestudio-ACS712-30A-Current-Sensor-for-Arduino-Compatible/1452162_32783304018.html?spm=2114.12010612.8148356.63.7e1e1a19WAPnZm    '''Aliexpress store''']
 
 
[[Category: Sensor]]
[[Category: Sensor]]

Latest revision as of 14:22, 7 January 2021


Introduction

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


Parameters

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


Connection Diagram


thumb


Sample Code

#include <Wire.h>  //invoking I2Clibraries coming with Arduino
#include <LiquidCrystal_I2C.h>
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/13.6;
  //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


Result

In order to display data conveniently, add I2C LCD1602 Module. Then upload program and connect wires. After plugging in power, LED on this sensor is on and I2C LCD1602 Module displays the current intensity shown as below.

thumb



Resources

  • Libraries and Code

https://fs.keyestudio.com/KS0185



Buy from