I have a circuit where I need to switch an external relay via an optocoupler. It would be really convenient if I only had to connect relay low and ground as shown in the schematic:
In this case the relay would have +24V from another source and the opto would open the low side path.
If this were the case, I wouldn't have access to the high side of the relay to put a flyback diode. I know many relays (particularly the DIN mount relays which I am targeting) have internal flyback diodes, but I want to ensure you can never damage the opto.
The first thing that comes to mind is adding a zener diode across the collector and emitter of the transistor. However, in my simulations, the current is much higher than the typical flyback configuration. I've also never seen this configuration before, and a cursory google search has come up empty handed on other techniques.
Any advice? Thanks in advance.