¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Photo-interrupter signaling two different AVRs - is it okay?


 

Hi Guys,

I will be needing to take one "output" from a photo interrupter
switch and connect that signal to two different AVRs as inputs. I
am not sure if it is okay to do that or not. Here is my initial
plan....

Photo-interrupter that will pull a signal to ground.

AVR inputs both pulled high with 10K resistors.

The signal for the photointerrupter is wired to the two different
AVR chips (their inputs).

When photointerrupter is made, it pulls the signal to ground, the
AVR see this change in state at both AVRs.

For some reason, I am thinking this shouldn't work, but don't know
why. It would seem to me that the amount of current is very low and
the photo interrupter should handle switching these tiny signal to
low and high without worry.

Aside from the above concept, is there a certain type of
photointerrupter I should select (type of control it has - there are
many types).

If it helps, this photointerrupter will be used as a tachometer
input from a spindle rotating at around 18,000 RPM.

Thanks guys!

Chris


 

--- In Electronics_101@..., "lcdpublishing"
<lcdpublishing@...> wrote:

Hi Guys,

I will be needing to take one "output" from a photo interrupter
switch and connect that signal to two different AVRs as inputs. I
am not sure if it is okay to do that or not. Here is my initial
plan....

Photo-interrupter that will pull a signal to ground.

AVR inputs both pulled high with 10K resistors.
No reason it shouldn't work EXCEPT that you now have 2 10k resistors
in parallel so the load is 5k. SOME photo interrupters don't have the
ability to sink much current. If you see on a scope that the signal
doesn't come close to 0V then dump one of the resistors.

The pullup is associated with the interrupter, not the AVR pins. A
single resistor is fine.

Just be darned certain that you don't define both AVR pins as outputs
and set them to opposite states.

You could put 330 ohm resistors in series with the input pins to
protect the chips from each other in the event they were defined as
outputs.

Richard


 

Richard, good advice! You know me all to well!

Yes, I see what you are saying about the 2 10Ks. I also see what you
are saying about the inputs/outputs. I thought for sure I wouldn't
make that mistake, and have already made it - Twice. No smoke, just
problems :-(

Thanks
CHris


--- In Electronics_101@..., "rtstofer" <rstofer@...>
wrote:

--- In Electronics_101@..., "lcdpublishing"
<lcdpublishing@> wrote:

Hi Guys,

I will be needing to take one "output" from a photo interrupter
switch and connect that signal to two different AVRs as inputs.
I
am not sure if it is okay to do that or not. Here is my initial
plan....

Photo-interrupter that will pull a signal to ground.

AVR inputs both pulled high with 10K resistors.
No reason it shouldn't work EXCEPT that you now have 2 10k
resistors
in parallel so the load is 5k. SOME photo interrupters don't have
the
ability to sink much current. If you see on a scope that the
signal
doesn't come close to 0V then dump one of the resistors.

The pullup is associated with the interrupter, not the AVR pins. A
single resistor is fine.

Just be darned certain that you don't define both AVR pins as
outputs
and set them to opposite states.

You could put 330 ohm resistors in series with the input pins to
protect the chips from each other in the event they were defined as
outputs.

Richard