1
\$\begingroup\$

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 !

\$\endgroup\$
3
  • 1
    \$\begingroup\$ If you are using a microcontroller pin as your second "input" you can safely connect it to the collector of photo-interrupter. The current drawn by the microcontroller should be very little and almost zero if the chip is a CMOS. You don't need an emitter follower. \$\endgroup\$
    – Ali
    Nov 19, 2015 at 3:20
  • 1
    \$\begingroup\$ As long as your circuit has sufficiently high input impedance, it should not affect the operation of the other circuit. \$\endgroup\$ Nov 19, 2015 at 7:59
  • \$\begingroup\$ Thanks @Ali and Robert. Glad to hear that just connecting both inputs to the connector will be fine in my case. \$\endgroup\$ Nov 20, 2015 at 12:02

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.