Introduction: Mad Eye Moody - Moving Eyeball Prop
Got a Hogwarts Party? Too old or ugly to go as Harry or Hermione? Build this Arduino Trinket powered, servo driven Mad Eye Moody Eyeball that randomly swivels around in its socket and scares little children and stray dogs! Based on this excellent Adafruit Bionic Eye Project, you don't need any fancy tools or electronics degree to get this going.
Step 1: Materials & Tools
- 1 x nice shiney brass bottle/jar lid about 40-45mm wide
- 1 x large bright blue semi circular dolls eye - 26 - 30mm
- 1 x tall plastic lid about 40mm wide by 30mm tall (e.g deodorant bottle top)
- 1 x flat plastic lid like the top of an ice cream or yoghurt container
- 1 x Micro servo 9g TowerPro MG90 Servo or similar (smaller is better)
- 1 x Adafruit Trinket 5v
- 3 x AAA Battery Holder with switch
- 3 x AAA Batteries (better get more, they only last about 1-2 hours)
- Some flexible leather for the strap, but not too soft if you plan to use a buckle
- A watch strap or similar sized buckle for the strap, or some velco if the back will be hidden
- Assorted crusty old-school slotted screws
- Stranded hookup wire.
- 1-2 meters thin brown hookup wire or thin twin core bell wire
- Heat Shrink Tubing
- Epoxy (‘Fast Cure’ or ‘5-Minute’ is preferred)
- Double-sided foam tape
- Paint - Acrylic Model paint works well - Brassy Gold, Dark Brown, Pale Grey
- Blue Tack for temporary holding of things
- Electric Drill & Drill bit set
- Small Hand drill
- Xacto Knife or similar
- Sturdy scissors
- Soldering Iron
- Small screw driver set
- Hot Glue Gun
- Half Round and Flat Files
- Small Clamps
- Alligator clips
- Duct Tape or Masking Tape
Step 2: Cut, Drill and File the Two Main Body Parts
The lids need to be pretty much the same diameter as each other, and they can't really be much smaller than 42mm or the servo won't fit inside. I found a nice brass lid on a jar at a craft shop which was 42mm wide, and a deodorant bottle lid turned out to be very similar, though slightly tapered.
The jar lid is likely to be a) not really brass, so the finish scratches easily b) really thin so it's hard to drill and file, but with a bit of diligent work you should be able to drill successively bigger holes in it then finish the job with the half round files. This took a while for me, my files were too small and I quickly learnt the thin metal wants to buckle, so use even strokes in the same direction, and remove the burr as you go.
If your jar lid has a nice existing indentation like mine did, it makes sense to extend the hole out to that, as the indentation adds strength. You want about a 5-6mm ring left at the end.
The plastic lid is easy to drill and file and cut with the Xacto knife or even sturdy scissors, but it's also surprisingly easy to crack.
You need this piece to conform to your eye socket fairly well and not end up sticking out at a weird angle, so it needs to be about 10-12mm taller on one side. To get the fit right, stick it in your eye socket, then cut a bit off, rinse, repeat until it seems right. Don't glue anything yet, just make the two parts and check they sit well together.
IMPORTANT: The minimum height on the smallest side when the two are stacked together needs to be about 23-25mm, there needs to be enough depth for the servo and most of the eyeball to go inside, so any less and the servo is gonna jab into your eye as it swivels.
I mean, it will anyway, but we don't want it jab TOO much.
Step 3: Mount the Servo Into the Base
The Servo barely fits, in fact I had to modify mine. This servo is in a three part plastic case held together with 4 thin screws. I removed the bottom part of the case then re-screwed the 4 mounting screws back into the two remaining parts of the case. They screws will have to cut their way deeper into the top of the case, and eventually might come right out the top. So go gently.
The resulting mutant servo works the same, but is now small enough to mount in the center line of the plastic base and still be able to swivel free.
To mount it, take one of the normal servo arms and shorten it a bit, but leave enough so that you can still screw one screw into it. Then drill two holes in the base, one dead center that will take a screw that goes right down the shaft of the servo, and another a few millimetres to the side for the screw that goes in the shortened servo arm. You might need to get a longer screw for the shaft.
You will need to set it up so the servo body is sitting nice and flat relative to the base when it is internally at around 45º. That way when it swings from 0º to 90º the eye will appear to go fully from left to right. Twist the servo to see where 0º is and if its not quite right facing at the right direction, unscrew the shaft screw and put it back on the arm at a new angle. The splines on the shaft only give you so many choices, but it should be possible to get close. If you have it right, the servo will swivel about your chosen centerline of the base nicely from 0º to around 90º or more without hitting the sides. Use bluetack or doublesided tape to hold the eyeball on the servo temporarily to get an idea of how it will look.
IMPORTANT: Since this one servo can only swing on one axis, you might want to choose an axis that will let the eye appear to swivel slightly up and down as well as side to side, to add crazy. I put mine in about 10º off vertical.
Step 4: Mount the Eyeball
I got my eyeball from a local dealer on the Kiwi equivalent of Ebay, called Trademe, but they are all over ebay as well. An ideal eyeball would have been about 30mm, mine was 26mm. For this prop, the quality of the effect depends on having a convincing looking eyeball, a painted ping pong ball just wasn't going to cut it, plus its too large.
Because mine was a bit small, and also to hide the workings, I decided to mount the eyeball on a plastic disc I cut from a yoghurt lid. I epoxied on a washer that fortuitously exactly fit the inside dimension of the eyeball, to help center things and give a more secure mounting, but that bit is optional.
I painted the disc a pale grey to look like the white of the eye in shadow, then epoxied it to the side of the servo and waited overnight for the glue to be nice and hard. Really, I should have measured it up to be sure it was exactly centered, but instead, I just eyeballed it.
Yes I am a dad, why do you ask?
When I checked the result to see if it swivelled cleanly, of course, my eyeballing was wrong, so I had to trim the disc a little.
I used blue tack to temporarily stick the brass ring to the base, and blue tacked the eyeball to the washer to see how the eye would look moving in the ring. It was a little off center (because I hadn't measured it), but it was basically ok, and I also realised that I would need to reduce the arc of motion of the servo because the ring was obscuring too much of the iris at far left and far right, and it looked too weird, even for Mad Eye Moody
Once I had done these checks, I epoxied the eyeball to the washer.
Step 5: Painting & Decorating
I painted the base in dark brown model acrylic, two coats. It's hard to tell exactly what material the prop in the movie is meant to be, but it definitely looked brown. This paint didn't want to stick to the plastic base very well, and gave me trouble later. A light sanding of the plastic first would have helped.
I drilled a hole and added a large old fashioned slotted screw slightly offset from top dead center to the top of the base, painted it a brassy gold to match the front ring. I set the screw about 3mm back from the front edge of the base, as the movie prop makes it ambiguous if the screw is in the brass bit or the brown, so I hedged my bets. Plus in that location it wasn't going to interfere with the eyeball movement
I drilled 3 holes roughly equidistant on the front ring, and added three more smaller slotted screws, and again painted them to match the brass. They needed to be short screws so they didn't interfere with the movement of the eyeball behind, I couldn't find any short enough in my junk drawers, so I had to cut them down with brute force and a big pair of pliers.
I blue tacked it all again, but didn't glue the front ring on it just yet, I needed to add the strap first
Step 6: Making a Leather Strap With Buckle
If you are lucky, you will have an old watch strap lying around you could use, as long as the back of the prop wasn't going to be seen. I didn't, so i went and bought a piece of leather to make it from. The leather I got was a bit thin and soft, nice and comfy, but a total pain to turn into a strap with a buckle.
Now if the back of your prop is not going to be seen, save yourself some grief and just use some velcro to attach the two sides, or even join them with a piece of elastic. Nice, sensible, secure modern fastenings.
But if you are an idiot like me and want to make a strap with a buckle, read on!
First, cut a single long strap to your preferred width, maybe 15-20mm depending on your available buckle. I had one I swiped off my daughters pink toy belt (that I hope she never finds is missing). You will need figure out the length, be generous, add extra for the buckle and the opposite end that feeds through the buckle and overlaps. I wrapped the damn leather around my head to get a size, then realised there was this fancy new device called a tape measure. This kind of sums up the entire way I went about making this strap.
I taped the leather down tight, then used a ruler and Xacto knife to cut it. I cut it roughly down the middle, and decided the longer piece would have the buckle.
I folded over about 30 - 40mm, and cut a nick in the leather at the fold where the buckle prong could poke through. I then made a small leather loop that would go behind the buckle to hold the overlap.
A wise man would have rivets and a proper leather punch to make clean holes before doing anything with leather, I made do with a sharp jewellers screwdriver as an awl and had to resort to a screw and nut with washers instead of a rivet.
Of course it went badly. The holes in the other end of the strap filled back in the moment you made them, the buckle wouldn't sit square, so when I tried to feed the overlap through the buckle the prong refused to go through the holes. The worst mistake was that the leather was too thin and soft, it wouldn't lock properly in the buckle, pulling on it made it slip out, which was worse than useless.
In the end in any case, I wore the strap under my wig, so making a buckle was a total waste of time. I pinned it with bobby pins to try and lock it tight but it still slowly loosened as the night wore on.
TL;DR Use velcro, or do a better job than me with stiffer leather.
Step 7: Attaching the Strap
The main thing to remember when attaching the two halves of the strap is that they don't both attach to the bottom. I've seen a few other eyepatch props where they had attached both straps to the bottom, and the patch ended up pointing off at a weird angle.
This is because you have a nose. (If, for whatever reason, you don't have a nose, you will look even more like Mad Eye Moody from the book, so well done! I appreciate that sort of dedication to detail.)
I digress. The point is, the strap that comes across your forehead needs to attach at the front of the base near its thinnest point, and the one that goes off towards your ear attaches at the back of the base at its widest point.
Now also, these straps aren't in a straight line like a watch strap, the one across the forehead comes down at about 10º, and the one heading toward the ear goes up at about 10º. Look at a picture of Mad Eye and you'll see what I mean.
So with a bit of tinkering and looking in the mirror while holding bits of leather, i decided I needed to cut a notch in the upper front left of the base so that when I eventually got around to gluing on the brass lid, it would be flush with the base despite the leather.
I removed the eyeball, and attacked the base with a Xacto knife. Once the notch was the right depth and width, I epoxied the two leather strips into place and clamped them with alligator clamps.
I would like to be able to say that all worked as intended, but it didn't. When I went to reinstall the eyeball, I discovered the glued leather was blocking the free swivelling of the eyeball. Not by much, but enough. I fixed this by hacking off excess internal length of leather, and also by, again, trimming the eyeball disc to make more clearance.
Really I will try measuring things first one day. But this is not that day.
Step 8: Wiring It Up
Nothing involving electronics ever works first time. I didn't trust going straight to soldering so I started by testing this setup in a breadboard. This approach is optional, but I recommend it.
I took all of the code and wiring instructions from this excellent Adafruit Trinket Bionic Eye tutorial, and it mostly works as is. Obviously, there is only one Servo in my setup, so that alters the code a little and also the wiring.
The only major gotcha I found was that no matter what I tried, I could not get my servo to do more than twitch a few degrees. I had read that they never really seem to do more than 90º without some sort of additional circuit or something, but I was getting 30º at best.
I was really stumped, tried a second servo with the same results, and was about to settle for being Nervous Tic Moody when I decided to download the spec sheet to try and understand the motor better. To my surprise, the pulse durations needed to make the motor swivel were much greater than the ones being produced by the Servo Driver library included with the Adafruit tutorial. After I modified the library, I was getting a good 120º of swivel, which was actually too much for my setup, I tweaked the values to get a swing from about 20º to 75º that looked good to me.
Your values might vary, but I have attached the modified tutorial setup code for one servo and the modified servo driver library and you can tweak accordingly.
If you have never programmed an Arduino before, or used the IDE, I suggest you have a read through the tutorial I mentioned earlier first.
Anyway, once the eyeball was moving well with the breadboard test setup, it was time to actually wire up the real thing.
The eyeball circuit is fairly simple. You'll need to clip the connector off the servo lead, and strip the ends of the leads ready for splicing. You'll also need two 50mm lengths of hookup wire to power the Trinket. Solder these hookup wires to the power pins on the Trinket, and strip the other ends ready for splicing.
Next, get some two core ribbon long enough to lay along the strap from the eyesocket to the buckle. Strip the ends of the ribbon and twist each one to the corresponding lead from the servo and the matching hookup wire from the Arduino Trinket. That means creating a three wire splice instead of the normal two, so I recommend using a bigger heat shrink because it's likely to be a bulky joint.
Once both those splices are soldered and heat shrunk, solder the yellow/orange control wire from the servo to Pin 0 on the Trinket board. Thats all the eyeball soldering done.
Use hot glue and tape to attach the two core ribbon to the underside of the strap that joins the bottom of the eyepatch base, leaving a few millimetres unglued near the buckle.
Unlike the tutorial, I wanted the battery pack hidden in my clothes where I could turn it on and off at will. Spliced, solder and heat shrinked a good metre of thin brown hookup wire onto the ends of the two core ribbon by the buckle. Brown cable is fairly inconspicuous trailing down from the strap into your collar, and a metre should allow enough length to reach a pocket. Splice & solder & heatshrink the leads from the battery case to the end of the brown cables, and the wiring is complete.
Step 9: Final Assembly
I decided that since space was at a premium, the best place to stick the Trinket was on the back of the servo. I curved the cables to fit inside the lower part of the base, and attached the Trinket to the servo with a bit of double sided foam tape. I arranged it so that the micro USB port was still accessible, as was the reset button.
A side effect of this decision is that the circuit board would spend the evening jabbing me in the eye as the servo swivelled, even after I covered the whole lot with a leather pad. Nothing major, just mildly annoying.
VERY IMPORTANT: If you are going to build a prop which pokes your sweaty face all night with complex circuitry, be sure to include a waterproof barrier layer between your skin and the circuitry. Leather isn't waterproof, as I discovered about 3 hours into the evening when the eye stopped working.
The only remaining task was to epoxy the brass ring to the front. I positioned it so the eyeball looked as centered as possible, then epoxied it and taped it into place with Duct tape.
Unfortunately, Duct tape has too strong an adhesive, because when I removed it the paint on the base peeled clean off. (Remember how I said to sand the base before painting like I didn't?)
A weaker adhesive like on masking tape might have been ok, but with some swearing and a quick repaint, Mad Eye Moody was ready to go!
1 Person Made This Project!
- huberthurkach made it!
5 months ago
After starting this project I found that Trinket 5v boards just aren't recognized by a lot of modern computers. I ended up using a Trinket m0 and adapted the bionic eye CircuitPython code to match what was done here. The m0 was recognized immediately and you just drag and drop the code in a code.py file along with the servo library. Also make sure your m0 is updated to support CircuitPython 7 or greater or the servo library won't work. Hope this helps someone:
from adafruit_motor import servo
# we are intentionally avoiding Trinket Pin #1 (board.A0)
# as it does not have PWM capability
tilt_servo_pin = board.A2 # servo control line (orange) Trinket Pin #0
# servo object setup for the M0 boards:
tilt_pwm = pwmio.PWMOut(tilt_servo_pin, duty_cycle=2 ** 15, frequency=50)
tilt_servo = servo.Servo(tilt_pwm)
# servo timing and angle range
tilt_min = 35 # lower limit to tilt rotation range
max_rotate = 55 # rotation range limited to half circle
# servo tilt - on average move every 500ms
if random.randint(0,100) > 80:
tilt_servo.angle = random.randint(tilt_min, max_rotate)
Question 3 years ago on Step 8
I'm trying to upload the program to the Trinket 5V board, but Arduino says the location is not exist. I have 0 experience with boards and programming so I don't understand what's wrong.
I'm not sure i've picked the right board from the boards i got.
Thanks in advance!
3 years ago
To those who have never worked with trinket and do not have programming experience, I found the instructions on the Trinket link confusing. I wish there was a video tutorial. I searched and found that programming my eye after all the work was beyond my abilities. To those in the same category, here is my brut force solution. I just grabbed the Servo and ran it hard back and forth until all the gears were stripped. Now the eye would sit in place but swivel freely back and forth and I was much better at controlling it than the random movement program I think this set up uses. I bought a dial to control my servo as if I was ever going to get that far. Ha Ha. The problem is in the Adafruit Arduino IDE set up guide instructions. Lots of steps that are glossed over as being easy or simple I found simply were not. So I hope this short cut helps anyone who still wants to finish their project but finds the deadline creeping up on them. Here is the final result. I used a 30mm glass eye and used a belt sander to sand the back flat as I wanted more than half an eyeball showing.
I used a different bigger can and lid, but otherwise followed the instructions. I was able to cut my strap slits with a sheetrock knife and used hot glue to attach it back on itself so that the sharp cut did not cut the strap. I sewed a stretching fabric connector in the back to keep it firmly in place all night. .
Tip 3 years ago on Step 8
I found that you can use the micro-USB power to power the motor. The terminal on the board labeled "USB" takes the 5v from the usb input and can be used as a 5v output. This allowed me to use a USB cable connected to a portable powerbank to run the servo instead of wiring in a separate battery pack.
Question 3 years ago
Any chance of commissioning one of these from you?
4 years ago
Thank you for this! I made mine using your instructions, and I couldn’t be happier. It looks great and works perfectly. The only changes I made: instead of a plastic backing for the eye, I used an elastic fabric to create a hollow, and I used an old plastic shopping bag to create a sweat blocker in the back (along with the leather), for added precaution.
Reply 3 years ago
Looks great, any chance of commissioning one?
Reply 4 years ago
Well done, it looks better than mine. Hope it worked well for you. Keep building!
Question 4 years ago
Really cool prop. Can I use MG90S Metal Gear Servo 180 to create this?
* Dimensions: 23 x 12.2 x 29mm
* Weight:. 14g
Thanks in advance!
Question 4 years ago on Step 9
I finally made it to the end with all the electronics and wiring after a couple of weeks. First time for me. I have a twitchy motor like you mentioned. I'm having a hard time seeing what changes you made in the download of the servo library. It looks like the code from the adafruit github page. What changes need to be made to make it more than twitch? Or maybe I do have it but just have weak connection here. This was a very fun and humbling project. Thanks so much.
Actually, I redownloaded and saw the updated times 500,2400. What are the other 2 values in that line ,micros = map(a, 0, 10, 1000, 3400); What does the 0,10 mean. I have been futzing with them for half hour trying to get it to swivel equally on both sides and I can't deduce what these values mean and can't get it to swivel right.
Reply 4 years ago
With map(), the first two values represent the range of angles 'a' could be. It then maps them onto the last two values. In this case we have 0º = 500, 180º = 2400, so an input value for 'a' of say 90º should return 1450 - halfway between 500 - 2400.
Different servos might need different values for the 500 and the 2400, that's what I found. The original code had map(a, 0, 180, 1000, 2000) which means 0º was to output 1000, and 180º was to output 2000. On my servo, it didn't sweep the full range with those values. Spec sheets for your servo might say.
But I wonder if that's the real issue. In the eyeball-edt.ino file, there is a block like this:
if(random(100) > 80) // on average, move once every 500ms
TiltServo.attach(TILTSERVOPIN); // Attach the servo to pin 0 on Trinket0
TiltServo.write(random(35, 55)); // Tell servo to go to position random(120, 130)
That value range in the random (35,55) ALSO determines the amount of sweeping the eyeball does, I would try other values there and see what it does, like (120,180) or (0,90) etc
Question 4 years ago on Introduction
what is necessary to program a trinket?
Answer 4 years ago
You need the Arduino IDE. This is where I started. Lots of details, follow closely. https://learn.adafruit.com/introducing-trinket/setting-up-with-arduino-ide
Question 5 years ago on Step 8
I'm very excited to be working on this and loved your tutorial when I found it. I have never worked with the Arduino IDE or a microcontroller before, but I've spent a couple brain-numbing weeks trying to figure everything out. I seem to have the board installed correctly and the library included, but keep getting an error when I try to compile. I haven't altered your code at all, but could I have missed a step? Any suggestion would be appreciated.
Answer 5 years ago
I found it. It was Tools > Programmer > "USBtinyISP" that I didn't have selected. Thanks for the tutorial!
Reply 4 years ago
Sorry, I didn't even see this, but I'm glad you sorted it out (he said 8 months later..)
5 years ago
That costume is awesome, the eye looks perfect!
Reply 5 years ago
Yeah, my daughter did the scars and makeup, she used Rigid Collodium Liquid to give the scars some depth, the costume was hired from a theatre.
5 years ago
Creep! In a cool, steampunk-ish way.
Reply 5 years ago
Yep, that's what the kids at the party thought too, but hey, Mad Eye Moody is a fairly unsettling chap.