Electromagnet project

Hi,
I’m new in the Arduino world and I have a few questions about it.

I need to use three electromagnet that I want to control with the Arduino for a project but I don’t know how to supply the electromagnets and the Arduino with a single 220V plug. Is it possible ?
I also don’t know what happens when you put two electromagnets facing each other. I need a suction of 80 kg in total and don’t know how to reach that weight.

I speak also French and Spanish so you can answer me in one of this languages .

Thank you for your help!

You need to provide more detail on the parts you will use and what you hope to achieve.

1 Like

Yep i totally agree.

So my project is to do a magnetic levitation like this one(DIY Levitating Succulent Planters Made 3 Ways // Turning, 3D Printing, Woodworking - YouTube) but that can support much more weight. Like 30 kg.

I want to use four of these electromagnets (https://www.aliexpress.com/item/32985031845.html) that can support 8kg each. The other part will be a big piece of metal to do the levitation. I also want to add a led ring( i can’t give you the link but it works in 5V) and control everything with a Arduino Uno.

I need to work everything with a single 220V power supply.

Thank you so much for your time.

The magnets run on 12V. What will you use to control the magnets?

Since you need a 12V supply, you can use a 12V to 5V stepdown (buck) converter to power the Arduino via the 5V pin, or 12V to 3.3V if you have a 3.3V Arduino.

I found this interesting site that give some more information.

Being able to SUPPORT an attached iron object is not the same as being able to levitate the same weight.

Large electromagnets have a lot of inductance so arent ideal for switching rapidly.

Have you done the calculations?

What current will the electromagnets take?

Thank you for your answers.

I think the levitation project is too ambitious for my first project. I will do a simple attach with the electromagnets.

So for my new version, I will use I think three of the electromagnet that I have already mentioned, and a iron disc to do the suction. Then i will use one of theses Arduino(https://www.aliexpress.com/item/1005002997846504.html) that need around 8V to run properly if I’m right. I will also une the led ring also already mentioned.

So do I need to creat a particular circuit for each device (electromagnets, arduino, lights). If you have a video or a site that could help me to understand how to do it could be brilliant.

I really appreciate your help.

Convert a PC power supply unit such as this

https://www.amazon.ca/Thermaltake-Certified-Active-Supply-PS-SPD-0700NPCWUS-W/dp/B014W3EAX8/ref=sr_1_5?keywords=700W+Power+Supply&qid=1663286625&sr=8-5

into a power supply for your project. You will get 12, 5 and 3.3 volt lines out of it, already chassis grounded. It's easy to convert one of these, plenty of web pages will show you how.

edit: pay particular attention to the use of snubber/flyback diodes on the lines powering the 12 volt magnets. Power supplies for PCs can source lots of current but can sink pretty much none (it will do into protection mode, likely).

To control the electromagnets, use a relay.

I agree

image

So the 12V magnets will take 1A each. You can switch these with relays, or MOSFETS as shown here (connect magnet where motor is shown)

Note as @hallowed31 says you need snubber diodes across the magnets. and

1 Like

That’s brilliant
Thank you so much for all your help!

1 Like

But I think I will need something a bit tinier.

Do you think I can make the same idea (having 3.3/5/12 V) but with one of these normal plugs?
image

Only if it is rated for about twice the total current draw of your project. You need a considerable safety margin.

I'd suggest you get it working FIRST before you miniaturise it. You need a robust supply to manage those magnets.

Building a bench power supply from an old PC PSU would be a much better first project! And they are getting junked all the time so you can get one easily.

If it MUST be tiny NOW tyhen an old laptop PSU just might be up to the job if you add some BIG capacitors.

1 Like

[quote="eliobrunet, post:4, topic:1031953"]
I want to use four of these electromagnets (65*30mm Large Suction 80kg Dc 5v/12v/24v Big Solenoid Electromagnet Electric Lifting Electro Strong Magnet - Magnetic Materials - AliExpress)
[/quote

80kg per magnet, times 4. Plus LED ring, plus Arduino. So min of (12V supply) * 4) + (5V supplies for Arduino and LED ring). Anything else?

Maybe you'll want to add on later. Who knows? Oled screen, hey, you know something else that would look cool for LED lighting? An IRF MOS module so you could use 12V automotive style LED almost the same as an LED ring! Possibilities are a cinch with a PSU on hand. If you get a modular one, you only have exactly the cords you need coming out of the power supply. Were you thinking 12, 16, 30 LEDs in the ring?

Don't forget your snubber diodes. Regarding that, are you sure the wall wart(s) are ok with four collapsing magnetic fields? Would you be diode protecting this circuit externally anyway? So you're still halfway to a PSU. Except current... Most wall adapters tap out at 4 amps and as others have said, you'll want a lot of overhead for this project. Maybe two adapters? So 8 amps. 96 watts.
Maybe a laptop power wall adapter - could be up to 180 watts as in some gaming laptops.

PC PSUs are hundreds of watts. Good luck whatever you choose :slightly_smiling_face:

For those about to build, I salute you! :vulcan_salute:

Well I think I will not add anything else. For the electromagnet, the have a suction of 8kg each if you look at the specs of them and not 80kg as writes in the title. Does it change something ?

I think I will use a 12 led ring but your idea is really good. Do you know a model that is cheap and pretty good quality?

For your other questions, I have to tel that it’s a bit Chinese for me. My plans were to follow a tutorial. And if you have one that can show me how to do this power supply but tinier, legend !!

So thanks for your message and your time.

And also all the tutorials that i see are for creating a variable power supply. What I want is a power supply with two outputs, one in 12V and one in 5V.

Do you know where could i find the right tutorial?

You havent been trying very hard, this took me 47 seconds

Any outputs you dont want -- dont connect.

1 Like

This is a good one.

https://www.dimensionengineering.com/appnotes/atxguide/atxguide.htm

For yours, you'll have to experiment a bit which works best. The battery in parallel with the supply makes it bigger and heavier, so it's not maybe what you wanted so the snubber diodes close to the electromagnets would serve the same purpose (albeit you'd have no battery backup built in).
The finished power supply will have 12V, 5V and 3.3V rails.

Or you could select an ATX PSU that is protected from things like motors, motor drivers, electromagnets shutting off. I couldn't say what models those would be if any though.

Regarding 12V trailer lights and such this is an inexpensive but definitely a "roll your own" way of getting bigger, brighter lights in a project. Maybe a future upgrade for your project. I get mine from the local auto/RV parts supply house but if you already have a plan and a tutorial for your build, best stick with that for now since you're already homebrewing your power solution. "Overoptimization is the root of all evil", I've heard it's been said...

Maybe OP didn't really know the difference between a laptop and desktop PC PSU? One of their replies here mentioned something about variable power supply from their Googling which suggests to me they were looking at laptop ones? Maybe not, I don't know.

Also, doing this may be a big step for a lot of builders, since it's a hack from a device which plugs into mains which may cause anxiety in many folks when previous experience is perhaps only in low voltage DC circuits (mains is no joke, so for good reason, right?).
If that be the case, to anyone following this thread, an ATX hack is a very easy project to do just keep in mind your electrical safety at all times.

Final thought on PSU: making a benchtop supply like the one in your link (is awesome) but even that is more difficult than OP needs for their build. Banana posts not required.

Definitely. Going from larger to miniature everything in electronics is a steep learning curve; if you weren't naturally gifted with 10x zoom eyesight and surgeon-level manual dexterity, it takes practice to get the fine motor muscle memory to the necessary resolution (ok, we're analog beings strictly speaking but you know what I mean)