How to wire a 5 Pin Honeywell Open Collector Optointerrupter? - Page 1
Forum section: electronics / beginners

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: October 09, 2018, 11:26:07 pm
content: HiI am trying to use an HOA6991-T51 opto-interrupter in a project and cannot for the life of me figure out how to wire it. I've already blown one upThe problem is the datasheet (https://www.mouser.co.uk/datasheet/2/187/Pg_382-1139354.pdf) only shows the internal schematic, as opposed to how to connect it. At the moment I have it wired as per attached dreadful drawing with anything from 800-2k ohms on the supply side for the emitter, and a 10K resistor on the ground of the receiver. I have the detector line going to an oscilloscope probe.To be honest that is a mish mash of things I have found online and probably completely wrong, and I cant get it to behave as it should (high output when beam is unbroken, low when blocked). I understand there is something different about open collector type, I was confused when I bought the thingIf anyone knows how to wire it, I would be very grateful if you can help. My aim is to have the detector outputting to an arduino digital pin.Thanks!

author: ataradov
author_rank: Super Contributor
timestamp: October 09, 2018, 11:56:19 pm
content: Remove 10K from the ground on the R side and connect that 10K between the "detector" and +5V. The output will be changing between 0V and +5V.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: October 10, 2018, 10:35:15 am
content: Many thanks, worked immediately : )

author: Zero999
author_rank: Super Contributor
timestamp: October 10, 2018, 12:53:15 pm
content: Quote from: SpannersToSparks on October 10, 2018, 10:35:15 amGood, I'm glad you got it working, but will you know how to do this on a different opto-coupler?Looking at the internal schematic will give you an idea of how to connect it up. Refer to page 5 of the data sheet.https://www.mouser.co.uk/datasheet/2/187/Pg_382-1139354.pdfAll of the emitters on the left hand side are just IR LEDs, so all that's needed is a series resistor, as you've correctly figured out.The part you have ends in a 1, so has an open collector output, i.e. a single transistor which connects the output to 0V, when activated. A resistor is required to enable the output to be pulled up to 5V or whatever the desired output voltage is, which can be up to 15V. Note that the output transistor performs an inverting function and there's an inverting logic gate before it, so when the sensor is illuminated, the output will he logic level high.The other part number ending in a 3 also has an open collector output, but it has a non-inverting buffer before it, so will have the reverse logic function i.e. detector illuminated: output logic level low.Part numbers ending in 4 and 5 have the 10k pull-up resistor built-in along with a protection diode, to prevent the output voltage from exceeding the supply voltage, by more than 0.6V. Again note the inverting and non-inverting logic gates. All that's needed is the detector to be powered: no external resistor is required.Part numbers ending in 0 and 2 have totem pole outputs. Another transistor is added to pull the output voltage up and a diode drops the voltage a bit.So why have all these options?Obviously having a choice between inverting and non-inverting output can simplify the design of the logic circuit.Open collector outputs can be just connected in parallel and the one which goes low, will take the entire line low, this acting as an OR function. Again this can simplify designing the logic circuit.Sometimes having to use an external 10k pull-up is good because it can be connected to a higher or lower supply voltage, such as 12V, thus enabling it to interface with higher or lower voltage logic. On the other hand a built-in pull-up resistor can be handy to save space.The totem pole output will drop be at least two diode drops below the supply voltage, but it will be able to source more current, than an open collector output and 10k pull-up resistor. They're better at driving long cables, which will have some capacitance and the lower output voltage means they can normally drive 3.3V logic gates, with no additional components.

author: SpannersToSparks
author_rank: Regular Contributor
timestamp: October 15, 2018, 11:56:32 am
content: Wow thank you so much for the detailed reply! I will try to absorb all the info in there.I knew about the open collector part, though I was not sure what to do with that information wrt the resistors. Nice to know the diagrams in the data sheet can be deciphered too!Cheers