Electronic switch for electromagnet

AnalogKid

Joined Aug 1, 2013
11,038
In post #1, a low signal turns on the magnet. If you can reverse this logic polarity such that a high signal turns on the magnet, then all you need is an n-channel, logic-level power MOSFET (plus the diode across the coil). No resistors, no capacitors. And no 555's (inside joke).

ak
 

djsfantasi

Joined Apr 11, 2010
9,162
In post #1, a low signal turns on the magnet. If you can reverse this logic polarity such that a high signal turns on the magnet, then all you need is an n-channel, logic-level power MOSFET (plus the diode across the coil). No resistors, no capacitors. And no 555's (inside joke).

ak
Or use a 2N7000 logic level n-channel MOSFET to invert the logic and drive an n-channel logic level power MOSFET (like the one linked) to power the solenoid. This particular power MOSFET can switch up to 30V at 60A - more than enough for your needs. Yet it only needs 5V to switch on. It’s use is common with microprocessors.

Place 100Ω resistor between the APM output and the 2N7000 gate, with a 10kΩ resistor from the 2N7000 gate to ground. The 2N7000 source pin connects directly to ground.

The drain of the 2N7000 connects to the gate of the power MOSFET and via another 10kΩ resistor to the 5V supply.

Then, the source of the power MOSFET connects to ground and the drain of the power MOSFET connects to your solenoid and diode.

With low signal from the APM, the solenoid is activated. A high signal from the APM de-activates the solenoid.
 

Thread Starter

EduardoBat

Joined Jul 16, 2019
29
Or use a 2N7000 logic level n-channel MOSFET to invert the logic and drive an n-channel logic level power MOSFET (like the one linked) to power the solenoid. This particular power MOSFET can switch up to 30V at 60A - more than enough for your needs. Yet it only needs 5V to switch on. It’s use is common with microprocessors.

Place 100Ω resistor between the APM output and the 2N7000 gate, with a 10kΩ resistor from the 2N7000 gate to ground. The 2N7000 source pin connects directly to ground.

The drain of the 2N7000 connects to the gate of the power MOSFET and via another 10kΩ resistor to the 5V supply.

Then, the source of the power MOSFET connects to grou nd and the drain of the power MOSFET connects to your solenoid and diode.

With low signal from the APM, the solenoid is activated. A high signal from the APM de-activates the solenoid.
Like this?
like this.jpg
 

djsfantasi

Joined Apr 11, 2010
9,162
The second 10k resistor (drawn above the 2N7000) is wrong. It should go to the 5V supply of the APM. Not to the signal. It’s purpose is to pull up the gate of the Power MOSFET when the 2N7000 isn’t connecting the gate to ground.

Thanks for drawing that out. I’m away from my laptop and haven’t figured out how to draw schematics on my iPhone.
 

djsfantasi

Joined Apr 11, 2010
9,162
UPDATE: You have many ideas presented to you. I’ll try to summarize them.
  • A solution using MOSFETs is a preferred solution, as using BJT transistors requires more complex calculations.
  • You can switch either the positive voltage (high side) or the ground connection.
  • Switching the high side is done with p-channel MOSFETs; n-channel MOSFETs switch the low side.
  • You can use a daisy-chained MOSFET to invert the logic.
 
Last edited:

Thread Starter

EduardoBat

Joined Jul 16, 2019
29
The second 10k resistor (drawn above the 2N7000) is wrong. It should go to the 5V supply of the APM. Not to the signal. It’s purpose is to pull up the gate of the Power MOSFET when the 2N7000 isn’t connecting the gate to ground.

Thanks for drawing that out. I’m away from my laptop and haven’t figured out how to draw schematics on my iPhone.
So, like this? (Can I connect this to a 5 V BEC output? I mean, can it be connected to any constant source or need to be in the APM suply?)

Thank you for the help so far.

new.jpg
 
Top