I am working on a project, for which the ultimate goal is to be able to control an electromagnet. Basically, I combined the IR tachometer projects with the regulated positive voltage booster project:
http://www.arduino.cc/playground/Main/RegulatedPositiveVoltageBooster
I can, depending on the IR phototransistor state, get the outgoing current to alternate between 9v and 20v. I could go higher, but I need to work on my homemade inductor. I have tested the output with a DMM, so I am confident that the voltage is being boosted.
Ultimately, I'd like to use this for a kind of parlor trick, where I can use different IR sensors to varyingly attract - and if possible repel - other (natural) magnets. The coil of the electromagnet would be connected to the Vout in the diagram.
I have tried it with some quick-and-dirty homemade wire-wrapped electromagnets, and the result is nominal. There is very little difference between 9v and 20v, and it doesn't appear that there are "poles" to the electromagnet. My next step is to make a better magnet coil!
Looking longer term, keeping mind that Priority #1 is to not fry my one and only Arduino, is there a way to use a MOSFET to increase the voltage boost, reverse the polarity, and switch faster between the high and low voltages? (At some point, I may introduce a medium voltage, but that isn't as important right now.)
And, at the risk of going too far into electromagnetism, I have a couple "tube" magnets that I could put a coil around. There is room in the core for a bolt, too. Would it be more effective to wrap those, maybe with a core? Or should I get a cylinder magnet and wrap that?
Thanks!
T
Edit: oh - point of clarification. The only 220 Ohm resistors are on the LEDs. The others are 1M, 100k, and 1k, consistent (mostly) with the Regulate Positive Voltage Booster project. I posted a bit more on this here:
http://arduino.cc/forum/index.php/topic,94550.0.html