Is there a bootstrap circuit or H-bridge design so that a coil can be energized in one mode (e.g. with an NPN transistor and flyback diode), or sense a changing external magnetic field in another mode (e.g. with a divider network)?
Arduino: A low-frequency PWM drives the coil; an analog-in reads a changing voltage.
I can individually drive a coil with the classic NPN/flyback, and can sense voltage with a 5V bias and resistor-divider network, but how to combine them in one circuit? I'm sure there is a prototypical circuit out there with some EN_SENSE line, for example.
Among friends, let's use the 5V rail and a low-current coil of a few mH under 1A. Again, just looking for a bootstrapping circuit for this; individual values can be researched/tweaked in a simulator by the OP (me) later.
Update: This is what I tried which kind of works: When I drive the coil with A, I get the waveform below; when I drive the coil with B, I do get a similar waveform, but more boxy. Actually, I can drive and sense at the same time with this. Huh.
But again, I'm looking for a classic/bootstrap/historic circuit that can drive and/or sense the coil.
I also tried simulating optocouplers with the same A/B switches as above. It kind of works as well, as a stronger voltage on the coil produces a stronger photodiode voltage (and yes, some op-amps are omitted for simplicity).