How to use same ‘input’ for two circuits

opto-isolatorphototransistortransistors

First of all, please excuse my complete lack of knowledge in electronics 🙂

Let's start with a little bit of context. I am trying to modify a machine that already uses a photo-interrupter to measure distance and speed. My goal is to be able to 'read' the state of the photo-interrupter while letting the original circuit work as intended.

Here is the original circuit, simplified to the extreme. Basically, 'Input' is directly fed to a PIC micro-controller. To be completely honest, I haven't been able to figure out much more by staring at its PCB…

original circuit

My first thought was to just plug both circuits inputs to the collector pin of the photo-interrupter. I would then power the photo transistor by either power source (both 3.3V) and connect grounds. My circuit's 'input' is an input pit of a micro-controller as well.

both plugged on collector

Another possibility I thought of: using a emitter follower circuit so that, if I understand correctly, both circuits would be able to draw current from their respective power sources. Only issue I have is the voltage drop due to the emitter follower.

with emitter follower

My question:

Experimentally, both solutions seem to more or less work, but given my lack of knowledge in the field, I would very much appreciate any comment on what is the 'right' solution.

Should I completely isolate both circuits ? With an optocoupler, for example.

What are the shortcomings of my simplified solutions ?

Thanks !

Best Answer

Your assumptions seem correct. However, just make sure:

1) The voltage of the power supply is the same on the input and output of the optocoupler, it could be different and could cause trouble. (I'm assuming it is based on your drawing)

2) The resistors you use, limit the current accordingly.

3) You can go for the first option, but you need to place a resistor (try 10 kilohms or higher) from the colector at the output of the optocoupler to the PIC pin input. This will prevent your PIC becoming a load and provoking malfunctions like false triggering or not working at all, etc. of the external circuit (Again I'm assuming the voltages are within the specs of the devices, if not place another optocoupler)

4) The other option you thought, can be made but, you resistor on the optocoupler probably will have to be changed. In that configuration, your signal would be inverted (when opto is off the external circuit will be on and vice-versa, if that's what you need then it's ok). And finally, you should also need to calculate the emitter resistor on that BJT transistor. Hence, this could be a more complicated solution.