Want to build this project?
View Parts

 

For Halloween, I thought I would combine the networking and GPIO capabilities of the Raspberry Pi to create a pumpkin with lights and sound which can be controlled via a web page.  The Raspberry Pi goes inside the pumpkin along with LEDs and a small speaker:

pinkcat.jpg

Thanks very much to my colleague Liz Houtz for letting me use her nicely carved cat-o'-latern.  I lined the inside of the pumpkin with a gallon ziplock bag to keep the gear from getting too messy.  The power and Ethernet cable went through the carving of the cat's tail on the backside.

 

The simple web interface is intended to allow one to trigger sound or lights remotely via a browser on a computer, smartphone or tablet:

pumpkin_pi_20121026.png

UPDATE: I've written a new post covering how to install the software for the project: A second helping of Pumpkin Pi

 

Here's video of the an audio clip being played while the lights are flashing.  However, the ability to choose from any sound file in a specified directory was added after this was shot:

 

 

I prototyped with a tiny breadboardtiny breadboard atop the Adafruit Pi PlateAdafruit Pi Plate.  Pieces of drinking straw can optionally be placed over the LEDs to further diffuse the light:

plate.jpg

Once I was satisfied with the circuit, I soldered the components on to the Adafruit Pi PlateAdafruit Pi Plate.  I used orange LEDs (58K245858K2458) in place of yellow LEDs in this example:

20121023_145143.jpg

The LEDs are powered from the Raspberry Pi's 5V rail and controlled via transistors that the Pi' GPIO pins can turn on and off:

punkin_pi_v3.png

Here is the list of parts that you'll need (excluding the portable speaker which I got from Amazon):

 

Qty

Newark SKU

Part

143W530243W5302Raspberry Pi Model B
144W345344W3453Adafruit Pi Plate
144W346544W3465Adafruit Pi Box
283C022383C0223Fairchild PN2222BU NPN BJT
238K032738K0327Multicomp 1K Ohm resistor
409J932109J9321Lumex 5mm Red LED
438K035138K0351

Multicomp 220 Ohm resistor

420J248820J2488Lumex 5mm Yellow LED
433R854833R8548

Alternative Yellow if 20J2488 not in stock:

Bivar 5mm Yellow LED

4

58K245858K2458

Alternative to Yellow:

Vishay 5mm Orange LED

438K034538K0345Multicomp 180 Ohm resistors

 

You can add all the above parts, except the Raspberry Pi, to a Newark element14 shopping cart via this link: Add to Cart.

 

Note: you may want increase the quantity of the LED, resistor, and transistor parts.  Since they are very low cost, it's a good idea to get a few extra in case one gets damaged or lost during assembly.  Also, I've specified 220 Ohm resistors (38K035138K0351) for the Red LEDs, but you can substitute with 180 Ohm resistors (38K034538K0345) if you find they are too dim.

 

If you don't have any soldering equipment, then you may be interested in Newark element14's low-cost soldering supplies.

 

UPDATE: I've written a follow-up blog post to describe the design of the software and how to install it from GitHub.  A big thanks to Bonnie King for bringing her Python experience to the project.

 

Cheers,

Drew

 

 

element14
Product Name*DescriptionBuy All PartsBuy All Parts
Raspberry Pi Model B with SD CardRaspberry Pi Model B with SD CardRaspberry Pi model B and 8GB SD Card with NOOBS preinstalled
Optical mouseOptical mouseBasic USB optical mouse
KeyboardKeyboardBasic USB keyboard
Adafruit Pi PlateAdafruit Pi PlateBreakout and expansion board for Raspberry Pi
Tiny BreadboardTiny BreadboardSmall breadboard sized to fit Pi Plate
Adafruit Pi BoxAdafruit Pi BoxClear acrylic enclosure for Raspberry Pi
(2)  NPN BJT(2)  NPN BJTNPN bipolar transistor
(2)  1k ohm resistor(2)  1k ohm resistor1k ohm, 250mW carbon film resistor
(4)  Red LED(4)  Red LED5mm red LED
(4)  220 ohm resistor(4)  220 ohm resistor220 ohm, 250mW carbon film resistor
(4)  180 ohm resistor(4)  180 ohm resistor180 ohm, 250mW carbon film resistor
(4)  Yellow LED(4)  Yellow LED5mm yellow LED
20AWG Red Hook Up Wire20AWG Red Hook Up Wire20AWG solid copper hook up wire - red
20AWG White Hook Up Wire20AWG White Hook Up Wire20AWG solid copper hook up wire – white
Additional Parts
Product Name*Description
Rechargeable USB Battery Pack4000 mAh Li-Ion battery pack with USB outputs and included cables
Mini SpeakerSmall rechargeable mono speaker with integrated amplifier

 

*Products and resources listed are listed to help members build their own Pi Projects. They are suggestions and listed for educational purposes. For substitutions of any parts, please post a question asking the original author.