0
\$\begingroup\$

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.

enter image description here

enter image description here

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).

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Just for clarification: Do you want sensing inside the off periods of the PWM or just when PWM is inactive? Do you need bidirectonal sensing / moving in both directions? \$\endgroup\$
    – Jens
    Commented Jun 19, 2022 at 21:44
  • \$\begingroup\$ Completely separate from each other, so when PWM is fully off and not pulsing the coil can be in sense mode - no need to measure its own back EMF, if that is what you are asking. \$\endgroup\$
    – Drakes
    Commented Jun 19, 2022 at 21:46
  • \$\begingroup\$ Yes, I wanted to exclude this interesting but complex approach \$\endgroup\$
    – Jens
    Commented Jun 19, 2022 at 21:49
  • \$\begingroup\$ In the 3rd simulation there is no supply and no load resistor at the output side of the couplers. So, I think, the scope shows only a mix of a bit photovoltaic voltage and the capacitive feedthrough of a high voltage gradient at the collector of Q1. \$\endgroup\$
    – Jens
    Commented Jun 22, 2022 at 0:53

1 Answer 1

4
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

This is a typical PWM drive for a relay or valve, but the catch diode D1 can be decoupled from the coil by M2 and M3.

During PWM the signal PWM_EN must be high to enable D1. During sensing PWM_ENAB is low and PWM_IN is static high to force one end of the coil to GND.

The other coil connection is isolated and can swing bidirectional around GND.

The instumentation amplifier must be specified according to voltage ranges. A gain of 1 or even less is useful.

A tradeoff is the capacitive load of M2 and M3 in the off state, a noisy 12 V supply can reach IN-. A filter at the INA inputs may be necessary anyway.

Low cost version with lower precision:

schematic

The voltage swing of the coil during sensing is relative to V1. This allows to remove one PFET.

\$\endgroup\$
4
  • \$\begingroup\$ Can't tell if you are a genius or insane. This is pretty cool. But, is it the simplest bootstrap circuit? I tried to run your sim, but the daily trial limit was hit, so I switched over to SPICE, and thought, "wait a minute? why can't we just use a voltage divider with some protection?" What are your thoughts? (I need a bootstrap, in case you are curious, because I my have to replicate this for 12 coils!). \$\endgroup\$
    – Drakes
    Commented Jun 21, 2022 at 20:18
  • \$\begingroup\$ Well, during PWM we need the diode D1 for current decay, but during sensing this diode would cut away one half of the signal, assumed you want to see both. So M3 disconnects the diode during sensing (except some pF load). I tried the first version in the simulator and the second I built in hardware to be sure. \$\endgroup\$
    – Jens
    Commented Jun 21, 2022 at 22:27
  • \$\begingroup\$ @Drakes The schematics in your update do not catch the high voltage back EMF of the inductor. Is this intended? Because it is unusual for PWM controlled linear solenoids and you need high voltage capable driving MOSFETs. \$\endgroup\$
    – Jens
    Commented Jun 21, 2022 at 23:51
  • \$\begingroup\$ Not sure why this was migrated from Arduino, but we’re talking 5V and a 6mH inductor (literally a coil). I figure one optocoupler would serve as a fly back diode, and the voltage divider suppresses those ‘KV spikes’ (that I’m not even observing in my sims because the coil is so small). You are likely an expert; I’m hoping this bootstrap circuit can be so simple for Arduino projects where precision isn’t critical. \$\endgroup\$
    – Drakes
    Commented Jun 22, 2022 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.