数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

SEN0211 数据表(PDF) 4 Page - DFROBOT

部件名 SEN0211
功能描述  SKU:SEN0211
PDF  7 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  DFROBOT [DFROBOT]
网页  https://www.dfrobot.com/
标志 DFROBOT - DFROBOT

SEN0211 数据表(HTML) 4 Page - DFROBOT

  SEN0211 Datasheet HTML 1Page - DFROBOT SEN0211 Datasheet HTML 2Page - DFROBOT SEN0211 Datasheet HTML 3Page - DFROBOT SEN0211 Datasheet HTML 4Page - DFROBOT SEN0211 Datasheet HTML 5Page - DFROBOT SEN0211 Datasheet HTML 6Page - DFROBOT SEN0211 Datasheet HTML 7Page - DFROBOT  
Zoom Inzoom in Zoom Outzoom out
 4 / 7 page
background image
About Calibration
Since the analog reading is affected by the accuracy of the reference voltage. For a more
accurate reading, use a high-precision multimeter to measure the analog reference voltage
of the controller (usually the same as the supply voltage) and modify the #define VREF
5.0 parameter in the sample code below to complete the calibration.
/*!
* @file readACCurrent.
* @n This example reads Analog AC Current Sensor.
* @copyright
Copyright (c) 2010 DFRobot Co.Ltd (https://www.dfrobot.com)
* @licence
The MIT License (MIT)
* @get from https://www.dfrobot.com
Created 2016-3-10
By berinie Chen <bernie.chen@dfrobot.com>
Revised 2019-8-6
By Henry Zhao<henry.zhao@dfrobot.com>
*/
const int ACPin = A2;
//set arduino signal read pin
#define ACTectionRange 20;
//set Non-invasive AC Current Sensor tection range
(5A,10A,20A)
// VREF: Analog reference
// For Arduino UNO, Leonardo and mega2560, etc. change VREF to 5
// For Arduino Zero, Due, MKR Family, ESP32, etc. 3V3 controllers, change VREF to 3.3
#define VREF 5.0
float readACCurrentValue()
{
float ACCurrtntValue = 0;
float peakVoltage = 0;
float voltageVirtualValue = 0;
//Vrms
for (int i = 0; i < 5; i++)
{
peakVoltage += analogRead(ACPin);
//read peak voltage
delay(1);
}
peakVoltage = peakVoltage / 5;
voltageVirtualValue = peakVoltage * 0.707;
//change the peak voltage to the
Virtual Value of voltage
/*The circuit is amplified by 2 times, so it is divided by 2.*/
voltageVirtualValue = (voltageVirtualValue / 1024 * VREF ) / 2;
ACCurrtntValue = voltageVirtualValue * ACTectionRange;
return ACCurrtntValue;
}



Html Pages

1 2 3 4 5 6 7


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com