Electromagnets & Arduino

Thread Starter

lagmonster

Joined Jun 2, 2014
5
I am attempting to begin a project based on controlling the strength of multiple electromagnets with an Arduino.

I was wondering what Arduino board and other parts would be suitable to start building this project and making a move with it. Any help would be amazing!

Thanks
 

sirch2

Joined Jan 21, 2013
1,037
The choice of Microcontroller is based on things like the number of I/O pins you need, program size, memory requirements etc. You really need to start at the other end of the problem and work out how to control one electromagnet and then work up to multiple, which will help you choose a controller.

What are you wanting to achieve by controlling the strength of multiple electromagnets?
 

Thread Starter

lagmonster

Joined Jun 2, 2014
5
I want to essentially create a magnetic equivalent of an lcd screen, so I am able to create shapes based on the magnetic strength.
 

Thread Starter

lagmonster

Joined Jun 2, 2014
5
Ideally I would like to start with a 3 by 3 array of "pixels" that are flat.

e.g

O - Electromagnet

O O O
O O O
O O O


I would then have the ability to apply a varying strength to each of the magnets.
 

Alberto

Joined Nov 7, 2008
169
Since you need to controll the strenght of the single magnet and you have nine of them, you will need a MCU with nine indipendent pwm output, plus nine ADC to monitor the current supplied to each magnet


Cheers

Alberto
 

shteii01

Joined Feb 19, 2010
4,644
I have never done anything with electromagnets.

So you want to control the strength. What control scheme do you have in mind? One of the more obvious schemes is to vary the time that the magnet is ON and OFF. Usually, but not always, this sort of thing is accomplished using PWM.

Another thing. Depending on the magnet... uC might not be able to provide enough voltage/current or both. So you would have uC connected to switching circuit (probably transistor in the Switch configuration, not complicated), switching circuit connected to the magnet.

Bottom line: stop talking, start drawing block diagram.
 

sirch2

Joined Jan 21, 2013
1,037
A place to start would be by Googling "Digital to Analog conversion" but beware you will get loads of results for "Analog to Digital" which is a different thing. I believe that only the Arduino Due has DAC and then only two channels so you would need some way of multiplexing those onto your nine magnets. Alternatively you could use external DACs and if you went that way you could use TWI (I2C) devices and address them off any Arduino - see this for an introduction - https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial/overview
 

shteii01

Joined Feb 19, 2010
4,644
A place to start would be by Googling "Digital to Analog conversion" but beware you will get loads of results for "Analog to Digital" which is a different thing. I believe that only the Arduino Due has DAC and then only two channels so you would need some way of multiplexing those onto your nine magnets. Alternatively you could use external DACs and if you went that way you could use TWI (I2C) devices and address them off any Arduino - see this for an introduction - https://learn.adafruit.com/mcp4725-12-bit-dac-tutorial/overview
I hope to God that they fixed Arduino Due DAC.

But if they did not fix it. Then the DAC is SUPPOSED to provide 0-3.3 volts. IN REALITY it provides 0.5-2.75 volts. So you will never hit 0 volts and you will never hit the max of 3.3 volts.

Due does have a "gazillion" io pins so you can use an external DAC chip.
 

Thread Starter

lagmonster

Joined Jun 2, 2014
5
And what other starting documents would you recommend before I start wiring up and playing with them?

Would it benefit to buy a type of arduino that would be suitable to learn as I try to create this?
 

mcgyvr

Joined Oct 15, 2009
5,394
You should start by attempting/learning the tutorials on the arduino site.
Get a led to blink, then a button,etc.. walk before you run.
 

Thread Starter

lagmonster

Joined Jun 2, 2014
5
I am able to write some JavaScript so I just don't want to be hitting the next stage too fast. So want to have everything in front of me. What sort of Arduino do you advise buying? And is there a point in the starter kits?
 

mcgyvr

Joined Oct 15, 2009
5,394
The starter kits will typically include all the other parts needed to build many of the starting tutorials. If you've got a bunch of parts already then there is really no point.

Personally I'll just use an Arduino Mega for everything.. I keep a few on my desk at all times. But even the UNO is plenty for "most" projects. I don't keep track of the new ones out there with the 3.3v limits. Been wanting to get a 32 bit Chipkit or similar to try out..

The arduino language is very simple to pick up IMO. Based on C and shouldn't be too hard if you already do some programming in any language. Its just that mentality of understanding how code works/flows that you get from knowing any programming languages.
 
Top