Difference between revisions of "Electricity Meter(Analog)"
(→Specifications) |
(→Overview) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Overview== | ==Overview== | ||
[[File:Electricity sensor.jpg|thumb|400px|right]] | [[File:Electricity sensor.jpg|thumb|400px|right]] | ||
+ | |||
+ | What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared to traditional universal boards and circuit modules assembled with various electronic components, electronic brick has standardized interfaces, plug and play, simplifying construction of prototype circuit on one’s own. There are many types of electronic bricks, and we provide more than twenty types with different functions including buttons, sensors, Bluetooth modules, etc, whose functions cover from sensor to motor drive, from Ethernet to wireless communication via Bluetooth, and so on. We will continue to add more types to meet the various needs of different projects. | ||
Electronic brick of electricity sensor is based on TA12-100 current transformer, which can transform AC signals of large current into small amplitude signals. The maximum current that can be detected can reach 5A, and the present current signal can be read via analog I / O port. | Electronic brick of electricity sensor is based on TA12-100 current transformer, which can transform AC signals of large current into small amplitude signals. The maximum current that can be detected can reach 5A, and the present current signal can be read via analog I / O port. | ||
+ | |||
+ | Go shopping [http://imall.iteadstudio.com/im120710018.html Electricity Meter(Analog) (IM120710018)] | ||
==Features== | ==Features== | ||
Line 22: | Line 26: | ||
==Electrical Characteristics== | ==Electrical Characteristics== | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | | align="center" style="background:#f0f0f0;"|'''Parameter''' | ||
+ | | align="center" style="background:#f0f0f0;"|'''Min.''' | ||
+ | | align="center" style="background:#f0f0f0;"|'''Typical''' | ||
+ | | align="center" style="background:#f0f0f0;"|'''Max.''' | ||
+ | | align="center" style="background:#f0f0f0;"|'''Unit''' | ||
+ | |- | ||
+ | | Transformation coefficient||-||1000:01:00||-||- | ||
+ | |- | ||
+ | | Input current||0||-||5||A | ||
+ | |- | ||
+ | | Output current||0||-||5||mA | ||
+ | |- | ||
+ | | Sampling resistor||-||200||-||Ω | ||
+ | |- | ||
+ | | Sampling voltage||0||-||1||V | ||
+ | |- | ||
+ | | Working frequency||20||-||20000||Hz | ||
+ | |- | ||
+ | | Working temperature||-55||-||85||℃ | ||
+ | |- | ||
+ | | Dielectric strength||-||6||-||KAC/1min | ||
+ | |} | ||
==Demo== | ==Demo== | ||
+ | Connect S port of electronic brick of electricity sensor to A0 port of Arduino board, and we will use the following program to read the analog value, and the send it to computer for display via serial port. | ||
+ | |||
+ | #define ELECTRICITY_SENSOR A0 // Analog input pin that sensor is attached to | ||
+ | |||
+ | float amplitude_current; //amplitude current | ||
+ | float effective_value; //effective current | ||
+ | |||
+ | void setup() | ||
+ | { | ||
+ | Serial.begin(9600); | ||
+ | pins_init(); | ||
+ | } | ||
+ | void loop() | ||
+ | { | ||
+ | int sensor_max; | ||
+ | sensor_max = getMaxValue(); | ||
+ | Serial.print("sensor_max = "); | ||
+ | Serial.println(sensor_max); | ||
+ | //the VCC on the Grove interface of the sensor is 5v | ||
+ | amplitude_current=(float)sensor_max/1024*5/200*1000000; | ||
+ | effective_value=amplitude_current/1.414; | ||
+ | //minimum_current=1/1024*5/200*1000000/1.414=24.4(mA) | ||
+ | //Only for sinusoidal alternating current | ||
+ | Serial.println("The amplitude of the current is(in mA)"); | ||
+ | Serial.println(amplitude_current,1);//Only one number after the decimal point | ||
+ | Serial.println("The effective value of the current is(in mA)"); | ||
+ | Serial.println(effective_value,1); | ||
+ | } | ||
+ | void pins_init() | ||
+ | { | ||
+ | pinMode(ELECTRICITY_SENSOR, INPUT); | ||
+ | } | ||
+ | /*Function: Sample for 1000ms and get the maximum value from the SIG pin*/ | ||
+ | int getMaxValue() | ||
+ | { | ||
+ | int sensorValue; //value read from the sensor | ||
+ | int sensorMax = 0; | ||
+ | uint32_t start_time = millis(); | ||
+ | while((millis()-start_time) < 1000)//sample for 1000ms | ||
+ | { | ||
+ | sensorValue = analogRead(ELECTRICITY_SENSOR); | ||
+ | if (sensorValue > sensorMax) | ||
+ | { | ||
+ | /*record the maximum sensor value*/ | ||
+ | sensorMax = sensorValue; | ||
+ | } | ||
+ | } | ||
+ | return sensorMax; | ||
+ | } | ||
==Download== | ==Download== | ||
+ | [ftp://imall.iteadstudio.com/Electronic_Brick/IM120710018/DS_IM120710018.pdf Datasheet for Electricity Meter(Analog)] | ||
+ | |||
+ | [ftp://imall.iteadstudio.com/Electronic_Brick/IM120710018/SCH_IM120710018.pdf Schematic for Electricity Meter(Analog)] | ||
+ | |||
+ | [ftp://imall.iteadstudio.com/Electronic_Brick/IM120710018/DEMO_IM120710018.zip Demo code for Electricity Meter(Analog)] | ||
==Useful Links== | ==Useful Links== |
Latest revision as of 06:40, 11 June 2014
Contents
Overview
What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared to traditional universal boards and circuit modules assembled with various electronic components, electronic brick has standardized interfaces, plug and play, simplifying construction of prototype circuit on one’s own. There are many types of electronic bricks, and we provide more than twenty types with different functions including buttons, sensors, Bluetooth modules, etc, whose functions cover from sensor to motor drive, from Ethernet to wireless communication via Bluetooth, and so on. We will continue to add more types to meet the various needs of different projects.
Electronic brick of electricity sensor is based on TA12-100 current transformer, which can transform AC signals of large current into small amplitude signals. The maximum current that can be detected can reach 5A, and the present current signal can be read via analog I / O port.
Go shopping Electricity Meter(Analog) (IM120710018)
Features
1. Plug and play, easy to use. Compatible with the mainstream 2.54 interfaces and 4-Pin Grove interfaces in the market.
2. With use of M4 standard fixed holes, compatible with M4-standard kits such as Lego and Makeblock.
Specifications
PCB size | 30.0mm X 24.0mm X 1.6mm |
Compatible interfaces | 2.54 3-pin interface and 4-pin Grove interface(1) |
Note 1: S for analog output port, G for ground, and N for not used pin.
Electrical Characteristics
Parameter | Min. | Typical | Max. | Unit |
Transformation coefficient | - | 1000:01:00 | - | - |
Input current | 0 | - | 5 | A |
Output current | 0 | - | 5 | mA |
Sampling resistor | - | 200 | - | Ω |
Sampling voltage | 0 | - | 1 | V |
Working frequency | 20 | - | 20000 | Hz |
Working temperature | -55 | - | 85 | ℃ |
Dielectric strength | - | 6 | - | KAC/1min |
Demo
Connect S port of electronic brick of electricity sensor to A0 port of Arduino board, and we will use the following program to read the analog value, and the send it to computer for display via serial port.
#define ELECTRICITY_SENSOR A0 // Analog input pin that sensor is attached to float amplitude_current; //amplitude current float effective_value; //effective current void setup() { Serial.begin(9600); pins_init(); } void loop() { int sensor_max; sensor_max = getMaxValue(); Serial.print("sensor_max = "); Serial.println(sensor_max); //the VCC on the Grove interface of the sensor is 5v amplitude_current=(float)sensor_max/1024*5/200*1000000; effective_value=amplitude_current/1.414; //minimum_current=1/1024*5/200*1000000/1.414=24.4(mA) //Only for sinusoidal alternating current Serial.println("The amplitude of the current is(in mA)"); Serial.println(amplitude_current,1);//Only one number after the decimal point Serial.println("The effective value of the current is(in mA)"); Serial.println(effective_value,1); } void pins_init() { pinMode(ELECTRICITY_SENSOR, INPUT); } /*Function: Sample for 1000ms and get the maximum value from the SIG pin*/ int getMaxValue() { int sensorValue; //value read from the sensor int sensorMax = 0; uint32_t start_time = millis(); while((millis()-start_time) < 1000)//sample for 1000ms { sensorValue = analogRead(ELECTRICITY_SENSOR); if (sensorValue > sensorMax) { /*record the maximum sensor value*/ sensorMax = sensorValue; } } return sensorMax; }
Download
Datasheet for Electricity Meter(Analog)
Schematic for Electricity Meter(Analog)
Demo code for Electricity Meter(Analog)