Controlling 9 electromagnets with Arduino Uno

Hi everyone!

As the title says for a project I want to control 9 electromagnets with an arduino uno. The idea is that it will become a 3x3 grid. The motors I currently want to buy are: elektromagnet 5kg - 12V DC - JF-XP2520 with a resistance coil of ~55Ω. I am currently in the process of thinking about the best circuit. I don't want to use a electromagnet module since I want to place the magnets as close to eachother as possible. So far I think I will need the following for every magnet:

  • 10 kΩ gate pull-down resistors
  • 100–220 Ω gate resistor (for between arduino and MOSFET, or do I not need this?)
  • 1N4007 diodes
  • N-channel logic-level MOSFETs (IRLZ44N, IRLZ34N?)

Does this seem reasonable? Or am I missing something? I based it on this schematic I found online.

Yes, that seems reasonable, but the IRLZ44N and IRLZ34N MOSFETs are rated for 55V.
"IRLZ44N pdf, IRLZ44N Description, IRLZ44N Datasheet, IRLZ44N view ::: ALLDATASHEET :::
"IRLZ34N Datasheet(PDF) - Inchange Semiconductor Company Limited
And the 30N06 is rated for 60V (so you're right at the limit).
"30N06 pdf, 30N06 Description, 30N06 Datasheet, 30N06 view ::: ALLDATASHEET :::

It is a good idea.

Be aware this will use 9 pins from your Arduino, which is not a problem if you do not connect much else, either sensors or switches etc.

If you need to connect more devices to the Arduino you could look at e.g. an MCP23S17 which has 16 IO channels and can be controlled over SPI (only 3 pins instead of 9 pins).

Rather that 9 MOSFETs you might consider a TBD62381APG
You would need two of them

Does that include reversing the magnetic field? Looks like, so far, you are just controlling the current to the magnet. Have you investigated how long it will take for your electromagnet field to go away after the current is turned off?

I am not sure yet if I want to reverse the mangetic field... I am working with living magnetic material so not sure how it responds yet... but I guess that would make the circuit a bit more difficult. In the end (if it works) I would also like to scale up to a bigger grid say 10 x 10

but maybe if it doesn't complicated it to much (just adding a H-bridge?) than it would be good to test the effects

Please explain more! Changing magnetic fields create heat that will have a negative effect on your magnet.

So I am working with a micro-organism that is magnetic (its movement can be steered with a magnet).... but after some brief thinking I think it would be best if I could reverse the polarity.

Would something like 5 of these work?: TB6612FNG

What is it?

It is a dual motor H-bridge, but from looking up the specifications it only drives DC motors... So maybe not the best option?

I am suspecting that you do not know the strength of the magnetic field you are attempting to create. What are the real specifications for your electromagnets?

No i don't know... but it doesn't have to be that strong, since it also work with a more 'weaker' magnet and the organism itself is ofcourse very light

Do you want to control the magnitude of the magnetic field as well as the polarity?

It can drive electromagnets as well.
But you need at least 2 pins per magnet, getting tight with Uno..

magnitude not really necessary but polarity ideally yes

Can you explain more about this?
Do you mean you want to control 100 magnets in a 10 x 10 grid? So potentially 200 outputs if you want to be able to reverse the magnetic field. Or are you thinking of wiring them as a matrix? Or something else?

How are you removing the earth's magnetic field from your experimental fields?

that is not necessary for my purpose...

Yes it would