0
\$\begingroup\$

I am trying to switch 20 solenoids at 12 V and 2.8 A from a microcontroller. This is the first time I am trying such a thing. And right now I am planning to use a IO expander to get enough pins and switch with a MOSFET. But do I really need a MOSFET for every solenoid? This is not very economical and room friendly.

I need one solenoid to switch on every time one of the other 19 solenoids goes active. The other solenoids need to be turned off and on independently. The 19 independent solenoids don't need to be activated at the same time, it would nice however (I don't know if this adds a lot of complexity).

I am using the following components:

  • MCP23016 (IO-expander)
  • IRF530 (MOSFET)
  • Arduino Nano

schematic

simulate this circuit – Schematic created using CircuitLab

Maybe there is a trick, that I don't now about? Otherwise I need to use 20 MOSFETs.

\$\endgroup\$
7
  • \$\begingroup\$ You can usually use parts such as quad or octet packages with multiple MOSFET channels in one IC. Browse for "high/low side drivers". Pick something that's logic level friendly as well. \$\endgroup\$
    – Lundin
    Commented Nov 25, 2022 at 10:46
  • 1
    \$\begingroup\$ Hello and welcome. Do the solenoids have to be on at the same time? One at a time? Is there any pattern for that? 56 A if they're all on at the same time. Will your PSU cope well with 672 W? \$\endgroup\$
    – jonathanjo
    Commented Nov 25, 2022 at 10:46
  • \$\begingroup\$ There is one solenoid that needs to be active every time another one is active. the other 19 solenoids don't need to be on at the same time. if it doesn't at a lot of complexity it would be nice to be able to do that. \$\endgroup\$
    – tijnvr
    Commented Nov 25, 2022 at 10:52
  • \$\begingroup\$ Have you mitigated the risk of a SW bug damaging the circuit if more than one solenoid driven at once? \$\endgroup\$
    – Ralph
    Commented Nov 25, 2022 at 11:01
  • \$\begingroup\$ A very warm welcome to the site. You could switch all the solenoids with one big MOSFET. So how many MOSFETs you need comes from how many groups of solenoids need to be switched individually, where a group is 1..20 solenoids. Please can you edit your question to add that information (don't add it in comments). Thanks. \$\endgroup\$
    – TonyM
    Commented Nov 25, 2022 at 11:06

2 Answers 2

2
\$\begingroup\$

The IRF530 is a poor choice and, ON-SEMI reports that it is obsolete. It has an on-resistance of typically 0.1 Ω when activated from a 10 volt on the gate. It's unlikely that an IO expander will produce a 10 volt drive voltage to the MOSFET gate i.e. it will be more like 5 volts. With a 5 volt gate drive and 2.8 amps drain current, the on-resistance is going to be close to 1 Ω and will drop 2 to 3 volts across it when activated. This means that the solenoids will only be receiving 9 or 10 volts and the MOSFETs will be dissipating maybe 6 to 8 watts. The MOSFET will need a heatsink to cope with that dissipation.

So, pick a much more appropriate MOSFET that might have an on-resistance of less than (say) 30 mΩ when activated with a 5 volt gate drive voltage. Of course, if your IO expander is only powered from 3.3 volt logic, then it's even more problematic. I'm sure there are MOSFETs that can adequately deal with this but, your design would be limiting the possibilities.

But do I really need a MOSFET for every solenoid?

Regarding the number of MOSFETs needed, if you wish to control 19 independently then, you'll need 19 MOSFETs. It's as simple as that. I'd go for SMD MOSFETs (that are appropriately rated) and choose ones that might fit the profile you require. I don't think there'll be many SOT-23 devices that can handle the job but, I expect there'll be some DPAK devices that can do what you want.

\$\endgroup\$
1
\$\begingroup\$

If these were lower current loads you could use power shift registers like TPIC6C596 to drive eight with one chip, but at 2.8A it will be difficult to find multichannel chips that can do the job. So I guess you really need one MOSFET per solenoid.

You could use dual MOSFETs to use less space and halve the number of parts, and it will probably be cheaper than single MOSFETs too. These dual MOSFETs exist in a variety of SMD packages, the easiest to handle is SO-8.

In any case, you should read Andy's answer and pick MOSFETs offering low enough RdsON at 5V Vgs that they don't need any heat sinking. For example, with 25 mOhm RdsON, you'll get 0.225W dissipation at 3A, which is absolutely fine for a cheap SO-8 dual MOSFET. Since you don't need fast switching, you can ignore gate charge and only focus on RdsON @ Vgs=4.5V, and cost.

An IO expander, or a 74HCT595 shift register, both make fine and cheap MOSFET drivers if you don't need the beefy gate current from a dedicated driver to reach sub-µs switching time.

It will probably be easier to find 5V gate drive FETs than 3V3, so if your micro runs on 3V3 the expander/shiftreg can also double as voltage translator.

However, if you only need one solenoid active at any given time, you can multiplex them like we do with LEDs. Here's a schematic stolen from lednique:

enter image description here

Just imagine the LEDs are your solenoids. In this case you'd use 5 NMOS on the low side and 4 PMOS on the high side to drive 20 solenoids. But you're only saving 9 FETs and now you have to shift the voltage to drive your PMOS, so it's not obvious this will actually use less parts.

Placement of freewheeling diodes is left as an exercise to the reader, but they must be included.

\$\endgroup\$

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.