My son wants to levitate a magnet using an Arduino and an electromagnet. We have put together a kit but it amounts to a black box with no real "science" (yeah it's a Science fair).
We have found some things that skech out what to do but nothing that really specifies the parts. What i am left with is finding a way to control power of an electromagnet from 7-12 VDC. The Arduino would need something much like what the Motor shield has but I was wondering if there is something about how the motors are controlled that would make it a bad choice to use them to control an Electromagnet.
In general i need PWM, a MOSFET Transistor and an H Bridge. It seems like the motor shield would provide that but since I am a real beginner, i am just not sure that I am overlooking something.
(BTW, I did buy the shield already since I'm sure we will be motorizing something someday.
This may be one instance where 9V is enough to do the job if I am right.
Thanks in advance for any advice
Motor Shield to contol an Electromagnet?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: Motor Shield to contol an Electromagnet?
The motor sheild has 4 H-Bridges on it. You should be able to control your magnet- just define it as a motor as in the example code and use the 'setSpeed()" to control power to the electromagnet.
Please be positive and constructive with your questions and comments.