Page 1 of 1

Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Sat Apr 21, 2012 12:55 pm
by Donkey
Hi guys,

I bought a GP1A57HRJ00F photo interrupter and now I want to connect it to my Arduino, but my problem is that I didn’t buy the breakout board (BOB-09322) which makes it hard for me to figure out how to connect this the right way to the arduino since I can’t read data sheets, and I kind of need to do it till Monday for a small project. So if one of you has one of these and maybe could show me a picture of how you connected it on a breadboard and to the Arduino, something very simple, I will be very thank full, as I am an amateur at this…

Best regards,
The Donkey

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Wed May 02, 2012 7:34 am
by fll-freak
If you plan on doing electronics, you need to learn to read a data sheet. You can find it here: http://www.sparkfun.com/datasheets/Comp ... HRJ00F.pdf
You can find a tutorial on how to read a datasheet in the Sparkfun tutorial section.

On page two you will see the internal schematic. One set of pins if for the LED and the other for the transistor used as a switch.

Pin 1 will go to 5V.
Pin 2 will go to a resistor.
The other end of that resistor goes to ground.
From the table on page 4, you will see the forward voltage is about 1.14V at 7ma. That means the resistor need to be (5-1.14)/(.007) or 551 ohms. But since the LED can go up to as much as 50ma a standard 330 ohm resistor should do just fine.

Now the transistor side is even simpler.
Pin 3 goes to 5V
Pin 5 goes to ground
Pin 4 goes to a digital input pin on the Arduino.

Edit: Deadline has come and gone and no reply from OP. Why does this continue to surprise me...?
Edit: Any news on this? I hate threads that just end without resolution...

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Wed May 02, 2012 9:49 am
by Philba
maybe he got some one to do his class assignment for him.

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Wed Sep 04, 2013 7:26 pm
by armaan
Hey, just wanted to pop on and thank you fil-freak writing this post. Perhaps OP didn't get anything out of it, but as someone new to reading datasheets, I found it useful. :-)

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Thu Sep 05, 2013 12:18 pm
by fll-freak
Glad someone did. Sometimes I think I write these answers for my own amusement. Now at least I know someone else got something out of my labor.

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Thu Jan 23, 2014 12:48 pm
by mp88
Hey fll, so ive got a project that requires me to design a linear slide that can go to a position, wait for a few seconds and return to its original location. To make it simple, I decided to go with a belt driven IGUS linear slide using a stepper. I want to use the photo interrupter mentioned as a limit switch for the two locations I need to slide to go and from. I've got both the stepper and photo interrupter working independently using Arduino UNO but I am having difficulty coding the combination. Any coding tips...or atleast a starting point?

Thanks,
Matt

Re: Amateur in trouble with GP1A57HRJ00F photo interrupter

Posted: Sat Jan 25, 2014 1:21 pm
by Mee_n_Mac
Post your code(s).

{click on below)
CodeButtonTags.jpg