Like Ra's Naughty Forum

Full Version: Arduino controlled electromagnet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As I mentioned in the general Arduino thread, I created an Arduino controlled electromagnet based on ideas posted here on this site. I haven't seen any detailed plans for such a contraption so here is a breakdown of my parts and design.

Magnet

To start with, I got the cheapest, most readily available electromagnet I could find and I found it on Amazon.com. It is called the Skylink MC-201 Electro-Magnetic Lock and it is supposed to be an extra part for Skylink's door opener kit. The magnet costs $40. I got a variable voltage power supply and tried the magnet from 3v to 12v and it gets stronger as you increase the voltage. I doubt it is strong enough to hold my weight but it is more than strong enough to keep me from undoing the magnet when using my arms to tug a rope that has a bit of friction between the magnet and myself.

Specs:
80-90 pounds holding force
24v max
24mA (According to an Amazon comment. I have not verified this.)


[attachment=3361]
Magnet with mounting hardware to connect it to ropes on both sides

Company web page with link to instruction pdf:
http://www.skylinkhome.com/can/products/sdo/mc201.html

Amazon Link:
http://www.amazon.com/Skylink-MC-201-Ele...000KL2M64/

Here is the variable voltage power adapter I use. You could use one from your local store but for the lazy, here you go. 😊
http://www.amazon.com/gp/product/B000V6Y2RK

There is one gotcha with this magnet that I didn't think about when I ordered it. I had no idea what kind of connector it used. I could have just cut the connector off and soldered it to something, but at the time, I wasn't sure what I would ultimately be soldering it to. And it is nice to have a plug so I can disconnect it from whatever is controlling it.

I figured out it is a 2 wire Molex connector. The width between the pins on this connector happens to fit a breadboard perfectly so it has worked out well.


Timers

I wanted two timers for added safety, especially when not used in conjunction with a microcontroller. I got timers with vastly different interfaces so that I can't screw up and press the wrong button on both of them and be stuck for hours or days on end (!!). One is mechanical and the other has a nice digital display with a count-down function and one-minute granularity. I can set it to be on for 20 minutes and not deal with checking what time it is. The mechanical timer I set for a longer coarser period as a backup. Both timers are rated for more than enough power for our needs.

Machanical: http://www.amazon.com/gp/product/B00002N5FO
Digital: http://www.amazon.com/gp/product/B000IKQRTU

[attachment=3362]

Microcontroller

Any Arduino-compatible microcontroller would work fine. I used the Teensy USB Board because it fits on a breadboard, uses USB, and it is cheap.

[attachment=3363]

My breadboard has a push switch, a 5v power supply, the Teensy board, and a relay switch on it. I built the relay board you see in the picture myself just for fun. You could buy a relay that is meant to be controlled by a microcontroller. A relay is an electrically controlled switch. The reason we need this is to flip on the high power electromagnet using a very low power microcontroller.

I bought all of my parts except for the Teensy board from SparkFun Electronics. They are great for hobbyists and have lots of tutorials, helpful comments from users/customers, and just the right parts for small projects.

My code is really simple and customized for one particular scenario. It doesn't control any other devices yet and it just turns on the relay then triggers a timer when a button is pressed. Once the slightly randomized timer is up, it turns off the relay. I am looking into creating schematics for my circuit, posting a parts list, and posting my code. That will be a separate post. Hopefully I will do some more complicated things. Microcontrollers hold so much potential. You can hook up noise sensors, vibration sensors, control vibrators, electostim, and tons of stuff I can't think of.

On thing I really want to do is put my board in a nice enclosure. It is a little bit delicate the way it is with wires poking out.
Great post Kittyfur!

I would suggest to post schematics and code here in this thread, because everything is related. I'll add a link on the Self-Bondage -> Time release page.