What am I doing wrong with this photointerrupter device?  TT Electronics OPB616 - Page 1
Forum section: electronics / projects

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 18, 2018, 09:37:52 pm
content: I'm attempting to get a photointerrupter working for my circuit. The specific device is a TT Electronics OPB616, with a buffered open-collector output (datasheet:http://www.ttelectronics.com/sites/default/files/download-files/OPB615-625-665-Series.pdf). My circuit is as follows:Pin 1, anode for the IR LED, is connected to 5VDC.Pin 2, cathode for the IR LED, is connected to a 390 ohm resistor, and then the resistor is connected to ground. This gives me just under 10mA of current through the IR LED.Pin 3 is connected to the same 5V supply through a 10k resistor.Pin 4 is hooked up to an oscilloscope, so I can see how the output pin on the device changes.Pin 5 is connected to ground.Without anything in the slot of the device, the output is equivalent to ground. When I pass a piece of paper through the slot, the output doesn't change; presumably, it would go high when something is blocking the beam.I have double-checked the two resistor values, so I know that those are accurate (certainly within tolerances). I've used my phone camera to check that the IR LED is actually getting power - it's very faint, but I can certainly see a change between when the IR LED is hooked up to power and when it isn't. What gives?

author: StillTrying
author_rank: Super Contributor
timestamp: February 18, 2018, 10:24:21 pm
content: I've not looked at the data sheet.Paper could be too thin to block the IR, try card.A mobile phone camera usually sees IR very well.You could simulate the beam being broken by removing power to the LED to see if the 10k output changes.

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 18, 2018, 10:28:55 pm
content: I did test removing power to the LED side of things and it didn't cause any change in the output, unfortunately.

author: StillTrying
author_rank: Super Contributor
timestamp: February 18, 2018, 10:37:11 pm
content: After a very quick look at page 2 of the data sheet, it looks like you haven't got its amp powered ?

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 18, 2018, 10:45:41 pm
content: There's only five pins on the device overall, and I've verified that they're all connected to the appropriate supplies. I don't understand what you mean...

author: StillTrying
author_rank: Super Contributor
timestamp: February 18, 2018, 10:55:21 pm
content: Where's VCC connected?

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 18, 2018, 10:59:26 pm
content: The pinout diagram on the same page as that diagram says that Pin 3 on the device is VCC, which I have connected to the same 5VDC source as the IR LED through a 10k resistor.

author: StillTrying
author_rank: Super Contributor
timestamp: February 18, 2018, 11:06:27 pm
content: Pin3, VCC has to go directly to the +4.5 to 16V to power it.The 10k pull up goes between Pin3 (VCC), and 4 (output).

author: floobydust
author_rank: Super Contributor
timestamp: February 18, 2018, 11:06:48 pm
content: Paper doesn't block IR very well, use a piece of metal as a flag or disconnect the IR LED to see if the amplifier's output goes high.Note these sensors can also pick up ambient light. Sunlight or pulsing fluorescent/CCFL or LED bulbs can make unexpected pulses.

author: Phoenix
author_rank: Frequent Contributor
timestamp: February 18, 2018, 11:07:49 pm
content: Pin 3 Vcc should be DIRECTLY connected to 5VPin 4 Output should be connected to 5V though a 10k pull up resistorPin 5 Gnd should be directly connected to GND

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 18, 2018, 11:09:15 pm
content: Quote from: floobydust on February 18, 2018, 11:06:48 pmI am working in an area lit with CFLs, but I still didn't see any outputs. That may be due to:Quote from: StillTrying on February 18, 2018, 11:06:27 pmQuote from: Phoenix on February 18, 2018, 11:07:49 pm...which I'll have to correct later, as I'm working on other assignments right now. I'll report back with my findings.

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 19, 2018, 05:54:12 pm
content: Changing the pullup resistor as prescribed seems to have worked. As predicted, the scrap of paper I was using didn't work to trigger the sensor; however, my house keys worked just fine.My plan is to 3D print a disk with the appropriate slots for my intended use, and I'm reasonably confident that that will work to trigger the sensor as it is much more opaque!

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 19, 2018, 06:02:40 pm
content: Watch out- a lot of plastics that look black and opaque pass IR with no problem at all. It needs a solid pigment, usually not a dye.

author: Phoxtane
author_rank: Regular Contributor
timestamp: February 25, 2018, 09:22:49 pm
content: Quote from: Conrad Hoffman on February 19, 2018, 06:02:40 pmMy plan is to use gray PLA from AMZ3D, but I'll make a test blank before committing to anything.