Multiplexing electromagnets

I would like to have the ability to switch on and off an array of electromagnets in a similar manner to a dot matrix LED display.

The magnets are rated 12V and 0.25A. A total of eight rows and eight columns of magnets are required.

My first thought was to use relays on each row and column and use the multiplexing process, however I suspect the switching of the relay will be to slow and the repeated switching would soon kill the relays.

Any advice on how to achieve this would be very much appreciated!

Multiplexing involves turning something on and off rapidly. If you try it with an electro magnet you get two effects.

First the magnet is not as powerful because it is only on a small percentage of the time.

Second it takes time for current to build up in an inductor when the voltage is applied to it. It is the current that generates the magnetic field. The switching on and off of a electro magnet means that there is very little time for the current to build up before it is turned off again. So the magnet is even weaker than it would be if it were on for the whole of this small percentage of time that multiplexing would normally give.

So basically you can but the magnets won’t be very strong.

addressable electromagnets, eh? playing around with ferrofluid?

if something like addressable electromagnets is what you’re after, maybe look into shift-registers. Of course, you’ll have to use transistors or mosfets with flyback protection to actually handle the loads the electromagnets will require.

silly_cone:
addressable electromagnets, eh? playing around with ferrofluid?

if something like addressable electromagnets is what you're after, maybe look into shift-registers. Of course, you'll have to use transistors or mosfets with flyback protection to actually handle the loads the electromagnets will require.

@silly_cone

Hehe, you are not wrong.

Thank you for the advice. I shall look into shift-registers.

Look at tpic6b595 or tpic6c595 shift registers. These have built-in MOSFETs and can drive the magnets directly. You can chain them so that only 3 Arduino pins are needed.

If you use the Arduino’s SPI pins to drive the registers, you can update them so quickly that you could use software pwm to control the intensity of each electromagnet individually.