hi,
im trying to use a 5 pin photo interputer from sharp https://cdn.shopify.com/s/files/1/0174/1800/files/GP1A57HRJ00F.pdf?18219427927998845302
ive found loads of hook up guides for 4 pin interupters but nothing for this one.
the pinout is:
1 Led +
2 Led -
3 Vcc
4 Vo
5 Gnd
ive got it hooked up with 3v to pins 1 and 3 with a 150ohm resistor, 2 and 5 to ground and 3 to A0 on my arduino, however i cant get any sort of change on pin 3 when i place an object between the light gate - i just get a constant 1.8v.
does anyone have any experience of using these?
many thanks
ive got it hooked up with 3v to pins 1 and 3 with a 150ohm resistor
You've got a 150 ohm resistor between the 3.3V and pin 3?
lavericklavericklaverick:
ive got it hooked up with 3v to pins 1 and 3 with a 150ohm resistor,
That sounds wrong.
There should be a resistor in series with the LED, but the 3.3V has to go straight to pin 3 to power the sensor.
The LED forward voltage is typically 1.14 volts with a forward current of 7 mA. Pin 1 is the Anode and Pin 2 the cathode. So with that in mind and assuming Vsupply of 3.3 volts I see 3.3 Vsupply - 1.14 Vled / 0.007 Ifwd LED = 308 Ohms so put a 300 Ohm resistor in series with your LED supply. Matters not Anode or Cathode side.
The device has an internal pull up so apply 3.3 volts to pin 3 and Ground is pin 5. Take your output off pin 4.You can tie pins 2 & 5 together if you place your 300 Ohm series resistor on pin 1 to Vcc.
If you powered this less a series LED resistor there is a possibility the LED is toast.
Ron
update:
fixed it! the vcc required 5vin. all sorted!