{"id":10692,"date":"2021-01-07T20:02:29","date_gmt":"2021-01-07T20:02:29","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/acs712-current-sensor-2"},"modified":"2024-10-29T11:31:51","modified_gmt":"2024-10-29T11:31:51","slug":"acs712-current-sensor-2","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2","title":{"rendered":"ACS712 Current Sensor"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">About this post<\/h2>\n\n<p>If you search Google for the terms &#8220;current sensor&#8221; and &#8220;Arduino&#8221;, you will come across the ACS712 very often. After reporting on the current sensor modules <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ina219-current-and-power-sensor\" target=\"_blank\" rel=\"noopener noreferrer\">INA219<\/a>, <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ina226-current-and-power-sensor\" target=\"_blank\" rel=\"noopener noreferrer\">INA226<\/a> and the <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/current-sensor-how-to-build-it-yourself\" target=\"_blank\" rel=\"noopener noreferrer\">self-built current sensor,<\/a> I would now like to introduce this very popular module.<\/p>\r\n\r\n<p>At currents below one ampere the ACS712 in combination with the A\/D converter of the Arduino UNO reaches its limits. I&#8217;ll take a special look at this and show you how to get better results. Finally, I&#8217;ll explain how you can use the ACS712 as a power sensor.<\/p>\n\n<h2 class=\"wp-block-heading\">Properties of the ACS712 (module)<\/h2>\n\n<h3 class=\"wp-block-heading\">The measuring principle of the ACS712<\/h3>\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-445x1024.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"1024\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-445x1024.jpg\" alt=\"ACS712 module\" class=\"wp-image-7221\" style=\"width:223px;height:512px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-445x1024.jpg 445w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-130x300.jpg 130w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-768x1767.jpg 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712-668x1536.jpg 668w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712.jpg 776w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/a><\/figure>\n<\/div>\n<p>The ACS712 or the ACS712 module measures currents based on the <a href=\"https:\/\/de.wikipedia.org\/wiki\/Hall-Effekt\" target=\"_blank\" rel=\"noopener noreferrer\">Hall effect<\/a>. In an <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/hall-sensors-and-reed-switches\" target=\"_blank\" rel=\"noopener noreferrer\">earlier post<\/a>, I had reported on Hall sensors. These are used to detect magnetic fields or to build contactless switches using magnets. In the ACS712, on the other hand, the current to be measured generates a magnetic field, which is converted into a voltage, which you can then pick up at the pin &#8220;Out&#8221;.<\/p>\r\n<p>Due to its measuring principle, the ACS712 influences the current to be measured even less than the shunt-based modules from my previous articles. The resistance is only 1.2 milliohms. However, the sensitivity is not particularly high, and the ACS712 requires considerably more power.<\/p>\r\n<p>Depending on the wiring, the ACS712 IC delivers a voltage between 66 and 185 millivolts per ampere. Using the module, the wiring is fixed. Most modules I have in online shops have implemented the maximum sensitivity of 185 millivolts per ampere. But there are also others available. With the bare ACS712 IC you are free to choose the sensitivity. Another advantage of the bare IC is that you can control the filter function (pin 6 of the IC, see <a href=\"https:\/\/www.allegromicro.com\/en\/products\/sense\/current-sensor-ics\/zero-to-fifty-amp-integrated-conductor-sensor-ics\/acs712\" target=\"_blank\" rel=\"noopener noreferrer\">data sheet<\/a>).<\/p>\r\n\n<h3 class=\"wp-block-heading\">Technical data (module)<\/h3>\n\n<p>Here are the most important technical data:<\/p>\r\n<ul>\r\n<li>Power supply at VCC\/GND: 4.5 &#8211; 5.5 V.<\/li>\r\n<li>Power consumption of the ACS712 IC: ~ 10 mA.\r\n<ul>\r\n<li>Due to its LED, the current consumption of the module is slightly higher: about 12 mA.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>Sensitivity of the module: 185 mV \/ A.<\/li>\r\n<ul>\r\n<li>Alternatively, modules with a sensitivity of 100 or 66 mV\/A are available.<\/li>\r\n<li>Linearity deviation: 1.5% (according to the data sheet).<\/li>\r\n<li>5 Inputs \/ Outputs:\r\n<ul>\r\n<li>VCC\/GND Power supply.<\/li>\r\n<li>OUT: Output voltage (signal).<\/li>\r\n<li>IN+ (top right) \/ IN- (top left): Input and output for the current to be measured.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>Voltage at OUT at 0 amps: VCC\/2.<\/li>\r\n<\/ul>\r\n<p>The signal voltage V<sub>OUT<\/sub> is thus, with a supply voltage VCC, dependent on the current to be measured I:&nbsp;<\/p>\r\n\n<p><\/p>\r\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 40px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/ql-cache\/quicklatex.com-67c352b3a2dc7581fa18c7791947778e_l3.png\" height=\"40\" width=\"372\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91; &#86;&#95;&#123;&#79;&#85;&#84;&#125;&#92;&#44;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#109;&#86;&#125;&#93;&#61;&#49;&#56;&#53;&#92;&#44;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#109;&#86;&#47;&#65;&#125;&#93;&#92;&#99;&#100;&#111;&#116;&#32;&#73;&#92;&#44;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#65;&#125;&#93;&#43;&#92;&#102;&#114;&#97;&#99;&#123;&#86;&#67;&#67;&#92;&#44;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#109;&#86;&#125;&#93;&#125;&#123;&#50;&#125; &#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\r\n\n<p>Solved for I:<\/p>\r\n\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 45px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/ql-cache\/quicklatex.com-879bbf50c5eb64414ab246ae30ad21e3_l3.png\" height=\"45\" width=\"171\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91; &#73;&#92;&#44;&#32;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#65;&#125;&#93;&#61;&#92;&#102;&#114;&#97;&#99;&#123;&#86;&#95;&#123;&#79;&#85;&#84;&#125;&#45;&#92;&#102;&#114;&#97;&#99;&#123;&#86;&#67;&#67;&#125;&#123;&#50;&#125;&#125;&#123;&#49;&#56;&#53;&#125; &#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\r\n\n<p>If you have a module with a different sensitivity, simply replace the 185 with 100 or 66.<\/p>\r\n\n<h2 class=\"wp-block-heading\">The ACS712 &#8220;Quick and Dirty&#8221;<\/h2>\n\n<p>If you want to use the ACS712 with the Arduino, you can connect it as follows:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_basic_engl.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_basic_engl-1024x551.png\" alt=\"The ACS712 connected to an Arduino UNO\" class=\"wp-image-7310\"\/><\/a><figcaption class=\"wp-element-caption\">The ACS712 connected to an Arduino UNO<\/figcaption><\/figure>\n\n<p>This is the high-side configuration, i.e. the ACS712 is placed on the V+ side of the consumer to be measured. You can also put the ACS712 behind the consumer on the GND side (low-side).<\/p>\r\n\n<p>Then I first took care of the zero point, meaning the voltage at OUT (labeled Vo in the Fritzing schematic above) at zero amps of current flow. Theoretically, this is 2.5 volts, i.e. a <code>analogRead(A0)<\/code> should return 1024\/2 = 512. In practice, you will probably measure somewhat less. Even under the low load of the ACS712, the voltage provided by the Arduino already drops by a few millivolts. Thus, also the zero value at OUT is somewhat lower. Thereby, the zero value at OUT is also somewhat lower. I have determined 510, but fluctuating by up to +\/-3 units.<\/p>\r\n<p>Since the Arduino has a reference voltage of 5 volts and its A\/D converter has a resolution of 10 bits, the following applies to the voltage at pin A0:<\/p>\r\n\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 39px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/ql-cache\/quicklatex.com-c7ef3d4b9bbf1301948a9e552040504e_l3.png\" height=\"39\" width=\"269\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91; &#86;&#95;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#65;&#48;&#125;&#125;&#91;&#92;&#116;&#101;&#120;&#116;&#123;&#86;&#125;&#93;&#61;&#97;&#110;&#97;&#108;&#111;&#103;&#82;&#101;&#97;&#100;&#40;&#92;&#116;&#101;&#120;&#116;&#123;&#65;&#48;&#125;&#41;&#92;&#99;&#100;&#111;&#116;&#92;&#102;&#114;&#97;&#99;&#123;&#53;&#125;&#123;&#49;&#48;&#50;&#52;&#125; &#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\r\n\n<p>Inserted into the equation for the current above, the following simple sketch results:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ACS712_Quick_And_Dirty.ino\" data-enlighter-title=\"ACS712_Quick_And_Dirty.ino\">const int ACS712_Pin = A0;\r\nconst int zeroCurrentValue = 510;\r\n\r\nvoid setup() {\r\n  Serial.begin(9600);\r\n  Serial.println(\"ACS712 - Basic sketch\");\r\n}\r\n\r\nvoid loop() {\r\n  int rawValue= analogRead(ACS712_Pin);\r\n  float current = (rawValue - zeroCurrentValue)*5.0\/1.024\/0.185; \/\/ for modules with 185 mV\/A\r\n  Serial.print(\"Current [mA]: \");\r\n  Serial.println(current);\r\n  delay(2000);        \r\n}<\/pre>\r\n<p>\u00a0<\/p>\r\n\r\n\n<p>With this sketch, I typically got results like the following at zero amperes:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_quick_and_dirty_Nullpunkt.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"358\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_quick_and_dirty_Nullpunkt.png\" alt=\"\" class=\"wp-image-7240\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_quick_and_dirty_Nullpunkt.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_quick_and_dirty_Nullpunkt-300x150.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_Quick_And_Dirty.ino (Strom = current; some German lessons for you!)<\/figcaption><\/figure>\n\n<p>The level of noise would not be very satisfactory, even for measurements in the ampere range. However, the fluctuating results are not only the fault of the ACS712. What fluctuates here above all is the A\/D converter of the Arduino UNO.  Take a stabilized current source or simply an unloaded battery and measure the voltage via <code>analogRead()<\/code>. You will notice that the read values vary by +\/-2 to 3 units. One unit is 5000\/1024 = ~4.883 millivolts and that equals 4.883\/0.185 = 26.39 milliamps.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Improvement 1: Averaging<\/h2>\n\n<p>It is obvious that noisy results can be improved by averaging. To do this, I first determined the zero value more precisely (510.8). Then I changed the sketch so that 50 measurement results are averaged: <\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ACS712_with_averaging.ino\" data-enlighter-title=\"ACS712_with_averaging.ino\">const int ACS712_Pin = A0;\r\nconst float zeroCurrentValue = 510.8;  \r\nvoid setup() {\r\n  Serial.begin(9600);\r\n  Serial.println(\"ACS712 - current sensor, improved basic sketch\");\r\n}\r\n\r\nvoid loop() {\r\n  long rawValue = 0;\r\n  for(int i=0; i&lt;50; i++){\r\n    rawValue += analogRead(ACS712_Pin);\r\n  }\r\n  float rawVoltage = rawValue\/50.0;\r\n  float current = (rawVoltage - zeroCurrentValue)*5.0\/1.024\/0.185; \/\/ for modules with 185 mV\/A\r\n  Serial.print(\"Current [mA]: \");\r\n  Serial.println(current);\r\n  delay(2000);        \r\n}<\/pre>\r\n<p>\u00a0<\/p>\r\n\n<p>The result looks much better. Fluctuations were in the range +\/-10 milliampere:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_less_quick_and_dirty_Nullpunkt.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_less_quick_and_dirty_Nullpunkt.png\" alt=\"ACS712 - ACS712_with_averaging.ino at zero amperes\" class=\"wp-image-7241\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_less_quick_and_dirty_Nullpunkt.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_less_quick_and_dirty_Nullpunkt-300x146.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_with_averaging.ino at zero amperes (Strom = current)<\/figcaption><\/figure>\n\n<p>As the current increases, the variation remains at about +\/- 10 milliamperes, i.e. the noise component decreases. Here are the results for a current that my multimeter and my lab power supply have shown me as a constant 305 milliampere:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_305mA.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_305mA.png\" alt=\"ACS712 - Output of ACS712_with_averaging.ino at 305 mA\" class=\"wp-image-7254\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_305mA.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_305mA-300x146.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_with_averaging.ino at 305 mA<\/figcaption><\/figure>\n\n<p>And here are the results for 536 milliamperes:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_536mA.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_536mA.png\" alt=\"ACS 712 - Output of ACS712_with_averaging.ino at 536 mA\" class=\"wp-image-7257\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_536mA.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Arduino_bei_536mA-300x146.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_with_averaging.ino at 536 mA<\/figcaption><\/figure>\n\n<p>The measured values obtained in this way were, on average, slightly higher than the actual current. The factor of 185 mV\/A would have to be corrected slightly upwards accordingly. But because of the fluctuations, I didn&#8217;t want to make a science out of it anymore. <\/p>\r\n\n<h2 class=\"wp-block-heading\">Improvement 2: A better A\/D converter<\/h2>\n\n<p>In the next step, I used an ADS1115 instead of the Arduino A\/D converter. I have described the ADS1115 and my associated library <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ads1115-a-d-converter-with-amplifier\">here.<\/a> That is why I do not go into all the details in this article.<\/p>\r\n<p>The ADS1115 is an A\/D converter with a resolution of 16 bits, it has 4 channels (A0 &#8211; A3) and an internal amplifier. Furthermore, it offers the possibility to measure voltage differences between the channels. You can take advantage of this by using a voltage divider to generate a reference voltage of 2.5 volts and then measuring the voltage difference between the reference (channel A1) and the OUT signal of the ACS712 (channel A0):<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_ADS1115_engl.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_ADS1115_engl-1024x575.png\" alt=\"The ACS712 with ADS1115 and Arduino UNO\" class=\"wp-image-7312\"\/><\/a><figcaption class=\"wp-element-caption\">The ACS712 with ADS1115 and Arduino UNO<\/figcaption><\/figure>\n\n<p>At zero ampere current flow, you start with a voltage difference of about zero volts. With small currents, you get low voltages that you can amplify with the ADS1115. <\/p>\r\n<p><strong>Note: You will see later why I connected the V+ of the consumer to A2. Wait, especially if your power supply for the consumer generates more than 5 volts! The voltage at the inputs A0 &#8211; A4 must not exceed the supply voltage of the ADS1115 by more than 0.3 volts. In this example, that would be 5.3 volts. If the supply voltage for the consumer is higher, you must install suitable voltage dividers to protect the inputs<\/strong><strong>(i.e. here A2). Otherwise, you will destroy the ADS1115!<br><\/strong><\/p>\r\n\n<h3 class=\"wp-block-heading\">Checking the measured value fluctuations<\/h3>\n\n<p>For a first impression, I looked at the fluctuations at zero ampere. To do this, I used the following sketch:<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ACS712_with_ADS1115_basic.ino\" data-enlighter-title=\"ACS712_with_ADS1115_basic.ino\">#include&lt;ADS1115_WE.h&gt; \r\n#include&lt;Wire.h&gt;\r\n#define I2C_ADDRESS 0x48\r\nconst float zeroCurrentVoltage_mV = 0.0;\r\n\r\nADS1115_WE adc(I2C_ADDRESS);\r\n\r\nvoid setup() {\r\n  Wire.begin();\r\n  Serial.begin(9600);\r\n  if(!adc.init()){\r\n    Serial.println(\"ADS1115 not connected!\");\r\n  }\r\n\r\n  \/* Set the voltage range of the ADC to adjust the gain\r\n   * Please note that you must not apply more than VDD + 0.3V to the input pins!\r\n   * \r\n   * ADS1115_RANGE_6144  -&gt;  +\/- 6144 mV\r\n   * ADS1115_RANGE_4096  -&gt;  +\/- 4096 mV\r\n   * ADS1115_RANGE_2048  -&gt;  +\/- 2048 mV (default)\r\n   * ADS1115_RANGE_1024  -&gt;  +\/- 1024 mV\r\n   * ADS1115_RANGE_0512  -&gt;  +\/- 512 mV\r\n   * ADS1115_RANGE_0256  -&gt;  +\/- 256 mV\r\n   *\/\r\n  adc.setVoltageRange_mV(ADS1115_RANGE_0256); \r\n\r\n  \/* Set the inputs to be compared\r\n   *  \r\n   *  ADS1115_COMP_0_1    -&gt;  compares 0 with 1 (default)\r\n   *  ADS1115_COMP_0_3    -&gt;  compares 0 with 3\r\n   *  ADS1115_COMP_1_3    -&gt;  compares 1 with 3\r\n   *  ADS1115_COMP_2_3    -&gt;  compares 2 with 3\r\n   *  ADS1115_COMP_0_GND  -&gt;  compares 0 with GND\r\n   *  ADS1115_COMP_1_GND  -&gt;  compares 1 with GND\r\n   *  ADS1115_COMP_2_GND  -&gt;  compares 2 with GND\r\n   *  ADS1115_COMP_3_GND  -&gt;  compares 3 with GND\r\n   *\/\r\n  adc.setCompareChannels(ADS1115_COMP_0_1); \r\n\r\n  Serial.println(\"ACS712 - Nullstrommessung mit ADS1115\");\r\n  Serial.println();\r\n}\r\n\r\nvoid loop() {\r\n  float voltage = 0.0;\r\n  \r\n  for(int i=0; i&lt;10; i++){\r\n    adc.startSingleMeasurement();\r\n    while(adc.isBusy()){}\r\n    voltage += adc.getResult_mV();\r\n  }\r\n  \r\n  voltage \/= 10;\r\n  voltage -= zeroCurrentVoltage_mV;\r\n  float current = voltage\/0.185;\r\n  Serial.print(\"ADC712-Spannung [mV]: \");\r\n  Serial.print(voltage);\r\n  Serial.print(\"  \/  Strom [mA]: \");\r\n  Serial.println(current);\r\n  delay(2000);\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>A few comments on the sketch:<\/p>\r\n<ul>\r\n<li><code>zeroCurrentVoltage_mV<\/code> is the voltage between OUT and the reference voltage at zero ampere current. I first set the value to zero, ran the sketch, determined the actual value, and then used it accordingly (I determined 2.0 mV).<\/li>\r\n<li><code>setVoltageRange(ADS1115_RANGE_0256)<\/code> sets the voltage range to +\/- 256 mV. This corresponds to the maximum possible amplification of the ADS1115.<\/li>\r\n<li><code>setCompareChannels(ADS1115_COMP_0_1)<\/code> specifies that the voltage difference between channels 0 and 1 is measured.<\/li>\r\n<li><code>getResult_mV()<\/code> returns the result of the conversion directly in millivolts.<\/li>\r\n<li>With an average of ten measurements, I was able to achieve an acceptable stability of the values.<\/li>\r\n<\/ul>\r\n\n<p>Here is the result:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Nullstrommessung_mit_ADS1115.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Nullstrommessung_mit_ADS1115.png\" alt=\"Output of ACS712_with_ADS1115_basic.ino at zero amperes (Spannung = voltage, Strom = current)\" class=\"wp-image-7245\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Nullstrommessung_mit_ADS1115.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/ACS712_Nullstrommessung_mit_ADS1115-300x146.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_with_ADS1115_basic.ino at zero amperes (Spannung = voltage, Strom = current)<\/figcaption><\/figure>\n\n<p>That doesn&#8217;t look so bad, does it? If we assume that the slope is actually 185 mV\/A, the above sketch can already be used as is.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Improvement 3: Calibration<\/h2>\n\n<p>In the next step I looked at the dependence of the current on the voltage. For this I used different consumers, measured the current with my multimeter and determined the voltage with the sketch ACS712_am_ADS1115_Basis.ino. This is the result:<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_calibration_table.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_calibration_table-1024x494.png\" alt=\"ACS712 - Table 1: current vs. voltage\" class=\"wp-image-7249\" style=\"width:512px;height:248px\"\/><\/a><figcaption class=\"wp-element-caption\">Table 1: current vs. voltage<\/figcaption><\/figure>\n<\/div>\n<p>Here shown graphically with a regression line:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_Calibration_curve.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/ACS712_Calibration_curve-1024x475.png\" alt=\"ACS712 - regression line for the measured values of current vs. voltage\" class=\"wp-image-7248\"\/><\/a><figcaption class=\"wp-element-caption\">Regression line for the measured values current vs. voltage<\/figcaption><\/figure>\n\n<p>The measured values fitted well to a regression line. I then inserted the voltage values from Table 1 into the equation for the regression line. The results can be found in the right column of Table 1. They give an impression of how accurate the measurement is. More values would be needed for exact statistics, but it can be estimated that the deviation drops to less than 1 percent for currents above 1 ampere. <\/p>\r\n<p>The slope of the regression line is 5,2788 mA\/mV. This corresponds to 189.4 mV\/A, which is slightly higher than the specified 185 mV\/A, but not miles away. <\/p>\r\n\n<h2 class=\"wp-block-heading\">Improvement 4: Power sensor function<\/h2>\n\n<p>If you follow the described path, you could now improve the last sketch by using the equation for the regression line. But you may also want to determine the power consumption. This is where the voltage measurement at V+ of the power consumer (bus voltage) comes into play. At this point I would like to emphasize again that the voltage at the inputs of the ADS1115 must not exceed the operating voltage of the ADS1115 by more than 0.3 volts. If V+ is greater, then use voltage dividers.<\/p>\r\n<p>With the voltage at V+ and the current (bus current) you can calculate the power:<\/p>\r\n\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 19px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/ql-cache\/quicklatex.com-5244141eb55ecb6ef218ece6bbea9453_l3.png\" height=\"19\" width=\"192\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91; &#80;&#95;&#123;&#67;&#111;&#110;&#115;&#117;&#109;&#101;&#114;&#125;&#61;&#85;&#95;&#123;&#86;&#95;&#123;&#43;&#125;&#125;&#92;&#44;&#92;&#99;&#100;&#111;&#116;&#32;&#73;&#95;&#123;&#66;&#117;&#115;&#125; &#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\r\n\n<p>And here&#8217;s the complete sketch:<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ACS712_current_and_power_sensor.ino\" data-enlighter-title=\"ACS712_current_and_power_sensor.ino\">#include&lt;ADS1115_WE.h&gt; \r\n#include&lt;Wire.h&gt;\r\n#define I2C_ADDRESS 0x48\r\n\r\nADS1115_WE adc(I2C_ADDRESS);\r\n\r\nvoid setup() {\r\n  Wire.begin();\r\n  Serial.begin(9600);\r\n  if(!adc.init()){\r\n    Serial.println(\"ADS1115 not connected!\");\r\n  }\r\n\r\n  \/* Set the voltage range of the ADC to adjust the gain\r\n   * Please note that you must not apply more than VDD + 0.3V to the input pins!\r\n   * \r\n   * ADS1115_RANGE_6144  -&gt;  +\/- 6144 mV\r\n   * ADS1115_RANGE_4096  -&gt;  +\/- 4096 mV\r\n   * ADS1115_RANGE_2048  -&gt;  +\/- 2048 mV (default)\r\n   * ADS1115_RANGE_1024  -&gt;  +\/- 1024 mV\r\n   * ADS1115_RANGE_0512  -&gt;  +\/- 512 mV\r\n   * ADS1115_RANGE_0256  -&gt;  +\/- 256 mV\r\n   *\/\r\n  \/\/adc.setVoltageRange_mV(ADS1115_RANGE_1024); \/\/uncomment line \/ change parameter to change range\r\n\r\n  \/* Set the inputs to be compared\r\n   *  \r\n   *  ADS1115_COMP_0_1    -&gt;  compares 0 with 1 (default)\r\n   *  ADS1115_COMP_0_3    -&gt;  compares 0 with 3\r\n   *  ADS1115_COMP_1_3    -&gt;  compares 1 with 3\r\n   *  ADS1115_COMP_2_3    -&gt;  compares 2 with 3\r\n   *  ADS1115_COMP_0_GND  -&gt;  compares 0 with GND\r\n   *  ADS1115_COMP_1_GND  -&gt;  compares 1 with GND\r\n   *  ADS1115_COMP_2_GND  -&gt;  compares 2 with GND\r\n   *  ADS1115_COMP_3_GND  -&gt;  compares 3 with GND\r\n   *\/\r\n  \/\/adc.setCompareChannels(ADS1115_COMP_0_1); \/\/ uncomment line \/ change parameter to change channels\r\n\r\n  Serial.println(\"ACS712 - Current and power sensor sketch\");\r\n  Serial.println();\r\n}\r\n\r\nvoid loop() {\r\n  float voltage = 0.0;\r\n\r\n  adc.setCompareChannels(ADS1115_COMP_0_1); \/\/ Channel 0 vs. 1\r\n  adc.setVoltageRange_mV(ADS1115_RANGE_0512); \/\/ Limit: 512 mV\r\n  \r\n  for(int i=0; i&lt;10; i++){\r\n    adc.startSingleMeasurement();\r\n    while(adc.isBusy()){}\r\n    voltage += adc.getResult_mV();\r\n  }\r\n  voltage \/= 10;\r\n \r\n  Serial.print(\"V Out          [mV]: \");\r\n  Serial.println(voltage);\r\n\r\n  float current_mA = voltage * 5.28 + 10; \/\/ experimentally determined\r\n  Serial.print(\"Bus current   [mA]: \");\r\n  Serial.println(current_mA);\r\n  \r\n  adc.setVoltageRange_mV(ADS1115_RANGE_6144); \/\/ Limit: 6144 mV\r\n  adc.setCompareChannels(ADS1115_COMP_2_GND); \/\/ Channel 2 vs. GND\r\n  adc.startSingleMeasurement();\r\n  while(adc.isBusy()){}\r\n  voltage = adc.getResult_V(); \r\n  Serial.print(\"Bus voltage    [V]: \");\r\n  Serial.println(voltage);\r\n\r\n  float power_mW = (voltage * current_mA);\r\n  Serial.print(\"Power         [mW]: \");\r\n  Serial.println(power_mW);\r\n\r\n  Serial.println(\"-------------------------------\");\r\n  delay(2000);\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>Between the measurements of the ACS712 voltage and V+ voltage I change the range in the above sketch. I have chosen the range of +\/-512 mV for the ACS712 voltage. Used in the equation for the regression line this results in a maximum current of approx. 2.7 amperes. If you need more, then increase the range accordingly.<\/p>\r\n<p>Here&#8217;s what the output looks like:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/Ausgabe_ACS712_complete_engl.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/01\/Ausgabe_ACS712_complete_engl.png\" alt=\"ACS712: Output ACS712_current_and_power_sensor.ino\" class=\"wp-image-7251\"\/><\/a><figcaption class=\"wp-element-caption\">Output of ACS712_current_and_power_sensor.ino<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Acknowledgement<\/h2>\n\n<p>As usual, I used <a href=\"https:\/\/pixabay.com\/de\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pixabay<\/a> again for parts of my post picture:<\/p>\r\n<ul>\r\n<li>The magnifying glass comes from the <a href=\"https:\/\/pixabay.com\/de\/users\/OpenClipart-Vectors-30363\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2025715\" target=\"_blank\" rel=\"noopener noreferrer\">OpenClipart-Vectors<\/a><\/li>\r\n<li>The already frequently used electricity meter is taken from the <a href=\"https:\/\/pixabay.com\/photos\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=691809\" target=\"_blank\" rel=\"noopener noreferrer\">free-photos<\/a> section.<\/li>\r\n<\/ul>\r\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area and also measure the performance. <\/p>\n","protected":false},"author":1,"featured_media":8669,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[574,572],"tags":[1257,1260,1222,1259,1223],"class_list":["post-10692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-current-voltage","category-sensors","tag-acs712-en","tag-acs712-module","tag-current-sensor","tag-fluctuation","tag-leistungssensor-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ACS712 Current Sensor &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ACS712 Current Sensor &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-07T20:02:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-29T11:31:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1197\" \/>\n\t<meta property=\"og:image:height\" content=\"1197\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"ACS712 Current Sensor\",\"datePublished\":\"2021-01-07T20:02:29+00:00\",\"dateModified\":\"2024-10-29T11:31:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2\"},\"wordCount\":1715,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Beitragsbild_ACS712.png\",\"keywords\":[\"ACS712\",\"ACS712 module\",\"current sensor\",\"fluctuation\",\"Leistungssensor\"],\"articleSection\":[\"Current, voltage\",\"Sensors\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2\",\"name\":\"ACS712 Current Sensor &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Beitragsbild_ACS712.png\",\"datePublished\":\"2021-01-07T20:02:29+00:00\",\"dateModified\":\"2024-10-29T11:31:51+00:00\",\"description\":\"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Beitragsbild_ACS712.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Beitragsbild_ACS712.png\",\"width\":1197,\"height\":1197},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/acs712-current-sensor-2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ACS712 Current Sensor\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ACS712 Current Sensor &#8226; Wolles Elektronikkiste","description":"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2","og_locale":"en_US","og_type":"article","og_title":"ACS712 Current Sensor &#8226; Wolles Elektronikkiste","og_description":"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2","og_site_name":"Wolles Elektronikkiste","article_published_time":"2021-01-07T20:02:29+00:00","article_modified_time":"2024-10-29T11:31:51+00:00","og_image":[{"width":1197,"height":1197,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png","type":"image\/png"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"ACS712 Current Sensor","datePublished":"2021-01-07T20:02:29+00:00","dateModified":"2024-10-29T11:31:51+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2"},"wordCount":1715,"commentCount":0,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png","keywords":["ACS712","ACS712 module","current sensor","fluctuation","Leistungssensor"],"articleSection":["Current, voltage","Sensors"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2","url":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2","name":"ACS712 Current Sensor &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png","datePublished":"2021-01-07T20:02:29+00:00","dateModified":"2024-10-29T11:31:51+00:00","description":"The ACS712 current sensor can be used to measure currents in the range of amperes. I show how to get down into the milliampere area.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2020\/08\/Beitragsbild_ACS712.png","width":1197,"height":1197},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/acs712-current-sensor-2#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"ACS712 Current Sensor"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/10692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=10692"}],"version-history":[{"count":0,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/10692\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/8669"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=10692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=10692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=10692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}