Sharp IR sensor Voltages

Hi,
I have a sharp IR sensor (2-15cm GP2Y0A51SK0F) that requires 4.5V - 5.5V to operate and I'm interfacing it with an Arduino Due. I'm trying to figure out if I need to pull the signal coming out of the sensor down to the 3.3V analog pin on the Due. When I read page 3 of the spec sheet the output terminal voltages are all lower than 3.3V but I'm not sure if I'm reading it correctly, which wouldn't be a surprise.
Any help is appreciated.
Spec Sheet

ribbonman:
Hi,
I have a sharp IR sensor (2-15cm GP2Y0A51SK0F) that requires 4.5V - 5.5V to operate and I'm interfacing it with an Arduino Due. I'm trying to figure out if I need to pull the signal coming out of the sensor down to the 3.3V analog pin on the Due. When I read page 3 of the spec sheet the output terminal voltages are all lower than 3.3V but I'm not sure if I'm reading it correctly, which wouldn't be a surprise.
Any help is appreciated.
Spec Sheet

Don't look at the output voltage for 15cm. Look at the maximum which is Vcc +0.3 volts. Looks like that occurs when the white paper is right on the lens. So, don't look for such close distances. Also do you see not to use the device for 20ms after power up?
Paul
Paul

Paul_KD7HB:
Don't look at the output voltage for 15cm. Look at the maximum which is Vcc +0.3 volts. Looks like that occurs when the white paper is right on the lens. So, don't look for such close distances. Also do you see not to use the device for 20ms after power up?
Paul
Paul

Thanks Paul,
So that means if I plug the signal wire into my A0 pin I won't damage the pin if I power the sensor with 5V because output Vcc max is +.3V.
I didn't see the 20ms wait time but I shouldn't have a problem with it since the project will be turned on and waiting for instructions for longer than that.

Voltage divider?

10k 18k
5V----///--+--///----GND
|
A0 3.21V

ribbonman:
Thanks Paul,
So that means if I plug the signal wire into my A0 pin I won't damage the pin if I power the sensor with 5V because output Vcc max is +.3V.
I didn't see the 20ms wait time but I shouldn't have a problem with it since the project will be turned on and waiting for instructions for longer than that.

The wait time is based on the timing chart.
Paul

The absolute max Vo (of the IR output) is Vcc - 0.3V or 5 -0.3 = 4.7 HOWEVER this is a condition where the device will be damaged in somehow this pin is forced to above 4.7 V

The graph on page 4 suggests and any condition the output will not go above ~ 2.5V.

My suggestion is to put a resistor between the IR sensor and the DUE A0.

If we want to limit the "fault" current to a safe 1 mA if for some reason 5V gets to the IR output.

(5-3.3)/0.001 = approx x 2k so to be real safe put in a 5k and it will help you get stable readings if you add a 0.1µF capacitor from A0 to Ground (near the due pins).

Paul_KD7HB:
The wait time is based on the timing chart.
Paul

I looked again after you mentioned the 20ms wait time to see where you saw that and located it, so many small details on these spec sheets. I need to read them more often to get used to picking out all the details.

ribbonman:
I looked again after you mentioned the 20ms wait time to see where you saw that and located it, so many small details on these spec sheets. I need to read them more often to get used to picking out all the details.

You will with time! YOu would be surprised to know how many EE's miss something on a data sheet that impacts their project. that is why it is important to discuss the details of your project with someone else.
Paul

JohnRob:
The absolute max Vo (of the IR output) is Vcc - 0.3V or 5 -0.3 = 4.7 HOWEVER this is a condition where the device will be damaged in somehow this pin is forced to above 4.7 V

The graph on page 4 suggests and any condition the output will not go above ~ 2.5V.

My suggestion is to put a resistor between the IR sensor and the DUE A0.

If we want to limit the "fault" current to a safe 1 mA if for some reason 5V gets to the IR output.

(5-3.3)/0.001 = approx x 2k so to be real safe put in a 5k and it will help you get stable readings if you add a 0.1µF capacitor from A0 to Ground (near the due pins).

I'm not sure how the sensor would be forced above the 5V that it requires for operation(4.5V - 5.5V)?
I will add a 5K R to the signal wire(A0)
I have added a 10uf cap between Vcc and GND per the spec sheet(pg 6) but you think I should add another between Ao and GND along with that?
The only thing that I was worried about was hitting the A0 pin with 5V from the sensor.

JCA34F:
Voltage divider?

10k 18k
5V----///--+--///----GND
|
A0 3.21V

I have come across this when searching for answers but I wasn't sure if I was going to need to do that after reading the spec sheet.

ribbonman:
The only thing that I was worried about was hitting the A0 pin with 5V from the sensor.

If you believe the chart on pg. 4, that shouldn't happen. Personally I'd put more faith in the graph than the weird "output terminal voltage" in the table, which is listed as an absolute maximum rating. Having an output which rises above Vcc and below ground would be mighty peculiar.

The graph does reveal another complication: an output of 1.8v, for example, is ambiguous. It could mean a half centimeter or it could mean an inch....!
S.

srturner:
If you believe the chart on pg. 4, that shouldn't happen. Personally I'd put more faith in the graph than the weird "output terminal voltage" in the table, which is listed as an absolute maximum rating. Having an output which rises above Vcc and below ground would be mighty peculiar.

The graph does reveal another complication: an output of 1.8v, for example, is ambiguous. It could mean a half centimeter or it could mean an inch....!
S.

Those might be switching spikes that would need a good scope to see.
Paul

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.