{"id":2158,"date":"2016-02-13T12:36:54","date_gmt":"2016-02-13T11:36:54","guid":{"rendered":"http:\/\/www.dotmana.com\/weblog\/?p=2158"},"modified":"2016-02-13T12:43:15","modified_gmt":"2016-02-13T11:43:15","slug":"usb-connected-digital-multimeter-and-graph-plotting-uni-t-ut61e-and-sigrok","status":"publish","type":"post","link":"http:\/\/www.dotmana.com\/weblog\/2016\/02\/usb-connected-digital-multimeter-and-graph-plotting-uni-t-ut61e-and-sigrok\/","title":{"rendered":"USB connected digital multimeter and graph plotting (UNI-T UT61E and sigrok)"},"content":{"rendered":"<p>Ever wanted to have nice plot (U\/I curve, whatever) simply plotted?<\/p>\n<p>I got 2 UNI-T UT61E with USB cable (50\u20ac each)<\/p>\n<p><a href=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/UT61E.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2161\" title=\"UT61E\" src=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/UT61E-146x300.png\" alt=\"\" width=\"146\" height=\"300\" srcset=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/UT61E-146x300.png 146w, http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/UT61E-498x1024.png 498w, http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/UT61E.png 760w\" sizes=\"auto, (max-width: 146px) 100vw, 146px\" \/><\/a><a href=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/411ybx5DFlL._SY355_.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-2160\" title=\"411ybx5DFlL._SY355_\" src=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/411ybx5DFlL._SY355_-300x300.jpg\" alt=\"\" width=\"129\" height=\"129\" srcset=\"http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/411ybx5DFlL._SY355_-300x300.jpg 300w, http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/411ybx5DFlL._SY355_-150x150.jpg 150w, http:\/\/www.dotmana.com\/weblog\/wp-content\/uploads\/411ybx5DFlL._SY355_.jpg 355w\" sizes=\"auto, (max-width: 129px) 100vw, 129px\" \/><\/a><\/p>\n<p>With <a href=\"http:\/\/sigrok.org\/\" target=\"_blank\">sigrok<\/a> you can easily get data from many device with a single command:<\/p>\n<blockquote><p>sigrok-cli &#8211;driver=uni-t-ut61e:conn=BUS.DEVICE -O analog\u00a0 &#8211;continuous<\/p><\/blockquote>\n<p>Where BUS and DEVICE is replaced with the output of lsusb<\/p>\n<blockquote><p>lsusb<br \/>\nBus 002 Device 002: ID 8087:8001 Intel Corp.<br \/>\nBus 003 Device 086: ID 1a86:e008 QinHeng Electronics HID-based serial adapater<br \/>\nBus 003 Device 087: ID 1a86:e008 QinHeng Electronics HID-based serial adapater<\/p><\/blockquote>\n<p>In my case, as I&#8217;ve 2 devices, so 2 different commands are used:<\/p>\n<blockquote><p>sigrok-cli &#8211;driver=uni-t-ut61e:conn=3.86 -O analog\u00a0 &#8211;continuous<\/p>\n<p>sigrok-cli &#8211;driver=uni-t-ut61e:conn=3.87 -O analog\u00a0 &#8211;continuous<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>But what about logging in <strong>the<\/strong> <strong>same file\u00a0<\/strong>the two ouputs simultaneously?<\/p>\n<p>Here comes the magical function: paste and joined pipe:<\/p>\n<blockquote><p>paste &lt;(sigrok-cli &#8211;driver=uni-t-ut61e:conn=3.86 -O analog\u00a0 &#8211;continuous) &lt;(sigrok-cli &#8211;driver=uni-t-ut61e:conn=3.87 -O analog\u00a0 &#8211;continuous) &gt; measure.csv<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>I&#8217;ll let you deal with the uber simple csv processing with octave or libreoffice calc (mV, mA range condition, etc&#8230;), as this blog entry is mainly used as a personal notepad.<\/p>\n<p>&nbsp;<\/p>\n<p>Note: if you have trouble connected with sigrok, with an error. You may need to disable the power feature, with the script pointed by <a href=\"http:\/\/blog.philippklaus.de\/2014\/05\/true-rms-digital-multimeter-uni-t-ut61e\/\" target=\"_blank\">blog.philippklaus.de<\/a><\/p>\n<blockquote>\n<pre>#!\/bin\/bash\r\n# see http:\/\/www.erste.de\/UT61\/index.html\r\nfor dat in \/sys\/bus\/usb\/devices\/*; do \r\n  if test -e $dat\/manufacturer &amp;&amp; grep -q \"WCH.CN\" $dat\/manufacturer; then\r\n    echo \"Suspending ${dat}.\"\r\n    echo auto &gt; ${dat}\/power\/control\r\n    echo 0 &gt; ${dat}\/power\/autosuspend \r\n  fi      \r\ndone<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Ever wanted to have nice plot (U\/I curve, whatever) simply plotted? I got 2 UNI-T UT61E with USB cable (50\u20ac each) With sigrok you can easily get data from many device with a single command: sigrok-cli &#8211;driver=uni-t-ut61e:conn=BUS.DEVICE -O analog\u00a0 &#8211;continuous &hellip; <a href=\"http:\/\/www.dotmana.com\/weblog\/2016\/02\/usb-connected-digital-multimeter-and-graph-plotting-uni-t-ut61e-and-sigrok\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-2158","post","type-post","status-publish","format-standard","hentry","category-electronics"],"_links":{"self":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/2158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/comments?post=2158"}],"version-history":[{"count":3,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/2158\/revisions"}],"predecessor-version":[{"id":2163,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/posts\/2158\/revisions\/2163"}],"wp:attachment":[{"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/media?parent=2158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/categories?post=2158"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dotmana.com\/weblog\/wp-json\/wp\/v2\/tags?post=2158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}