[SOLVED] FEZ Mini and Sharp GP2Y0A02YK

I read the following on the wiki page (http://wiki.tinyclr.com/index.php?title=Sharp_GP2Y0A02YK0F);

The first bold text is correct, i changed my wiring to this (as i said in my previous posts).
The second bold text… What does it means? (filter capacitor). Do i need one, or is it optional?
Maybe this is causing the smell and hot part.

filter capacitor is only going to “smooth out” any bumps in the input voltage coming to the sensor. No the lack of it is NOT going to reduce the hot/smell. What that comment means is that the sensor, when you have a “noisy” power input, returns erratic values even though the distance to target is not changing. By adding the capacitor to the input power circuit, this allows the sensor to perform better and return a more consistent value when the distance from the sensor to target isn’t changing.

I think you’ve killed that sensor. Certainly I don’t think you can trust it to guide anything. Seems like you’ve wired it up incorrectly once and now it’s non functional. Without someone who knows a bit more having a look at it, I suspect you can’t resurrect it.

Okay, thanks for the good explain of the filter capacitor.

Even the sensor is dead now. I have a second, same, sensor :wink: I had ordered 2.

So. the hot/smell, you think maybe one of the sensors was already dead? maybe a DOA (dead on arrival)?

Should i test the same wiring again on the second sensor? (like the picture)

1 side is: Red (power) / White (signal) / Black (ground)
The other side: White (signal) / Black (ground) / Red (power)

No I am not sure DOA is correct. Originally you said you connected the standard JST wire into the sensor. That means you had the following connections:

VCC from Fez plugged into the DATA OUTPUT signal onthe sensor.
Data input line from Fez into the GND on sensor.
GND on Fez wired to VCC on sensor.

So at a minimum, the sensor’s output signal was zapped with the Fez VCC. I expect that this has caused your issue, and now when you wire things correctly the sensor does nothing that it was meant to do, it just gets hot.

If you have faith in the PDF of the sensor, then I would be comfortable testing the second sensor with the connection as you have it shown in the last photo.

Brett, that is what i wanted to know.
Connected the second (not broken) sensor to the new switched cables as shown in the picture.
No smell or hot parts, deploy new code and this is the debug output:

Starting up FEZ Mini Robot.
OEM String: GHI Electronics, LLC
Version: 4.1.3.0
Battery Voltage: 3.700
Distance: 35.936497587778888cm
Distance: 35.383664094339139cm
Distance: 35.383664094339139cm
Distance: 35.76674661684055cm
Distance: 41.648401090941064cm
Distance: 41.333985208644947cm
Distance: 41.240496653655413cm
Distance: 28.274348690700265cm
Distance: 27.709248812837131cm
Distance: 27.631152347005127cm
Distance: 27.767789983099703cm
Distance: 48.536705711747544cm
Distance: 79.068902224506019cm
Distance: 64.722404277359601cm
Distance: 52.83005512683053cm
Distance: 54.51749768407899cm
Distance: 50.062436692130206cm
Distance: 48.413016090028123cm
Distance: 37.65968194037238cm
Distance: 30.987867494604245cm
Distance: 32.65620506152942cm
Distance: 84.602183822455117cm
Distance: 96.417748988926178cm
Distance: 110.39500812636106cm

I went from 35cm till about 1meter, and it works!

Everyone, thanks for helping me out here!!

Just went over here as you asked in your email and I see it is solved. Glad you got it working. What wrong wiring can do… ::slight_smile:

Always make sure to check your connection 3 times. Especially if you are planning to dive into higher voltage robotics. It will save your frustrations and even more important; money.

Have fun fezzing! 8) let me know when you have a video ready.

Foekie, will do, thanks man!

A couple of comments about the Sharp IR’s. New IR’s have a conductive plastic housing. If you mount them on a metal frame, they will be grounded to the frame. The old non-ROHS ones did not have a conductive housing. This can lead to noise and problems with the ground. We found this the hard way at our First competition this week end. The new data sheets specifically mention the filter cap while the old ones do not. To be safe they should be added. I’ve found the noise problem to show up with long lead length in the past.