{"product_id":"hlw8012-high-precision-energy-metering-ic-in-pakistan","title":"HLW8012 high-precision energy metering IC in pakistan","description":"\u003ch2\u003e\u003cspan style=\"font-size: 24px;\"\u003eDownload Arduino Library\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2\u003e\u003cspan style=\"font-size: 24px;\"\u003e\u003ca href=\"http:\/\/www.mediafire.com\/file\/m7v07lcg94106b0\/HLW8012_1.0.0_1281.zip\"\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0965\/3623\/2249\/files\/Kg2q.gif?v=1789233089\" alt=\"Image result for download gif\" loading=\"lazy\"\u003e\u003c\/a\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2\u003e\u003cspan style=\"font-size: 24px;\"\u003eHLW8012 high-precision energy metering IC in Pakistan\u003c\/span\u003e\u003c\/h2\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eHLW8012 is a single-phase multi-function metering chip that provides high-frequency pulse CF for energy metering, indicating active power, and high-frequency CF1 for indicating current RMS or voltage RMS\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eChip pin\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\u003cimg src=\"https:\/\/www.hiliwi.com\/imageRepository\/627055cc-0a1f-4304-9c23-46cb8f1060f5.png\" alt=\"\" loading=\"lazy\"\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd bgcolor=\"#cccccc\" width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eNo.\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd bgcolor=\"#cccccc\" width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003ePin name\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd bgcolor=\"#cccccc\" width=\"114\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eTypes of\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd bgcolor=\"#cccccc\" width=\"360\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003edescription\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e1\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eVDD\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003epower supply\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e5V voltage\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e2\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eV1P\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eAnalog input\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd rowspan=\"2\" width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eCurrent Channel Differential Input, Maximum Differential Input Voltage Range ±43.75mV\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e3\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eV1N\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eAnalog input\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e4\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eV2P\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eAnalog input\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eVoltage Channel Positive Input, Max Input Signal ±700mV\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e5\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eGND\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eSimulated ground\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eSimulated ground\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e6\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eCF\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eDigital output\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eOutput active power high-frequency pulse, pulse duty cycle 50%\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e7\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eCF1\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eDigital output\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSEL=0, CF1 output current arms, pulse duty cycle 50%\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSEL=1; CF1 output voltage arms, pulse duty cycle 50%\u003c\/span\u003e\n\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"48\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003e8\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"102\"\u003e\n\u003cp align=\"center\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eSEL\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/td\u003e\n\u003ctd width=\"114\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eDigital input\u003c\/span\u003e\u003c\/td\u003e\n\u003ctd width=\"360\"\u003e\u003cspan style=\"font-size: 24px;\"\u003eConfigure CF1 output current or voltage arms, internal pull-down\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eChip features\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eHigh-frequency pulse CF, indicating active power, ±0.2% accuracy in 1000:1 range\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eHigh-frequency pulse CF1 can be configured as output current arms or voltage arms, achieving 0.5% accuracy over a 500:1 range\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eBuilt-in oscillator\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eLow power consumption, +5V single-supply operation, working power less than 15mW\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eSOP-8 package\u003c\/span\u003e\u003c\/p\u003e\n\u003ch3\u003e\u003cspan style=\"font-size: 24px;\"\u003eApplication:\u003c\/span\u003e\u003c\/h3\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eMetering socket\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eSmart home electricity collector\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eIntelligent street light power collection end\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eThe power quality monitoring system\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eVarious types of energy metering systems\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eInternal block diagram\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\u003cimg src=\"https:\/\/www.hiliwi.com\/imageRepository\/a437b4fd-c8f8-4d57-b669-6280c96e5963.png\" alt=\"\" loading=\"lazy\"\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eSample code\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#include\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e#define SERIAL_BAUDRATE 9600\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\/\/ GPIOs\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define SEL_PIN 11\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define CF1_PIN 13\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define CF_PIN 12\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\/\/ Check values every 2 seconds\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define UPDATE_TIME 2000\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\/\/ Set SEL_PIN to HIGH to sample current\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e\/\/ This is the case for Itead’s Sonoff POW, where a\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e\/\/ the SEL_PIN drives a transistor that pulls down\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e\/\/ the SEL pin in the HLW8012 when closed\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define CURRENT_MODE HIGH\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\/\/ These are the nominal values for the resistors in the circuit\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define CURRENT_RESISTOR 0.002\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define VOLTAGE_RESISTOR_UPSTREAM ( 5 * 470000 ) \/\/ Real: 2280k\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e#define VOLTAGE_RESISTOR_DOWNSTREAM ( 1000 ) \/\/ Real 1.009k\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003eHLW8012 hlw8012;\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003evoid unblockingDelay(unsigned long mseconds) {\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eunsigned long timeout = millis();\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003ewhile ((millis() – timeout) UPDATE_TIME) {\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003elast = millis();\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.print(“ Active Power (W) : “); Serial.println(hlw8012.getActivePower());\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.print(“ Voltage (V) : “); Serial.println(hlw8012.getVoltage());\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.print(“ Current (A) : “); Serial.println(hlw8012.getCurrent());\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.print(“ Apparent Power (VA) : “); Serial.println(hlw8012.getApparentPower());\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.print(“ Power Factor (%) : “); Serial.println((int) (100 * hlw8012.getPowerFactor()));\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003eSerial.println();\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e\/\/ When not using interrupts we have to manually switch to current or voltage monitor\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e\/\/ This means that every time we get into the conditional we only update one of them\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003e\/\/ while the other will return the cached value.\u003c\/span\u003e\u003cbr\u003e\n\u003cspan style=\"font-size: 24px;\"\u003ehlw8012.toggleMode();\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan style=\"font-size: 24px;\"\u003e}\u003c\/span\u003e\u003c\/p\u003e","brand":"Electronics Hub","offers":[{"title":"Default Title","offer_id":54466794422585,"sku":"product-6228","price":98.0,"currency_code":"PKR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0965\/3623\/2249\/files\/images-15-4-1.jpg?v=1789233097","url":"https:\/\/electronicshub.pk\/products\/hlw8012-high-precision-energy-metering-ic-in-pakistan","provider":"Electronics Hub","version":"1.0","type":"link"}