0
\$\begingroup\$

I'm a pretty accomplished programmer, but working directly with electricity is giving me the fits.

I'm trying to replicate a design that switches a 12v/300ma solenoid based on a GPIO signal from a Raspberry Pi. The design suggests a TIP120 "darlington" transistor to accomplish this task, but no way that I hook it up seems to actuate the solenoid.

I've actually removed the RPi from the design and am trying to just jump wires to practice.

schematic

simulate this circuit – Schematic created using CircuitLab

I read somewhere about an issue with the TIP120 where there is too much voltage loss resulting in the case where the solenoid doesn't have enough juice to fire.

I read that I should try replacing the TIP120 MOSFET NDP6020, so I gave that a shot, but the solenoid is triggering even when there's no source signal!

I believe that it's quite possible that I'm an idiot, so I actually set up a dummy circuit using 3.3v LEDs. Using those LEDs, I was able to get the TIP120 to work (kinda - the voltage loss was evident in the brightness of the LED), but not the NDP6020.

And yes, I tried with multiple units, in case one was DOA or I accidentally burnt it out.

What have I missed? I'm stumped.

\$\endgroup\$
4
  • 9
    \$\begingroup\$ move the solenoid to the high side of the darlington \$\endgroup\$
    – jsotola
    Jul 18, 2019 at 1:08
  • 3
    \$\begingroup\$ Paul, the TIP120 will require a small-valued resistor (try one thousand Ohms to start to provide a couple mA or so) between your signal and its base. (Yes, I know it is a Darlington.) Also, you should move the solenoid to the collector side and instead directly tie the emitter to the shared (-) wire (ground or common.) And finally, you should be aware that the TIP120 will drop the voltage applied to the solenoid to perhaps 10.5 V (maybe 11 V if very lucky.) Most solenoids activate with only 70% of their rated voltage, so that's probably okay. \$\endgroup\$
    – jonk
    Jul 18, 2019 at 1:21
  • 2
    \$\begingroup\$ Thanks both! That seemed to work just fine. Convert to an answer so I can accept. \$\endgroup\$ Jul 18, 2019 at 1:28
  • \$\begingroup\$ See my answer to this question: electronics.stackexchange.com/questions/180166/… \$\endgroup\$
    – user57037
    Jul 18, 2019 at 6:37

1 Answer 1

1
\$\begingroup\$

Did anyone tell you to move the transistor to the low side yet? ;-).

And, add a resistor to the base drive - 2k maybe should do it. It doesn’t take much base current to saturate a Darlington like a TIP120, which has a current gain (hfe) of about 1000.

When fully on, the transistor will have a small collector-to-emitter voltage, Vce, of about 2V for TIP120. Not enough to make a difference really.

You could use an N-FET too (on the low side) but make sure its threshold voltage (Vgs(th)) is low enough that it will be fully on with at 3.3V at the gate. This kind of FET is sometimes called a ‘logic level’ FET. This one would work: https://www.mouser.com/datasheet/2/308/FQP30N06L-1306227.pdf

Finally, add a reverse-biased freewheeling diode across the coil to catch the coil’s flyback spike when the switch turns off.

\$\endgroup\$
2
  • \$\begingroup\$ So, is that the 1n4001 diode that's in the design that, if I understand the diagram correctly (I may not) allows residual e- to flow from the negative to the positive? I couldn't figure out why that's needed - when it's off, there shouldn't be any charge on the negative, and certainly not enough e- pressure to cause flow back to the positive ... or am I totally missing something fundamental? \$\endgroup\$ Jul 20, 2019 at 0:14
  • \$\begingroup\$ Is the FET you reference a drop-in replacement (i.e. should have the same pinout characteristics)? I have that FET but for some reason wasn't able to get it working reliably (may have something to do with the fact I did not yet put a resistor on the base, or the solenoid was on the high side or something). \$\endgroup\$ Jul 20, 2019 at 0:20

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.