Electromagnetic Mjolnir (From Thor's Hammer Prank)

106K758119


Intro: Electromagnetic Mjolnir (From Thor's Hammer Prank)

EDIT: I've embedded the original video above. It went crazy viral almost a month ago, but if you haven't seen it then the rest of this Instructable may not make much sense, so It's now here for reference.

SAFETY: An electromagnet like this one is serious business! If you're demonstrating around children, make sure their hands and feet aren't anywhere near the magnet when placing it on the ground. If someone has a pacemaker, keep the electromagnet away from their chest area!

Parts List:

  • Costume Prop Mjolnir - Decent price, pretty accurate size, and personally I like the grainy patina look. If you use a different hammer make sure the head is hollow.
  • Arduino Pro Mini 5V - Don't forget, you'll need an appropriate FTDI cable to program this board! It also really helps if you have a regular Arduino Uno to prototype on first before you move everything to the Pro Mini.
  • Sparkfun Fingerprint Scanner - You probably don't need a lot of prints to be stored, so this is the cheaper of the two scanners carried by Sparkfun. Don't forget to get the matching JST connector! There are great Instructables using this Fingerprint Scanner, but they use a voltage divider to keep Rx and Tx at 3.3V. As far as I've seen this is unnecessary, no level shifting requried.
  • TTP223 Capacitive Touch Sensor - From eBay, it's really cheap! There's an equivalent from Adafruit as well if you're wary of eBay parts.
  • 4N35 Optocoupler - A ubiquitous optocoupler, got it from All Electronics. Used with a 1K resistor.
  • 3.7 V 150 mAH Lithium Battery - I used something like this to power the capacitive sensor, but you can avoid it if you don't accidentally connect the handle to the Arduino Ground like I did.
  • 4 AA Battery Holders - I used 4 separate single AA battery holders because I was really tight on space and had to find nooks and crannies to keep the batteries in. I put Dollar Tree AA batteries in them.
  • 4 12V 1.2AH SLA Batteries - I got these from All Electronics because they have a physical storefront near me. You can probably get cheaper from eBay, and really you should just spend a little more on 22.2V Lithium batteries. The 1.2 AH Lead-acid batteries don't really like putting out 1 whole amp continuously, and I'll probably be making that upgrade soon.
  • Crydom CMX60D10 60V 10A Solid State Relay - Again from All Electronics, you may be able to find it cheaper elsewhere.
  • 1n400X diodes - I had 1n4007's on hand from another project, but 1n4002's would be fine. This series of diodes are rated different voltages (50 - 1000) but what's more important for a flyback diode is current rating, and they're all rated at 1 amp. Use them in parallel for at least twice the amount of current your magnet will draw when on (in my case, 2 to handle 2 amps, but these parts are cheap so don't be afraid to overestimate).
  • 10 inch 3/4" Galvanized Steel Nipple - From Home Depot, along with corresponding flange and coupler. Best to go to a hardware store and see them in person, a 12 inch long pipe would be more screen accurate but will give more leverage making the hammer easier to "pry" off a metal surface.
  • 2 Drawer Pulls - I needed a way to mount the awkwardly shaped transformer to a board of wood that could take some pulling punishment. I decided on modifying metal drawer handles to act as braces through the gaps of the "E" shape. This is another thing you'd do best to find in person, preferably with a prepared transformer to test fit. This particular part worked for me, but you'll likely need to use something different.
  • Microwave Oven Transformer - You'll want the largest one possible that's assembled with an "E" piece and an "I" piece cheaply welded together. That way you'll be able to disassemble easily with a dremel cutting wheel or angle grinder without damaging the windings. This tutorial illustrates how to do that in detail. And this great article by K&J Magnetics explains why the "E" shape is so important for holding strength. You might even be able to just buy the "E" laminations online...
  • Scrap Wood - I was lucky and had access to scrap 13 ply baltic birch plywood, which is notoriously sturdy stuff. You'd probably be fine with a decent hardwood/plywood/mdf of comparable thickness (3/4").
  • Leather Tennis Grip - I got lucky with this too, there was a tennis store by me that happened to carry old timey leather wraps for tennis rackets. They weren't really on sale, they just had some on hand that they let me have for something like $4. There are leather like tennis grip wraps on the internet, but none of the colors or prices worked for me.
  • Glues, Epoxies, Washers, Screws, Bolts, Heat Shrink, Tape, Magnets, Wires, Etc. - These will all depend on how you build your own hammer. I mostly used super glue and hot glue for the batteries, since I wanted them to be semi-removable later if I decided to spring for Lithium batteries instead. I used a set of 4 neodymium magnets to help keep the lid of the hammer closed, they sort of work.

I used Conductak to connect the Capacitive Sensor to the handle. It's not commercially available yet, so you can use alligator clips or try soldering, though it can be difficult soldering a wire to a large piece of metal like a flange.

STEP 1: Diagram

Fritzing doesn't have all of the components, so there are some substitutions with equivalent wiring:

  • The 9V batteries represent the 12V SLA Batteries.
  • The Antennae represents the handle of the hammer.
  • The Flash Memory represents the Fingerprint Scanner.
  • The Solenoid represents the electromagnet.
  • The Solid State Relay pictured is for AC power rather than DC.
  • The Op-Amp breakout represents the Capacitive Sensor.
  • In reality there is also a wire connecting the ground of the Capacitive Sensor to the core of the electromagnet. This provides a path to literal earth when the hammer is positioned on the physical ground.

There are plenty of improvements that can be made! As long as you don't accidentally ground the handle like I did, you can nix the capacitive sensor's power supply and the optocoupler. You may even be able to just use the Arduino capsense library and do without the capacitive sensor altogether, but it may be finicky. On that note, if all you care about is controlling the hammer, you can get rid of the fingerprint scanner and the Arduino completely and just get a remote control unit, such as this one. All you'd have to do is connect the output of the receiver to the input of the Solid State Relay, and boom, remote controlled Mjolnir. No programming required!

EDIT: I forgot to include switches! You'll want some simple slide switches to turn the Arduino and the capacitive sensor on and off.

STEP 2: Code

Don't forget to get the FPS library!

The code is just copy pasted below, the .ino file is also attached:

/*
FPS library created by Josh Hawley, July 23rd 2013 Licensed for non-commercial use, must include this license message basically, Feel free to hack away at it, but just give me credit for my work =) TLDR; Wil Wheaton's Law */

#include "FPS_GT511C3.h" #include "SoftwareSerial.h"

FPS_GT511C3 fps(4, 5);

int touch = 0; int capPin = 9; int flag = 0;

void setup() { Serial.begin(9600); // fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen fps.Open(); pinMode(10, OUTPUT); digitalWrite(10, LOW); pinMode(capPin, INPUT_PULLUP); }

void loop() { touch = digitalRead(capPin); //Serial.println(touch); if ((touch == 0) && flag == 0) { digitalWrite(10, HIGH); fps.SetLED(true); if (fps.IsPressFinger()) { fps.CaptureFinger(false); int id = fps.Identify1_N(); if (id<200) { //Don't care which fingerprint matches, just as long as there is a match digitalWrite(10, LOW); fps.SetLED(false); flag = 1; } } } else { fps.SetLED(false); digitalWrite(10, LOW); } if ((touch == 1) && flag == 1) { //Reset the flag after the hammer has been lifted to return to normal behavior flag = 0; } }

88 Comments

Does anyone have a more detailed wiring diagram? I am trying to wire this up and it is definitely not in my wheel houlse.
can anyone please, suggest me (solid state relay) available in "Amazon and Flipkart"
Hi everyone!

I'm making this project as a final project for school, but am really confused on how to fit the fingerprint scanner inside the pipe: the fingerprint scanner is just too big to fit inside the pipe?
My pipe is just over 2cm long (a bit bigger than 3/4'') and I still have this problem. Can anyone please help?

Thanks in advance!

Jeroen

I am currently recreating this as a fun summer project, but I am having trouble connecting the transformer coil. One end came with a connector and is a solid connection, however the other end I am soldering straight to the end of the wire coil. When running voltage through the coil and testing it, it seems that the electricity will only flow when the wire is touched at the very tip, and I can't get it to hold when I solder it or electrical tape it I also tried putting the coil end into a crimp on quick disconnect, but no luck there either. Did you run into this problem/ am I doing something wrong? Please let me know!

I know this question is a year old, but I am adding an answer in case in case anyone else get the same problem.
"When running voltage through the coil and testing it, it seems that the
electricity will only flow when the wire is touched at the very tip,.."
This is correct. The wire used for coils and transformers is coated with an insulating layer of enamel to prevent the coil windings from short circuiting. The windings may look like plain copper, but they are actually insulated wire.If you want to solder the ends properly, you have to remove this enamel near the end. It is best to sand it off or scrape it off, it can also be burned off. (Some low temp insulation will melt/burn away when you use a hot solder iron, the tougher stuff will not.)
I discovered that after a few more hours of frustration! I carefully scraped of the end enamel with a box cutter and used a flux to help hold the connection. Got it working great! Good luck to future creators.
Great Job! I didn't read all of it, and maybe it is in the works - A wireless switch to allow the kiddos to pick it up, and not the parents... hahahaha
Can one be purchased already made?

My son battles an auto immune disease and we are taking him to a kids Comic Con to celebrate his birthday. I'd love to get him one for his costume. If possible please email me VExclusive201@aol.com His birthday isn't for a few months.
Great Instructable Allen. I really like the concept you came up with. My teachers and classmates really got a kick out of this. We set up in the student center at my college. So much fun watching giant weightlifters try to lift it but to no avail. Looking forward to seeing more great projects from you.
Hello this is really cool I’am in need of help I am doing this project for school and got only 3 days left !!! I’m having a problem knowing what wire goes to what if you can tell me or even better make me a video of what goes where step by step that would be awesome thank you

what did you use in class to have it sit on for people to lift from that was heavy enough?

How much to have one built??
It not letting,me open the last file on the coding
Thanks again Allen Pan for this amazing project. It was a real journey for me figuring it all out (read comments below for dramatic effect). I was able to pick up a pipe wrench with no ease of pulling it off. Totally awesome!
Can you please share the link to where you bought those batteries? I think I see that you only connect the red and black terminals and leave the other set of wires unconnected right?
Can someone please help, I am having trouble selecting the right batteries. I see economical 11.1 V Lipo batteries online, but they come with two sets of wires and I am afraid that they won't work or that I will have difficulties trying to figure out the wiring since they come with two sets of wires, 1 set looks like the regular negative and positive terminals ( red and black), but the other set is what worries me, idk if they are necessary to connect or where to connect them to. If someone can please share the link to some economical 12V or 11.1 lipo batteries that will work for this project and their charger I would really appreciate that.
Could you just wear a magnetic ring and make a corasponding switch of some sort instead of all the arduinos and finger print scanners or remote. I need it as cheap and simple with as few parts as i possibly can. Im not near any stores and i dont like online shopping. Some one pls check out if this would work and get back to me pls

yes you can if you use a reed switch or something like that which is what I am working on

did you ever get this to work?

More Comments