I am working on a project where I want to fake the presence of a solenoid valve in a control unit on a car so that the control unit does not give an error message.

The output of the control unit is a 12V PWM signal with about 2 kHz. I measured the solenoid valve with an LCR meter and found a resistance of 5 ohms and an inductance of 10 mH.

I now want to simulate this solenoid valve with a simple coil. Since there are no coils with the exact inductance and DC resistance, I will use a 10 mH coil with 0.5 ohm resistance and a 4.5 ohm resistor in series.

Since I don't have any information on the ECU circuitry, I'm assuming I need a flyback diode for my inductor. Now I am not quite sure where to place it. Parallel to the coil with 0.5 ohm or parallel to the series connection of coil and resistor with 5 ohm?

The aim is that the control unit does not notice that the solenoid valve has been replaced by my coil.

I would be grateful if someone could give me an answer and a short explanation. The control unit costs 2,000€ from the manufacturer... I would be happy if it didn't go up in smoke as soon as I switched it on.

Flyback parallel to R + L Flyback parallel to L

  • \$\begingroup\$ In parallel with series circuit more closely approximates actual solenoid. Diode is unlikely to be detected in either location. Diode essential to not destroying driver if unprotected. Do ensure polarity is correct (ie as shown) \$\endgroup\$
    – Russell McMahon
    Apr 22, 2021 at 20:34
  • \$\begingroup\$ For PWM switching of selenoid (not a constant voltage drive) consider the RDC snubber instead of simple diode dissipation. The flyback voltage from coil can couse spikes feeding back to driver if the diode is not fast enough. Also dissipation to diode can couse its thermal heating if its not oversized so rather dissipate to power resistor. \$\endgroup\$
    – user208862
    Apr 22, 2021 at 21:07
  • \$\begingroup\$ "4.5 resistor in series" Would that be 4.5 ohm? \$\endgroup\$
    – winny
    Apr 23, 2021 at 14:41
  • \$\begingroup\$ @winny Oh yes, thanks. \$\endgroup\$
    – scorni
    Apr 29, 2021 at 20:31

2 Answers 2


Your top diagram is a more accurate simulation of a coil with its distributed resistance plus external Schottky diode, but the bottom one might work too and is maybe a bit safer in case of reversal (though there is no guarantee the driver would survive passing several A rather than few hundred mA).

I'm not sure why you would add a diode if you are sure there is no diode in the solenoid you are replacing, but it should do no harm.

Whatever you do, I would check and double/triple check the polarity vs. diode orientation. Then go back and check it again. I once got an axial-lead diode direct from a Taiwan factory that was working perfectly well, but marked backwards, in one of several boxes of 1,000 (discovered during failure analysis of a rare production fallout). That had to have happened after automated testing but before marking.


The first circuit is correct.

R1 and L1 in series represent the solenoid as a whole and D1 must be placed in parallel to the solenoid.

R1 must dissipate a lot of heat.

Use 4 resistors of 1 ohm that can dissipate 3 watt each, in place of R1.

I don't think the 2000 Euro circuit goes up in smoke.


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.