I need to control 6 electromagnets using Arduino but I don’t know how. I need to be able to also change the polarity of every single one of them using a joystick, I’m fairly new to Arduino, does anyone know how I can somehow start this idea, or at least guide me on what to do.
Provide links to the devices you will usee and their datasheets (electromagnet, joystick).
Test your devices stand-alone, for example:
Draw a picture or schematic of the connections.
Ask more questions here...
Yes, measure the resistance of each of your electromagnets. Then decide what voltage you will use on the magnets. That voltage divided by the measured resistance will tell you the current, in Amperes, used by each magnet. That current value time 6, will tell you the very minimum current that will be needed for your power supply.
When you have that done and the necessary power supply in you hands, then we can proceed with the stuff needed for the Arduino side of your project.
Thank you I’ve been looking for tutorials on things, but couldn’t find a good one on joystick
How do I determine the resistance between the magnets?
Did I write that? I don't think so. Read it again! Determine the resistance of EACH of you magnets!!
Sorry I mean how do I determine the resistance of each magnet
Use you DVM, digital Volt meter's resistance measurement. If you don't have one, then get one or all hope of getting anything done with you project is gone before you even start.
Once you have figured out what voltage and current is needed to power your electromagnets, we can help you choose an "h-bridge".
An h-bridge is what you need to control the electromagnets and change their polarity.
There are many h-bridge chips and modules to choose from, but you need to know the voltage and current first.
You can also make an h-bridge with a pair of relays. However, this would mean you need a total of 12 relays, which would be bulky and if you use relays, you can control the polarity of the electromagnet but not the intensity. Do you need to control the intensity?
Ok thank you I will get to it and once I have all the magnets I need I will come back to this.
I do need to control the intensity, I am trying to make a homemade maglev train, and I need to control the intensity so I can control the speed as well
Wow! You will truly be a "Wiz" if you can do that!
A model, I assume? What size, and how will it be powered?
I’m trying to make it powered using dc voltage because I want to make it portable, and I don’t know what size yet because I just need to understand the basics for the coding and engineering first.
The size will be determined by these electromagnets you are waiting for?
Have you found a source for the magnets for a maglev train? Ordinary magnets are not the correct shape.
I’m going to buy either uxcell 5V 50N Electric Lifting Magnet Electromagnet Solenoid Lift Holding, or Copper Magnetic Levitation Coil with Iron Core for Arduino DIY.
a levitation train? boy! that is ambitious for a home project.
please allow me to be rude: if you want to understand the basics for coding and engineering FIRST, I can presume you already have a Phd in physics and electromagnetism, and just needs additionnal skills to build-up your project.
If not, I can tell you are on the very first step of a very hard long stair.
Did you made a simple estimation of the force required the magnets will have to generate? Are you ready to fight with unstability of your device when levitating?
I hope you will be brave enough to deal with all difficulties maintaining a magnet in a steady position. In your shoes, I will choose another project.
Yes I did a very brief estimation, but I am going for a decently small version. And over time make my way up to something bigger, and for stability I will be using Japanese technique for their maglev trains to keep it steady, only thing I am struggling on is the engineering towards it
And I am very prepared to try my hardest to get this project done, just lacking the knowledge of engineering towards it. I know I need a h bridge circuit attached to the electro magnets but controlling using a joystick will be difficult.
japanese train. you mean the part of the train wearing the magnet is enclosed to avoid it to jump out?