1

I have 4 DC powered electro magnets which I am currently running at 16 Volts @ 5 amps using a variable DC power supply. I want to build a programmable controller that would allow me to control the following functions:

  1. Polarity for each magnet independently of each other (need to switch polarity)
  2. time on for each (duration)
  3. order (8 different options 4 magnets by 2 polarity options)
  4. controlled by my laptop.
  5. fairly simple programming language

What would you recommend?

  • 1
    By "controlled by my laptop", do you mean that the control code must execute on your laptop, or that you have a laptop available as a development host? – HikeOnPast Mar 08 '13 at 03:26

1 Answers1

1

The requirement described may be met by a set of 4 H-bridges, one per magnet, all controlled by a microcontroller.

Each H-bridge can then be switched into one of two opposite coil current directions, or open-coil, or shorted-coil, independently.

This meets the following points:

  1. Polarity - coil current direction
  2. Time on/off - by the microcontroller
  3. Order - as above
  4. Controlled by laptop:
    • Just incorporate a serial control parser into the microcontroller code, assuming your development board of choice or custom board has some USB to serial interface; most dev boards do.
  5. Fairly simple programming language:
    • C is pretty simple, and is available on most microcontrollers.
    • Alternatively, use something like the Parallax BASIC Stamp, which supports a form of BASIC.

There isn't a pure computer-based approach that comes to mind for something like this.

Anindo Ghosh
  • 50,446
  • 8
  • 105
  • 201
  • Very much appreciate the input. On the question regarding my laptop, I was referring to using it to write some custom code. I could run it from the laptop or use to compile and download to a controller. – David Burnham Mar 08 '13 at 18:45
  • Thanks for the suggestion of the H-Bridge. Do you have any suggestions for a programmable micro controller for this project? Can Micro controllers come with H-Bridges built in? – David Burnham Mar 08 '13 at 18:53
  • As a beginner, you might want to consider Arduino microcontroller development boards (Atmel ATmega microcontroller, USB connection for programming from computer, very strong community support on the Web), or TI MSP430 Launchpad (very inexpensive, $4.30 including world wide shipping, also USB for programming) instead of a bare microcontroller. No, i do not know of any microcontroller with built in H-bridge. There are some dual motor controller boards, both with integrated microcontroller and as add on "Shields" for Arduino, that incorporate high current H-bridges and might suit your purpose. – Anindo Ghosh Mar 09 '13 at 00:43
  • @DavidBurnham I, and many others on this site, would be happy to help anyone with a well thought through problem, and none do this with any interest in compensation. No, I would not want to pick up an assignment from this site. Also please remove your email address from your comment. – Anindo Ghosh Mar 11 '13 at 19:11
  • Thank you Anindo for your comments and guidence in using this site. – David Burnham Mar 12 '13 at 18:57
  • @Anindo Ghosh MSP430 Launchpad is now $9.99 – AndrejaKo May 06 '13 at 18:30
  • @AndrejaKo Yes, that was a very dark day for the Launchpad, when they raised the price, and effectively removed themselves from the beginner hobbyist market race: At the new price, I would rather recommend an Arduino clone, 'duinos have a much stronger ecosystem for newbies. – Anindo Ghosh May 06 '13 at 19:13