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

About: Conductak is a conductive sticky tack. Use it to stick circuits anywhere!

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; } }

Halloween Props Contest 2015

Third Prize in the
Halloween Props Contest 2015