7 Replies Latest reply on Sep 22, 2016 4:52 PM by Intel Corporation

    Issue with dust sensor sharp GP2Y1010AU

    Ulixxes

      Dear all,

      I'm try to build an application using a dust sensor sharp GP2Y1010AU and following this tutorial:

      Sharp dust sensor GP2Y1010AU | Arduino Labs

       

      Using an Arduino all works fine, but if I replace it with an Edison + arduino board (that teorically shoul be compatible 100% with arduino) the sensor read ever 0V.

      There are some limitation with Edison board?

       

      Greets,

        • 1. Re: Issue with dust sensor sharp GP2Y1010AU
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Ulixxes,

          That's a weird problem because it is just an analog read and it should works. Are you using the code from the tutorial that you provided? 

          Personally, I would recommend you to test the analog input with another device (you can use a potentiometer to check if the values changes). And check IOREF and AREF headers are selecting the value 5 V (Check this document: http://www.intel.com/content/www/us/en/support/boards-and-kits/000006021.html).

          Let me know when you have the results of the test to help you more.

          Regards,
          -Leonardo

          • 2. Re: Issue with dust sensor sharp GP2Y1010AU
            Ulixxes

            Dear Leonardo,

             

            thank for the answer. I tried with different sketch (one found on your tutorial) and changing analog IO on the board (that work correclty for other kind of analog sensor) and I have ever same result: an analog read about 0V.

            I'm worried about the effective real.time of the Edison: to make a read with this sensor I have to set high/low a digital pin for few microseconds but the Edison is able to do that?

             

            Greets,

            • 3. Re: Issue with dust sensor sharp GP2Y1010AU
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi Ulixxes,

               

              I tested the code of the Optical Dust Sensor from the tutorial that you provided without the sensor, I tested it with a potentiometer and a simple LED. I found that I wasn't reading any value on the Arduino's serial monitor because the function Serial1.begin(230400), it isn't supported, you have to use Serial.begin(230400) instead and I changed the Serial1.print() too.

               

              At the beginning I connected the LED to the pin 6 and I noticed that the setting high/low the digital pin for a few microseconds was not working (it happens the same to the other PWM pins), so I changed the pin to 4 and it worked. So yes the Edison is able to do these changes.

               

              I'm not sure if your analog pins are fine so I recommend you to do the same test that I did with a potentiometer and LED. Make sure that your LED pin is in a not PWM pin and you should get some values that are Non-Zero like me, look at this picture:

              Arduinotest.PNG

               

              I'll be waiting for your results to be able to assist you better.

               

              Regards,
              -Leonardo

              • 4. Re: Issue with dust sensor sharp GP2Y1010AU
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi Ulixxes,

                Did you do the test? Did you get the same results?

                Don't doubt to ask us if you still have issues.

                Regards,
                -Leonardo

                • 5. Re: Issue with dust sensor sharp GP2Y1010AU
                  Ulixxes

                  Dear Leonardo,

                  Yea: in the original project I already changed me too the serial and the baud rate.

                  I tried to change analog port, and effectively now I have some measurement. The measure is still not trustable: sometime works correctly, but sometime return again a number close to 0V. I will try in the next days to check with an oscilloscope in order to check what is the issue.

                   

                  Ps. there are some know issues to set manually high/low state on PWM digital pins?

                   

                  Greets,

                  • 6. Re: Issue with dust sensor sharp GP2Y1010AU
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi Ulixxes,

                    That's great, when you have the results of the oscilloscope just let us know to help you further.

                    About the PWM pins issue, I apologize because it was a problem with the Edison board that I was using, I tested the PWM pins of other Edison boards and they worked, so sorry about that.

                    We will be waiting for your reply, have a nice day.

                    Regards,
                    -Leonardo

                    • 7. Re: Issue with dust sensor sharp GP2Y1010AU
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi Ulixxes,

                      I was wondering if you have had a chance to check the issue with an oscilloscope.

                      Regards,
                      Leonardo