Evil Mad Scientist Laboratories Evil Mad Scientist Laboratories

Making the World a Better Place, One Evil Mad Scientist at a Time

 
About EvilMadScientist  :  Buy Stuff  :  Contact  :  Forums  :  Links  :  Articles  :  Search  

Make a Robotic Snap-O-Lantern!

Snapper - 02.jpg
Snapper - 06.jpg Snapper - 07.jpg Snapper - 09.jpg Snapper - 06.jpg
The Snap-O-Lantern is a robotic mini-pumpkin. Normally, it just sits there, in disguise as a boring old pumpkin. But, every twenty seconds he comes to life. His LED eyes turn on, his jaw slowly opens, and then SNAPS shut-- and he goes back into stealth mode.

What's inside? A small hobby servo motor, driven by an AVR microcontroller. This is a minimal microcontroller project, and is very straightforward if you happen to already have a setup for programming one. We'll walk through the carving, setup, programming, and electronics. This is an open-source project, one of the world's first "gpl-o-lanterns"; source code is provided.



The first task is to carve the pumpkin. It needs to have big pointy teeth in the front, and a hinge in the back. We'll use a simple friction hinge, and the big pointy teeth help to realign the pumpkin's mouth when it snaps shut.


Carving - 01.jpg Carving - 02.jpg

Start with a large-ish mini-pumpkin. Pick a side to be the face and draw some big pointy teeth on it using a fine-point sharpie. The ink can be removed later, if necessary, with rubbing alcohol.


Carving - 03.jpg


Away from the teeth, simplify the pattern to a simple cut, and on the side exactly opposite the center of teeth, mark a shape like so. This notch, an inch or two wide, will form the basis of a hinge.


Carving - 04.jpg Carving - 09.jpg


Using a very sharp knife, carefully cut along the pattern that you have made. This should completely separate the top and bottom halves of the pumpkin.


Carving - 06.jpg Carving - 10.jpg


Using a spoon or other appropriate tool (like the melon baller shown here) scoop out the seeds and loose pulp from the inside of the pumpkin.


Carving - 11.jpg Carving - 12.jpg
Carving - 13.jpg Carving - 14.jpg


The proto-hinge at the back of the pumpkin presently consists of a wide tongue that sticks out below the top half of the pumpkin, and a matching slot in the bottom half. We want to be able to tip the lid back on that slot easily. To make this possible, we need to angle the top inside surface of the slot.

Make a guide mark below the top of the slot, and cut the surface of the notch at an angle such that the lid can tip back easily, virtually hinged at the point where the two pumpkin halves meet. Look carefully at the photos to make sure that you see where the cut needs to be added; you can always click on the photos to get a closer view.


Carving - 15.jpg Carving - 16.jpg
Carving - 18.jpg Carving - 19.jpg


Now it's time to turn that proto-hinge into a real pivot hinge. (There are several other good ways to make the hinge work-- if you have another way that you like, go right ahead.)

The basic idea is that we add two toothpicks to the back of the lower half of the pumpkin. The tongue and slot prevent side-to-side motion while the toothpicks prevent the lid from sliding backwards and provide friction against sliding upwards. Then, when we push up on the upper front teeth, the jaw tends to open neatly, and fall back into place when released. Insert the toothpicks as shown in the photo (you may want them a little more vertical than this) and trim them so that only about 1/2" of each toothpick is visible.


Guts - 01.jpg

Now that we have a working hinge, we come to the electronic portion of the project. Here is the list of parts:

  • 4.5 V - 5 V power source. Suggested: a 3xAA battery pack with alkaline batteries.
  • RC hobby servo motor. Suggested: medium-small model such as Hitec HS-81
  • Two LEDs, red, orange or yellow.
  • Two 1 k resistors
  • ATtiny2313 microcontroller and programming setup
  • 20-pin DIP socket for ATtiny2313 (optional)
  • 2x3 DIP header
  • Hookup wire
  • Pad-per-hole circuit board or similar protoboard

Download the firmware for the project here (12 kB .zip file). If you already have a working setup for programming AVR microcontrollers, you probably already know what to do. Unzip the file, customize the header of the makefile to reflect the programmer that you use and which port it is on, and run (in a terminal) "make all", "make program" to compile and flash it. If you have a more specialized programming environment, you can use that instead without any worries-- just make sure to copy over the fuse settings from the makefile.

If you are new to programming AVR microcontrollers, or to microcontrollers in general, start here for a great overview. (See also our list of AVR resources.) You will need a to set up a tool chain of (free, open-source) software and some programming hardware.

The rest of the parts are set up as shown in this diagram:

Wire up the battery pack, positive side to pin 20 of the ATtiny2313, negative ("ground") side to pin 10. Use the 2x3 DIP header as a pair of standard servo connectors, where the signal sides come from pins 12 and 13 of the chip, the middle pins go to the positive end of the battery, and the other two end pins go to the negative end of the battery. Finally, two LEDs with 1k series load resistors go between pins 8 and 9 and ground. Instead of wiring the LEDs directly on the board, put them on the end of long wires so that they can be placed as eyes for the pumpkin.


Guts - 04.jpg Guts - 06.jpg


Set up the servo motor with a single long arm. If you don't have one, you can superglue a piece of plastic to a shorter servo output wheel or horn. Connect the servo motor to one of the two servo outputs of your circuit, paying attention to the polarity. (Typically, the black wire goes towards the side that's connected to ground.) Every 20 seconds, the LED eyes should turn on, and the servo should begin to ramp between two positions and then snap back to the original location. The two different servo outputs give two different ranges that should accommodate some variation in pumpkin size and servo throw. Set up the servo so that it can fit inside the pumpkin when it is in the "off" position and then opens up as the servo arm moves. You will need to hold the servo motor in place. Toothpicks work well for this purpose.


Guts - 09.jpg Snapper - 03.jpg

Next, attach the LED eyes. For very small pumpkins like these it can be hard to wire the LEDs inside the pumpkin itself. A good compromise is to attach them directly to the top, anchoring the wires by hand inserting staples. If you do use a larger pumpkin (perhaps pie-pumpkin sized) , you may well be able to fit the microcontroller, LEDs, and battery all inside the pumpkin itself. On the other hand, the servo will have to work much harder to lift the additional weight.


Snapper - 09.jpg

So how does it work? Nice and creepy like. Additional project build photos are here, and we've also put up a project video on YouTube, you can watch it there or embedded here.




MetaBlog links for this story: [ del.icio.us | technorati ]

Technorati tags: , , , , , , , ,

Trackback

Trackback URL for this entry: http://www.evilmadscientist.com/trackback.php/snapolantern

Here's what others have to say about 'Make a Robotic Snap-O-Lantern!':
http://laughingsquid.com/robotic-snap-o-lantern-other-pumpkin-robots/
Tracked on Thursday, October 25 2007 @ 06:58 PM PDT
Fun with Pumpkins
Tracked on Friday, October 26 2007 @ 01:55 PM PDT
Sculpin >> My del.icio.us bookmarks for October 11th through October 26th
Tracked on Friday, October 26 2007 @ 08:50 PM PDT
Robotic Snap-o-Lantern, the DIY Gape-jawed Snapping Turtle Pumpkin [Halloween Projects] - Mens Plaza
Tracked on Friday, October 26 2007 @ 09:52 PM PDT
Robotic Snap-o-Lantern, the DIY Gape-jawed Snapping Turtle Pumpkin from Tech|noob
newVideoPlayer("snappin_jack.flv", 475, 376);Make yourself a robotic mini-pumpkin just in time [read more]
Tracked on Friday, October 26 2007 @ 11:25 PM PDT
Snapping Pumpkin! from Needcoffee.com
Well, over on Daily Kicksplode we posted a bit about the power of a snapping turtle. During this time of year, however, you would be well advised to watch out for snapping pumpkins. You think, hmm, that pumpkin looks a bit odd, then before you know i... [read more]
Tracked on Saturday, October 27 2007 @ 03:40 AM PDT
Links from the Sharpside - Inaugural Weekend Edition [10.27.07] from Tales from the SharpSide
Links from the Sharpside - Inaugural Weekend Edition [10.27.07] [read more]
Tracked on Saturday, October 27 2007 @ 11:28 PM PDT
Funny Gadgets - the Robotic Snap-O-Lantern | gadgettastic.com
Tracked on Sunday, October 28 2007 @ 12:51 PM PDT
High-Tech Jack-O-Lantern Tips | OLGn
Tracked on Sunday, October 28 2007 @ 03:27 PM PDT
ã?‹ã?·ã?£ã?¨å™›ã?¿ã?¤ã??DIYã?‹ã?¼ã?¡ã‚ƒãƒ©ãƒ³ã‚¿ãƒ³(å‹•ç”») from Gizmodo Japan(ギズモード・ジャパン)
newVideoPlayer("http://www.gizmodo.com/s... [read more]
Tracked on Monday, October 29 2007 @ 11:01 PM PDT
Make a Robotic Pumpkin for Halloween | Walyou Blog
Tracked on Tuesday, October 30 2007 @ 11:43 AM PDT
Trend Squad >> Blog Archive >> How to Make Your Own LED Snap-O-Lantern
Tracked on Wednesday, October 31 2007 @ 01:31 AM PDT
Halloween Stuff You Might Like by Urban Retro Lifestyle
Tracked on Wednesday, October 31 2007 @ 03:08 PM PDT
Make a Robotic Snap-O-Lantern! from howto
Bookmarked your post over at Blog Bookmarker.com! [read more]
Tracked on Saturday, January 05 2008 @ 06:37 PM PDT
Make a Robotic Snap-O-Lantern! | 6 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Make a Robotic Snap-O-Lantern!
From: Anonymous on Thursday, October 25 2007 @ 09:53 AM PDT
wow thats nice.It will scare the little kids :D
Make a Robotic Snap-O-Lantern!
From: Shadyman on Thursday, October 25 2007 @ 02:36 PM PDT
AHAHAHAHA. I love it!
Make a Robotic Snap-O-Lantern!
From: Anonymous on Thursday, October 25 2007 @ 09:07 PM PDT
Whoa, Windell, a thought... you've seen how some folks have made LED coffee tables (I don't mean yours, which is truthfully still my fave) that actually shine light THROUGH the very thin top layer of wood veneer? ...I'm thinking you can hide the "eyes" inside the pumpkin lid. Maybe take a drill bit the same diameter as the base of the LED, just twisting/twirling it your fingers, and tunnel almost all the way out through the pulp to the skin. Insert LEDs; maybe anchor them with a bit of toothpick. Hiding the wires should be trivial. Should help your "stealth mode" be more stealthy, eh? - Theo (teho.vox.com and CuteOverload)
Make a Robotic Snap-O-Lantern!
From: Anonymous on Saturday, October 27 2007 @ 11:13 PM PDT
Looks like you made it on Make Blog again. Gratz folks!

-Pattmyn