Hi
I need to a teensy to emulate a pressing a button from normaly open to close. The "other side" has at least 5V and maybe spikes to a 20V or so. Ground will be different from teensy ground (different power supply).
I'm thinking of using a pc817 optocoupler input fed by a teensy digital out 3.3V and about 4mA (with a calculated resistor) going to teensy ground.
I would add a resistor in series to the output side off the opto- coupler to limit the current to a safe value (a bit of experimentation from high to low resistor values).
Is this a reasonable way of doing such a thing?
I need to a teensy to emulate a pressing a button from normaly open to close. The "other side" has at least 5V and maybe spikes to a 20V or so. Ground will be different from teensy ground (different power supply).
I'm thinking of using a pc817 optocoupler input fed by a teensy digital out 3.3V and about 4mA (with a calculated resistor) going to teensy ground.
I would add a resistor in series to the output side off the opto- coupler to limit the current to a safe value (a bit of experimentation from high to low resistor values).
Is this a reasonable way of doing such a thing?