Sensor problems

Hey,

I’m having some problems with my sensors and I’ll just keep everything in 1 thread so I don’t spam the forums too much.

So, I’ve bought 4 sensors ( collision, digital accelerometar, 80cm infrared proximity, temperature ). I’ve setup my GrovePi according to this http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/ ( even though step 3 doesn’t work, and I did step 2.2 ).

i2cdetect works.
All sensors look like they work.

Now here’s my problem : none of them actually shows correct data. Temperature sensor pretty much always shows the same amount ( 8.2ish ) no matter when I try it out ( and it’s around 25 degrees here ).
Proximity sensor always finds something even tho there’s nothing there ( sometimes it doesn’t find anything but it’s just random ). I’ve tried switching the lights off/on, I’ve tried placing it in darker / lighter areas - still not working.
My collision sensor says it’s always in collision with something, again occasionally printing that it’s not ( but it’s completely random ).
Finally, my accelerometer doesn’t really work at all. It just stand at (0,0,0) no matter what happens.

I hope I’m doing something completely wrong.
I should also mention that I’m working with TightVNC to control raspberry from my PC ( haven’t had any problems with it so far ) and that I can’t seem to connect to my grovePi from my pc ( via “http://dex.local” ). At this point I have no clue what’s going on and why. I’d appriciate some help. If there’s any other info I can give you, just say it. I didn’t bother rechecking if I installed GrovePi correctly because everything seems to be working, it just shows bad info.

Hey Groover,
Sorry to hear that you are having trouble with getting the sensors to work with the GrovePi.

I have a few questions:

  1. Which image are you using with the Raspberry Pi. Is it the Dexter Industries image. If so what is the date of the image
  2. If it is the Dexter Industries image, can you run the troubleshooting script by following the instructions here and upload the log to the forums so that we can narrow down the problem: https://www.youtube.com/watch?v=ZMadpIEYq5o&list=PLGXEJ4Ye1qCMWziVrynnrIPpgfOr-2aj9&index=4.
  3. Can you add a link to the digital accelerometer and the temperature sensor that you are using. (There are a couple of different sensors for this, just want to make sure that both of us are looking at the same thing)
  4. Can you upload the program that you are using and the output that you get.

-Karan

Alrighty, sorry for the slow answer but I was in process of reinstalling everything.

So, I’ve reinstalled, took you image ( https://sourceforge.net/projects/dexterindustriesraspbianflavor/ ), ran the logs ( I was ablo to connect everything normally over dex.local and test i2c and grovepi, everything seems to be working ).

I’m using :
1.http://www.seeedstudio.com/wiki/Grove_-Temperature_Sensor_V1.2
2. http://www.seeedstudio.com/wiki/Grove
-_3-Axis_Digital_Accelerometer(%C2%B116g) ( 1.3v )

Here is a pic from the temperature sensor output http://prntscr.com/aropx7 ( it’s always like that, a no, it’s not 8 here :slight_smile: )
The rest of the sensor pretty much show the same thing all time time ( collision just prints 0, axis accel. 0,0,0 ; and proximity is always at the same voltage level no matter the light / distance or anything else )

I attached programs I use and the log you asked for.

Can’t upload the .py files but it’s the same ones as in GrovePi/Software/Python folder.

Hey,
Can you run https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_analog_read.py with the temperature sensor and try varying the temperature and see how much the value changes and post the results here.

Also, with the Accelerometer connected, can you run i2cdetect -y 1 on the terminal and past the results here.

For the accelerometer, can you run this example: https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_accelerometer_16g/basic_example.py and paste the results here.

-Karan

First of all I’d like to apologize for the late reply. I had some RL issues and I had to put down my hobbies for some time.

Now back to the problem…i2cdetect sees Accelerometer perfectly ( http://prnt.sc/b3w23e )

Temperature sensor results : http://prnt.sc/b3w1wl
Also looking fine ( it started around 450 and I put it in my hands for about 30 secs and it jumped to 550 then back to 460ish after some time when I put it out of my hands ) edit : I fixed the code so it shows proper temperature.

Accelerometer also seems to be working good now :
http://prnt.sc/b3w15i

When the sensor is not moving it’s showing static results and depending where I move it ( X,Y,Z-axis ) the results change accordingly.

I will test collision and proximity again when I come back from work.

I’d like to thank you for the help and I’ll post again if I run into any troubles.

Really nice and fast support guys :slight_smile:

Collision and proximity don’t seem to be working.

I put the proximity sensor on A0 and tried grove_80cm_infrared_proximity_sensor.py ( http://prntscr.com/b3xl2q ) and grove_analog_read.py ( http://prntscr.com/b3xm00 ). I know they are essentially doing the same thing. I tried in different lightning environments and with different objects.

Collision sensor seems to be giving the same output on grove_analog_read.py ( http://prntscr.com/b3xo03 ), always ! And this is what I get as a result of grove_collision_sensor.py ( http://prntscr.com/b3xp5n ). Note that on the analog_read it’s connected to A0 and when i’m using grove_collision_sensor.py it’s connected to D2 port.

Hey Groover,
Great to hear that the accelerometer and the temperature sensor are reading fine.

The proximity sensor should be giving analog readings as the distance changes. Since the reading on yours does not change a lot, I think it might be broken. Can you double-check that is is connected to the right port and try again.

The collision sensor gives a digital 1 momentarily when it detects a collision. Did you try a couple of time to see if the readings changed.

If the sensors don’t work at all then they might be broken. You should reach out to the distributor and ask for a replacement.

-Karan