Pages: [1]   Go Down
Author Topic: How to connect IR sensor  (Read 2536 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have just started to use arduino as an interface to max/msp with Arduino2Max. Can someoneplease give me tips on how to connect an IR sensor to the arduino board. The tutorial in the playground says i need two resistors but i dont know how to wire they together with the sensor and the arduino board.

The IR Sensor i have are an Sharp 2YOA2I

I have successfully connected photo resistors to the arduino and recieved signals in max/msp, so i know that the connection between arduino and max/msp works.

Thanks in advance!

/ Per
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A quick google didnt exactly pull up much about your sensor so i dont really know what youre working with.

If its a sensor with built in demodulation and what not there should be 3 pins.  power, gnd, and signal out which is probably active low.

I am using a Vishay TSOP11 series ir sensor for my project
http://www.rentron.com/Files/TSOP11xx.pdf
In my case, pin 1 is ground, 2 is +5v and 3 for signal direct to arduino.
You dont REALLY need the cap or resistor, but you should have them anyway.

I can also put you onto a library for the arduino to read the ir sensor if you need it.

hope some of that helps!
Logged

Lacomb, Oregon
Offline Offline
Sr. Member
****
Karma: 0
Posts: 302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is some info
Logged

Stephen

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah, a proximity sensor.
Still, things will be much the same.

Shame that website isnt doling out the datasheet which would be immesely helpful to you most likely. Check it out.
http://www.acroname.com/robotics/parts/gp2y0a21yk_e.pdf

But going from that website you gave and cable colours, the red will likely need 5V, ground the black, and then connect the yellow to an analog pin (0-5), and thats it.

Sensor reports an analog value based on distance observed to the analog pin (on the yellow wire). Too easy.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for fast answers!

Yes it´s a proximity sensor. When connecting it like you mentioned Gav, it gives values around 576 (+-10) no matter what distance i have. Hmm, what is it that i am doing wrong here?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, id check the pinout from the actual datasheet, make sure your connecting things the right way.

second, you said your interfacing with computer software.
try just using an analogread on the arduino and spitting it our via serial, you know, just to eliminate possible sources of error.
Logged

Pages: [1]   Go Up
Jump to: