{"id":238,"date":"2019-01-27T02:17:58","date_gmt":"2019-01-27T01:17:58","guid":{"rendered":"http:\/\/tronche.com\/blog\/?p=238"},"modified":"2019-02-17T22:30:35","modified_gmt":"2019-02-17T21:30:35","slug":"acs-713-723-current-sensor-experiment","status":"publish","type":"post","link":"https:\/\/tronche.com\/blog\/2019\/01\/acs-713-723-current-sensor-experiment\/","title":{"rendered":"ACS 713 \/ 723 current sensor experiment"},"content":{"rendered":"\n<p>In spite of some <a href=\"https:\/\/twitter.com\/chtronche\/status\/1038190041674199040\">efforts<\/a>, it&#8217;s still difficult to get a stable <em>current<\/em> measurement. As a reminder, on the prototype, the power is 25W with a ~18V voltage, that is around 1.5A. I conducted a tiny experiment to see in how many &#8220;steps&#8221; I can divide the current into.<\/p>\n\n\n\n<p>I&#8217;m using an Allegro ACS for current measurement. The ACS is a hall effect device outputing a voltage proportional to the current, that can be fed to an ADC. It can measure current both ways, thus the output is centered around some middle value corresponding to 0A and can go up or down around this middle value, depending on the direction it is wired.<\/p>\n\n\n\n<p>Unfortunately, the comparison isn&#8217;t fair, because all things aren&#8217;t equal: on one hand, this is a low side circuit (close to the \u2296 power pin), with a negative coefficient, that is the bigger the current, the lower the sample value. And this is an ACS 713. On the other hand, I have an ACS 723, high-side mounted, with a positive coefficient. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/IMG_20181202_233856-768x1024.jpg\" alt=\"\" class=\"wp-image-239\" width=\"192\" height=\"256\" srcset=\"https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/IMG_20181202_233856-768x1024.jpg 768w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/IMG_20181202_233856-225x300.jpg 225w\" sizes=\"auto, (max-width: 192px) 100vw, 192px\" \/><figcaption>20W resistor used<\/figcaption><\/figure><\/div>\n\n\n\n<p>Anyway, here are the results: I&#8217;ve produced a current of 0.7A, 1.4A and 2.8A, under 18V, using resistors connected appropriately (quite beefy, since we&#8217;re talking 20W here). Each time, I take about 100 points, oversampling by averaging 256 measures. The ADC is 12 bits width, so values could be in the range 0-4095. I then plot the number of times each point has been output from the measurement, thus getting a picture of the spread of the measurement, for what is supposed to be the same current.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/713.png\" alt=\"\" class=\"wp-image-240\" srcset=\"https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/713.png 640w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/713-300x225.png 300w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/713-326x245.png 326w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/713-80x60.png 80w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>ACS 713<\/figcaption><\/figure><\/div>\n\n\n\n<p>The reading is as follow: for 0.7A, the value 2320  was reported 12 times, the value 2339 11 times, 2340 9 times, and so on.<\/p>\n\n\n\n<p>With the ACS 713 low-side, negative coef., the first thing we notice is that the data form two &#8220;spikes&#8221; for reasons unknown to me. For a given current,the ADC output is spread on about 50 values, more  than the separation between 0.7A et 1.4A (about 25), thus we barely can discriminate with a 1A step, much too coarse for the 25W prototype.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/723.png\" alt=\"\" class=\"wp-image-241\" srcset=\"https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/723.png 640w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/723-300x225.png 300w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/723-326x245.png 326w, https:\/\/tronche.com\/blog\/wp-content\/uploads\/2019\/01\/723-80x60.png 80w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure><\/div>\n\n\n\n<p>Things are much more useful with the A 723 high side positive coefficient version. The two-spikes effect is much less visible. data are gathered in a 50 range, but the separation between 0.7A and 1.4A is more than 250, thus a 0.2A precision isn&#8217;t unreasonable.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>In spite of some efforts, it&#8217;s still difficult to get a stable current measurement. As a reminder, on the prototype, the power is 25W with <a class=\"mh-excerpt-more\" href=\"https:\/\/tronche.com\/blog\/2019\/01\/acs-713-723-current-sensor-experiment\/\" title=\"ACS 713 \/ 723 current sensor experiment\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[129,130,249,60],"class_list":["post-238","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-almabraxas-3-prototype","tag-acs-713","tag-acs-723","tag-current-measurement","tag-electronic-noise"],"_links":{"self":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/comments?post=238"}],"version-history":[{"count":2,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/238\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/posts\/238\/revisions\/245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/media\/242"}],"wp:attachment":[{"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/media?parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/categories?post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tronche.com\/blog\/wp-json\/wp\/v2\/tags?post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}