{"id":835,"date":"2023-01-04T15:31:33","date_gmt":"2023-01-04T23:31:33","guid":{"rendered":"https:\/\/unixwizardry.com\/?p=835"},"modified":"2023-01-18T12:07:00","modified_gmt":"2023-01-18T20:07:00","slug":"metone-windvane-testing-the-hall-effect-angle-sensor","status":"publish","type":"post","link":"https:\/\/unixwizardry.com\/index.php\/2023\/01\/04\/metone-windvane-testing-the-hall-effect-angle-sensor\/","title":{"rendered":"MetOne Windvane: Testing the MLX90316 angle sensor"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"835\" class=\"elementor elementor-835\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3b1690ce elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3b1690ce\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-431ea9ff\" data-id=\"431ea9ff\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-253cdeff elementor-widget elementor-widget-text-editor\" data-id=\"253cdeff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Output (in degrees) from WindSubsystemTest code using a 10&#8242; ethernet cable.\u00a0<\/strong><\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-825 alignleft\" src=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-225x300.jpg\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-225x300.jpg 225w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-768x1024.jpg 768w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-1152x1536.jpg 1152w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-1000x1333.jpg 1000w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-230x307.jpg 230w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-350x467.jpg 350w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-480x640.jpg 480w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3147-rotated.jpg 1512w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/p><p>Connection is problematic, but it does work showing that SPI signals can work fine over at least 10&#8242;.\u00a0 Apparently, I&#8217;m having trouble with connections from the WEMOS D1 Mini to the sensor using the header connectors I got from Aliexpress, or maybe it&#8217;s just my soldering these tiny things.\u00a0 But it <strong>DOES<\/strong> work!\u00a0 So now, I need to find out what&#8217;s going on with the connectors.\u00a0 The WindSubsystemTest code needs work too for the wind speed:\u00a0 I&#8217;m getting reed switch bounce issues and other math problems with wind MPH calculations.\u00a0 \u00a0<\/p><p>No SPI signal or MLX angle sensor not found&#8230;<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 208 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 207 Card: NNE<br \/>Heading: 01 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 187 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 187 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 187 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 112 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 112 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 112 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 112 Card: NNE<br \/>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles\/hour: 0<br \/>Heading: 112 Card: NNE<\/p><p>(&#8220;Card: NNE&#8221; is the cardinal wind direction, which is a just a placeholder in the code.)<\/p><p>So, I&#8217;m puzzled why the setup all of a suddenly stops taking an upload of new code &#8211; for some reason PlatformIO can&#8217;t access COM3 port for downloading even though it was working fine displaying stuff on the OLED screen.\u00a0<\/p><p><strong><em>Building .pio\\build\\d1_mini\\firmware.bin<\/em><\/strong><br \/><strong><em>Creating BIN file &#8220;.pio\\build\\d1_mini\\firmware.bin&#8221; using &#8220;C:\\Users\\bruce\\.platformio\\packages\\framework-arduinoespressif8266\\bootloaders\\eboot\\eboot.elf&#8221; and &#8220;.pio\\build\\d1_mini\\firmware.elf&#8221;<\/em><\/strong><br \/><strong><em>Configuring upload protocol&#8230;<\/em><\/strong><br \/><strong><em>AVAILABLE: espota, esptool<\/em><\/strong><br \/><strong><em>CURRENT: upload_protocol = esptool<\/em><\/strong><br \/><strong><em>Looking for upload port&#8230;<\/em><\/strong><br \/><strong><em>Auto-detected: COM3<\/em><\/strong><br \/><strong><em>Uploading .pio\\build\\d1_mini\\firmware.bin<\/em><\/strong><br \/><strong><em>esptool.py v3.0<\/em><\/strong><br \/><strong><em>Serial port COM3<\/em><\/strong><br \/><strong><em>Connecting&#8230;&#8230;.._____&#8230;.._____&#8230;.._____&#8230;.._____&#8230;.._____<\/em><\/strong><\/p><p>(Unplugged COM3 here)<\/p><p><strong><em>File &#8220;C:\\Users\\bruce\\.platformio\\penv\\lib\\site-packages\\serial\\serialutil.py&#8221;, line 372, in timeout<\/em><\/strong><br \/><strong><em>self._reconfigure_port()<\/em><\/strong><br \/><strong><em>File &#8220;C:\\Users\\bruce\\.platformio\\penv\\lib\\site-packages\\serial\\serialwin32.py&#8221;, line 222, in _reconfigure_port<\/em><\/strong><br \/><strong><em>raise SerialException(<\/em><\/strong><br \/><strong><em>serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, &#8216;Access is denied.&#8217;, None, 5)<\/em><\/strong><\/p><p>I did fiddle with the connector on the test jig to get it to work and didn&#8217;t touch it after I got it working.\u00a0 I disconnected the upload port (COM3), reconnected it, and that&#8217;s when it ceased to work&#8230;no display on the OLED, NOTHING!\u00a0 Hmmm.\u00a0 Tried to find a way to reset the COM3 port, but it doesn&#8217;t show up under Windows11.\u00a0 \u00a0This is weird.\u00a0 In order to be able to upload code I have to disconnect the header connector from either end of the cable.\u00a0 And now the OLED is working&#8230;without the 034B test jig connected.\u00a0 \u00a0How the heck are the connections to the test jig via a 10&#8242; cable (D1 Mini D6, D7, and D8) affecting the serial port access???<\/p><p><img decoding=\"async\" class=\"size-medium wp-image-827 alignleft\" src=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-300x225.jpg 300w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-1024x768.jpg 1024w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-768x576.jpg 768w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-1536x1152.jpg 1536w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-1000x750.jpg 1000w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-230x173.jpg 230w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-350x263.jpg 350w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1-480x360.jpg 480w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2023\/01\/IMG_3152-1.jpg 2016w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Output (in degrees) from WindSubsystemTest code using a 10&#8242; ethernet cable.&nbsp; Connection is problematic, but it does work showing that SPI signals [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,38],"tags":[],"class_list":["post-835","post","type-post","status-publish","format-standard","hentry","category-electronics","category-weather-instruments"],"_links":{"self":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/comments?post=835"}],"version-history":[{"count":20,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/835\/revisions"}],"predecessor-version":[{"id":869,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/835\/revisions\/869"}],"wp:attachment":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/categories?post=835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/tags?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}