{"action":"created","issue":{"url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/1","repository_url":"https://api.github.com/repos/alx-s/RPi_tutorials","labels_url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/1/comments","events_url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/1/events","html_url":"https://github.com/alx-s/RPi_tutorials/issues/1","id":299307819,"number":1,"title":"Errors in measurements with the LV-MaxSonar EZ serie","user":{"login":"maky-hnou","id":24441488,"avatar_url":"https://avatars2.githubusercontent.com/u/24441488?v=4","gravatar_id":"","url":"https://api.github.com/users/maky-hnou","html_url":"https://github.com/maky-hnou","followers_url":"https://api.github.com/users/maky-hnou/followers","following_url":"https://api.github.com/users/maky-hnou/following{/other_user}","gists_url":"https://api.github.com/users/maky-hnou/gists{/gist_id}","starred_url":"https://api.github.com/users/maky-hnou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maky-hnou/subscriptions","organizations_url":"https://api.github.com/users/maky-hnou/orgs","repos_url":"https://api.github.com/users/maky-hnou/repos","events_url":"https://api.github.com/users/maky-hnou/events{/privacy}","received_events_url":"https://api.github.com/users/maky-hnou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T10:56:19Z","updated_at":"2018-03-03T17:32:54Z","closed_at":null,"author_association":"NONE","body":"I used this code with a Raspberry Pi 3 model B and an MCP3008 and an LV-MaxSonar EZ2. The only difference is that I wired the VREF pin of the MCP3008 to the 3.3V pin of the raspberry (because I tried with the 5V pin, but it didn't work).\r\nAfter running the script, I got a logical output. However, there was an error rate that grows with the distance between the sensor and the object.\r\nThe following examples explain the errors I got :\r\n\r\n**An object that is 16 cm away from the sensor ----> the output is 21 cm\r\nAn object that is 17 cm away from the sensor ----> the output is 21 cm\r\nAn object that is 18 cm away from the sensor ----> the output is 21 cm\r\nAn object that is 19 cm away from the sensor ----> the output is 24 cm\r\nAn object that is 35 cm away from the sensor ----> the output is 42 cm\r\nAn object that is 56 cm away from the sensor ----> the output is 66 cm & 67cm\r\nAn object that is 70 cm away from the sensor ----> the output is 84 cm\r\nAn object that is 84 cm away from the sensor ----> the output is 96 cm**\r\n\r\nI tried with many EZ2 sensors, but I still got the same errors.\r\n\r\nSomeone Has tried that or has any solution please?"},"comment":{"url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/comments/370165128","html_url":"https://github.com/alx-s/RPi_tutorials/issues/1#issuecomment-370165128","issue_url":"https://api.github.com/repos/alx-s/RPi_tutorials/issues/1","id":370165128,"user":{"login":"alx-s","id":3448675,"avatar_url":"https://avatars3.githubusercontent.com/u/3448675?v=4","gravatar_id":"","url":"https://api.github.com/users/alx-s","html_url":"https://github.com/alx-s","followers_url":"https://api.github.com/users/alx-s/followers","following_url":"https://api.github.com/users/alx-s/following{/other_user}","gists_url":"https://api.github.com/users/alx-s/gists{/gist_id}","starred_url":"https://api.github.com/users/alx-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alx-s/subscriptions","organizations_url":"https://api.github.com/users/alx-s/orgs","repos_url":"https://api.github.com/users/alx-s/repos","events_url":"https://api.github.com/users/alx-s/events{/privacy}","received_events_url":"https://api.github.com/users/alx-s/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T17:32:54Z","updated_at":"2018-03-03T17:32:54Z","author_association":"OWNER","body":"Hi Hani,\r\nThe VREF pin on the MCP3008 should have the same voltage as the Vcc pin of the sensor. It looks like you wired the maxbotix to +5v, which means that it will output an analog voltage mapped over 5V. In you case, the MCP3008 expects to measure a voltage between 0v and 3.3V. This explains why you read distances higher than the actual ones. Make sure you wire the ADC's VREF to the same voltage as the sensor's Vcc.\r\nAn other point, be careful with the definition of maxbotix, some go done to a centimeter, other to an inch. I don't remember which one I used in the tutorial. It looks like the one you use won't be more precise than an inch. Check their website to find the model that suits you needs\r\nBest,\r\nAlex"}}
{"actor":{"display_login":"alx-s"}}