Download Tokopedia App
Tentang TokopediaMulai Berjualan PromoTokopedia Care
tokopedia-logo
Kategori
Atur jumlah dan catatan

Stok Total: 37

Subtotal

Rp30.000

ACS712 Current Sensor 20A Current Sensor Arus for Arduino

Rp30.000
  • Kondisi: Baru
  • Min. Pemesanan: 1 Buah
  • Etalase: Sensor Arduino
ACS712-20A_x000D_
_x000D_
//Mengukur arus pada tegangan AC 220V dengan ACS712_x000D_
_x000D_
//Analog Output ACS712 pada PIN A0_x000D_
const int sensorIn = A0;_x000D_
int mVperAmp = 100; _x000D_
// use 185 for ACS712 5A_x000D_
// use 100 for ACS712 20A_x000D_
// use 66 for ACS712 20A_x000D_
_x000D_
double Voltage = 0;_x000D_
double VRMS = 0;_x000D_
double AmpsRMS = 0;_x000D_
_x000D_
void setup(){ _x000D_
Serial.begin(9600);_x000D_
}_x000D_
_x000D_
void loop(){_x000D_
Voltage = getVPP();_x000D_
VRMS = (Voltage/2.0) *0.707; _x000D_
AmpsRMS = (VRMS * 1000)/mVperAmp;_x000D_
Serial.print(AmpsRMS);_x000D_
Serial.println(" Amps RMS");_x000D_
_x000D_
}_x000D_
float getVPP()_x000D_
{_x000D_
float result;_x000D_
int readValue; //value read from the sensor_x000D_
int maxValue = 0; // store max value here_x000D_
int minValue = 1024; // store min value here_x000D_
_x000D_
uint32_t start_time = millis();_x000D_
while((millis()-start_time) < 1000) //sample for 1 Sec_x000D_
{_x000D_
readValue = analogRead(sensorIn);_x000D_
// see if you have a new maxValue_x000D_
if (readValue > maxValue) _x000D_
{_x000D_
/*record the maximum sensor value*/_x000D_
maxValue = readValue;_x000D_
}_x000D_
if (readValue < minValue) _x000D_
{_x000D_
/*record the maximum sensor value*/_x000D_
minValue = readValue;_x000D_
_x000D_
_x000D_
// Subtract min from max_x000D_
result = ((maxValue - minValue) * 5.0)/1024.0; _x000D_
return result;_x000D_
}

Ada masalah dengan produk ini?

ULASAN PEMBELI

4.9/ 5.0

100% pembeli merasa puas

7 rating • 0 ulasan

5(6)85.71%
4(1)14.29%
3(0)0%
2(0)0%
1(0)0%
Toped Illustration

Belum ada ulasan untuk produk ini

Beli produk ini dan jadilah yang pertama memberikan ulasan