Let's Make Robots!

Sharp IR problems,,,

Even though i finished my SHR months ago, building this new one with my little bro is causing all sorts of headaches! My problem now is the IR sensor No matter what pin it is reading from it only ever reads out 134 or 127 randomly. I dont own a multimeter so I have no real wat to test the picaxe board. Any thoughts?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Did it work for you?? An having the same sharp ir nd am using picaxe 28 project board... I can see dim light from my sharp ir.. But it is nt returning any value..

So I kept looking at the SHR directions..... I felt like I was missing something.... I kept looking at the wiring Fritz had and staring at my little bros bot. Something didnt seem right. Then it hit me. The factory got the wires wrong. The wire cable that comes from the sensor had a wire crossed. When it came out the "servo" tip, the positive and signal were mixed. I cut the end off and put on my own female headers. After putting each cable into teh place I saw on the SHR pics, it spang to life! I have to get used to the distance measuring but it seems to work great! Thank you all for your help and if anyone else has issues like mine, remember that factory mistakes happen!


I just had the same problem.
I connected the Sharp to a analog in using the supplied cable, and something started to smell funny.
After turning off power, and inspecting i noticed the wires were wrong.
I can't get the thing to work, it seems fried, and just spits out random numbers.

I hope I can get a replacement, and i hope it didn't fry my input....


Very good targetdg15! Nasty that the manufacturer did the wiring wrong. I'm glad you could use the resistor trick to sort out which is the problem. Hopefully in the near future you can own a multimeter, that makes life a lot easier.

I did the resistor test and now Im thinking its the sensor. The picaxe reacted the exact way Robodve said it would with the ressistor applied, so Im not sure whats up witht eh sensor. Im thinking of going to a Ping sensor.... any thoughts?

Im not really sure hat your asking here:


"Still, have you tried if your analog sampling is working or not? You could use anything between 0 volt and the powersupply voltage to hook up to ADC 0. Even a potmeter so you can experiment."

I have to wait a bit to pick up a multimeter, the family is in a bit of a crunch. 

What I meant was since you have no multimeter: use your A/D converter in your microcontroller to sort out your problem.

By connecting a resistor to your powersupply and the other end to the ADC input your a/d value should go to the max value, by connecting the same resistor to ground should give nearly zero. If this does not work the problem is in the microcontroller or code, not the sensor.

But RobotFreak's suggestion is by far the best, I suggest too that you get a cheap multimeter. Just hook it up to your sensor, set it in DC V mode and observe while you move your hand to and away from the sensor. You should see a broad variaty of voltages displayed. If so then the sensor is working.

Get a multimeter and measure the voltage on the IR sensor. If it's to low (lower than 4.5V) the sensor will not work properly. If the voltage is ok, your sensor is dead.

i have come across sharp sensors with a back pack to convert them from analog to digital ,if you can add a photo of the back of the sensor so we can have a look please