A pumpkin that sleeps like a Mac

sequence - 02 sequence - 10
sequence - 16 sequence - 06

Here's an neat idea for a jack-o'-lantern: Hide a single white LED just beneath the thin surface of the pumpkin. And program it with the same slow "breathing" effect that indicates sleep on Mac computers.

The result? A pumpkin that sleeps like a Mac. It's actually quite striking, in part because the effect becomes invisible every few seconds. It's also an easy microcontroller project: our demonstration video and build instructions follow.

Here's a quick walkthrough of the project, hosted at youtube:


sleepypumpkin - 02

This project is based on an ATtiny2313 microcontroller. The other essential components are an LED, resistor, and power source; we suggest using 3xAAA holder with switch, but a 3xAA holder will work just as fine. You'll also need some way of programming your chip. We use the Adafruit usbtinyisp programmer hooked up to the chip with a minimal target board configuration. The only essential part that you need for the target board is the six-pin header (shown above) that hooks up to the programmer.


sleepypumpkin - 01

Here are two examples of target boards for the '2313-- the minimal one from the target board article, as well as our custom built '2313 target board. We'll be using this one from here on out, just for ease of wiring.


sleepypumpkin - 04 sleepypumpkin - 03

First step is to wire up the target board with the chip, 6-pin ISP header, and powerA neat trick is to wrap the wires through existing but unused holes on the board for strain relief.


sleepypumpkin - 05 sleepypumpkin - 06
sleepypumpkin - 07 sleepypumpkin - 08

We are using an ultrabright 5 mm white LED with a clear lens. We hooked it up to the target board through some long insulated wires so that it can be arbitrarily positioned within the pumpkin. We also used a layer of black heat shrink tubing to make sure that the leads don't touch and an overall wrapper of clear heat shrink tubing. The pumpkin is a moist environment, and it can help to keep the moisture off of the electronics.


sleepypumpkin - 09

Here's a close-up of the connections on the board. The output signal comes out of OC1A, goes through the resistor, to the LED, and from there to ground. For a white LED and 4.5 V power (3xAAA), about 20 ohms is appropriate for the resistor.


sleepypumpkin - 11

That's actually all the electronics hardware that there is-- the rest is programming and pumpkin carving.

The source code for this project-- and you'll need to program the chip before it lights up the LED -- is available for download here (12 kB .zip archive) It's an avr-gcc source file. (If you're new to AVR programming, you might want to start by looking at our list of resources for getting started with AVR microcontrollers.) We got some hints for how to get the feel right by looking at this old project from Adafruit.


sleepypumpkin - 12 sleepypumpkin - 13
sleepypumpkin - 14 sleepypumpkin - 15

Next, the victim pumpkin.

We found a nice face on our pumpkin, where we could locate the LED. On the opposite side, we cut an opening that would not be visible from the front-- going for that "no visible seams" look, right?

Then we scooped out the contents of the pumpkin, washed and dried the inside, and thinned the front wall. We used a 3/16" (4.75 mm) drill to make an incision that would hold the LED dead center in the front. This is the tricky part-- you need to twist the drill so that it almost pokes through.


sleepypumpkin - 17

Put the electronics-- except the LED --in a plastic bag, sealed to the extent practical.


sleepypumpkin - 19

Stick the LED in its hole, and (optionally) wedge it in place with a couple of toothpicks.


sequence - 14

And that's all there is to it. But beware: the LED effect is convincing. You might have to keep explaining, "No, I didn't hide a Mac Mini in there."

11 comments

The following comments are owned by whomever posted them. This site is not responsible for what they say.
Authored by: Anonymous on Wednesday, October 20 2010 @ 11:53 AM PDT A pumpkin that sleeps like a Mac
Make another one, but this time strip just the very front layer of the pumpkin in the shape of the Apple, er, Apple.
Authored by: mightyohm on Wednesday, October 20 2010 @ 02:36 PM PDT A pumpkin that sleeps like a Mac
Or perhaps the IEC 5009 sleep symbol?
Authored by: Anonymous on Thursday, October 21 2010 @ 08:58 AM PDT A pumpkin that sleeps like a Mac
Can't a similar effect be achieved with a 555 in astable mode ?
Authored by: squall_line on Thursday, October 21 2010 @ 09:21 AM PDT A pumpkin that sleeps like a Mac
It was my understanding that the frequency and duty cycle of astable mode are fixed and determined by the resistor values when in astable mode.

How would one create a sinusoidal increase and decrease in the PWM frequency in astable mode with a 555?
Authored by: Anonymous on Friday, October 22 2010 @ 02:36 PM PDT A pumpkin that sleeps like a Mac
Not a 555, but dual op-amp... http://www.discovercircuits.com/H-Corner/ho-train-lite.htm

I haven't seen it running, so it may not mimic the Mac as well.
Authored by: Anonymous on Saturday, October 23 2010 @ 02:29 AM PDT A pumpkin that sleeps like a Mac
http://www.instructables.com/id/ThrobbingFading-LED-with-555-Timer/

470 ohm resistor (or a resistor to drop the current for your desired led from around 8 volts.)
33k resistor ( or a 100k potentiometer for adjustable fade times)
LED ( I used Blue)
100uf Capacitor
555 Timer
Generic NPN Transistor
Authored by: Anonymous on Friday, October 29 2010 @ 09:12 PM PDT A pumpkin that sleeps like a Mac
Excellent suggestion. That schematic worked like a charm.

http://www.youtube.com/watch?v=V0T_dSrLm9o
Authored by: Anonymous on Friday, October 22 2010 @ 08:27 PM PDT A pumpkin that sleeps like a Mac
i want to see one with the knight rider led array ^^
Authored by: GoatRider on Sunday, October 24 2010 @ 06:26 AM PDT A pumpkin that sleeps like a Mac
Authored by: drg on Sunday, October 24 2010 @ 06:19 PM PDT A pumpkin that sleeps like a Mac
Neat, but I think you need to add a second LED. Eyes would look spookier.
Authored by: Anonymous on Tuesday, November 02 2010 @ 12:09 PM PDT A pumpkin that sleeps like a Mac
Aye - we now have an evil George Bush with two eyes.

Used and ATMega8 - only about three lines to change.
Welcome to Evil Mad Scientist Laboratories. New projects are posted on most Wednesdays.


Bookmark EMSL

EMSL RSS

Evil Mad Linkblog

Twitter: @EMSL

Facebook page
del.icio.us
feedburner
Feed on Google Reader
YouTube Channel

Subscribe to get new articles by E-mail:

E-mail address:


Preview | Powered by FeedBlitz

My Account





Sign up as a New User
Lost your password?

Who's Online

Guest Users: 14

DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

Forumposts

Order: New Views Posts
Latest 10 Forum Posts
 
Re: Seconds hand display and c..
 By:  Robert
 Thursday, February 23 2012 @ 01:52 PM PST
Re: Seconds hand display and c..
 By:  Robert
 Thursday, February 23 2012 @ 01:48 PM PST
Re: Microwave Radiation emitte..
 By:  JohnKennedy
 Wednesday, February 22 2012 @ 09:14 AM PST
Re: Applying Maxwell's Law
 By:  The Student
 Wednesday, February 22 2012 @ 06:33 AM PST
Re: Microwave Radiation emitte..
 By:  sdb
 Tuesday, February 21 2012 @ 06:46 PM PST
Re: Applying Maxwell's Law
 By:  Ugi
 Tuesday, February 21 2012 @ 07:27 AM PST
Re: Use five LED's instead of ..
 By:  Chris
 Monday, February 20 2012 @ 07:58 AM PST
Spam alert
 By:  Robert
 Monday, February 20 2012 @ 01:05 AM PST
Re: Use five LED's instead of ..
 By:  Chris
 Sunday, February 19 2012 @ 11:19 PM PST
Re: Seconds hand display and c..
 By:  Robert
 Sunday, February 19 2012 @ 09:56 PM PST