Sensing solenoid valve activity

I'm looking to do 2 projects that sense solenoid valves in a separate system, specifically 12v automotive shift solenoids & fuel injectors. They are low-side switched with mosfets or transistors. The big problem is the inductive spike when they turn off & I'm not sure what hardware to use.

A primary requirement is I can only tap into the solenoid power wires. I can't tap into the logic level nor can I use anything that senses the magnetic field; CAN-Bus data isn't present. For one project the frequency is sub-Hz so I can use simple signal relays in parallel. The other will be as high as 7000 Hz (batch-fire EFI) or 8.5 milliseconds, so I'm thinking optocouplers?

I'm just not sure how I would protect it properly from the inductive spike, aside from a flyback diode on the solenoid. For the circuit I'd imagine the optocoupler could be used similar to this:

That sparc, as You call it, can generate very high voltages that can can kill any piece if electronics. However the cure is cheao and simple, udef for all inductive liads. That's a "kick back" diode that short curcuit the cause of the sparc. Know the direction of the current when the solenoif is powered. Then know that the diode should conduct, let that current to continue to flow through the diode when the transistor shuts off.

For sensing the voltage a voltage divider is required. Then I'd put the diode into the low-voltage branch, not over the inductive load itself.

The use of opto couplers is a good idea in any contact with foreign circuits.

They are low-side switched with mosfets or transistors.

What protects the transistors that are switching them?

This won't be for a specific application but the target EFI systems use transistors with built-in snubber diodes or mosfets with internal or external diodes. I just wasn't sure if it would somehow damage the LED, or if there was a better method. My other idea was to use the gate of a mosfet but it seemed to kill it the first time the solenoid turned off.

Now that I think of it, I could test the idea with a normal LED. If it lives with the correct current-limiting resistor, I should be good.

This situation is where you need to have an oscilloscope to actually see the switched signal.

Tom...... :slight_smile: