Line Finder not working with Grove Pi

Hi, I have a Grove Pi attached to a Raspberry Pi running sensors for a robot. Recently I added two Grove Line Finder sensors attached to two digital ports on the Grove Pi. The data read back from the sensors does not correlate to the sensor output at all. For example I attached a voltmeter between sig and gnd on the sensors and I get 5V over a black background and OV over a white background as expected. However, using the code grove_line_finder.py to test the sensors the reported data does not match the sensor ouput. The reported output is mostly stuck at 0 while the sensor sig pin toggles between 0V and 5V.

I would really appreciate any feedback on what issues can occur with the digital ports on GrovePI or the Grove Line Finder.

Thanks,

Hi @Enzo,

Can you post screenshot of the output that you are getting and also can you follow this guide, generate a test log and upload it with your reply.

Also few Pictures of your setup with the sensors connected to GrovePi will be helpful.

-Shoban

Shoban,

Thanks for looking at my setup.

I ran the diags which indicated the i2c was not blacklisted. The config file for this was empty so I explicitly blacklisted both i2c and spi. This made the error in the log file go away but I still have the problem with the line finder sensors.

Attached is a screen shot of the code and the output. The output for both sensors is mostly stuck at 0 but I caused the sensors to toggle high and low about 5 times during this test causing the red LED’s to toggle. The output however reamined 0. I have previously confirmed that this does generate a toggling 0 V/5 V signal on the sig line of the sensors.

Also attached is the output of the latest log.txt after running the complete grove test script.

Also are two pictures of my setup: a top view and a side view of the board stack. The top view shows all the connections to the grove pi while the side view shows the Grove PI on top, Adafruit motor driver in the middle and Raspberry pi on bottom, all mounted on the robot chassis.

I really do need these sensors to work properly and hope you can help.

Thanks!

gpi_diags_110716.txt (6.3 KB)

Thanks,

Vincent

Hi @Enzo,

Thanks a lot for posting the log and the images. We aren’t very sure of the problem, so can you try out the following and post their results to help you better.

  • Make sure you have only the GrovePi is attached to the RaspberryPi and connect only the line finder sensors to the GrovePi.
  • Can you run this script and post its results.
  • Connect only one of the line finder sensor and see if the example works and also try using a different port and see if the line finder sensor is working.

-Shoban