Page 1 of 1

GP2Y0A21 General purpos distance measuring sensor

PostPosted: Sat Dec 12, 2009 6:44 am
by Light
Hi
recently i ordered the GP2Y0A21YK infrared sensor from Cytron website. i need it to detect objects and get an output that varies from 0V to 5V.
i tried to connect the sensor directly to power supply without amplifier circuit, but it didnt work it keep giving me a value of 0.2V without changing.
i went through datasheet but couldnt find something that might help me.
does it need an amplifier circuit ? if yes please show me how the suitable amplifier circuit looks like.

thank you

Re: GP2Y0A21 General purpos distance measuring sensor

PostPosted: Sat Dec 12, 2009 12:14 pm
by sich
There's no need a amplifier circuit for normal usage. The analog value that GP2Y0A21YK gives is stated in the user's manual page 3, figure 5. The max value you'll get is up to ~3V only, not 5V.

Try to check your connection by referring to the user's manual. Don't follow the color of the wire provided in the package. The colors are not following the normal color code.

Re: GP2Y0A21 General purpos distance measuring sensor

PostPosted: Sat Dec 12, 2009 3:38 pm
by Light
im sure that the connection is correct referring to the first drawing at the page 1.
maybe the problem is with the powering, im using an input of 5V- 1A, the max. current rating is 50mA, so i used a 330 ohm resistor to be connected before the source.

please do advice me

thank you

Re: GP2Y0A21 General purpos distance measuring sensor

PostPosted: Mon Dec 14, 2009 12:33 pm
by robosang
Light WROTE:maybe the problem is with the powering, im using an input of 5V- 1A, the max. current rating is 50mA, so i used a 330 ohm resistor to be connected before the source.


I am sure you are using the wrong interface to power it. Just connect directly from the regulator to sensor, no resistor is necessary between those connection.

Most of user does not understand voltage and current. current depend on load, not the source. If I have a battery, it can provide 7A or higher, can I connect to a resistor that consume 1A? Can, why? the battery can provide 7A, not that it must provide 7A, OK? So although your load (in this case) sensor will use 50mA, it can still be connected directly to the regulator that can provide 1A.

Another question, you connect a 330 Ohm resistor in between, where do you get the value of 330ohm to get 50mA?