loading
Picture of Arduino-Controlled Chemical Foam Spewing Pumpkin
IMG_7861.jpg
IMG_7849.jpg


If the thought of dozens of tricker-or-treaters in gross-out costumes knocking down your door makes you want to spew, have we got the pumpkin for you! Every time the Arduino-Controlled Chemical Foam Spewing Pumpkin encounters a trick-or-treater at your doorstep, it spews burning chemical foam all over your front lawn. Now you can convey how much trick-or-treaters make you want to vomit, without doing any real vomiting yourself. So grab some antacid to settle your stomach, and dive deep into these helpful instructions to build your own.
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials
You will need:

(x1) Large round pumpkin
(x1) Square Nalgene 1000 ml bottle
(x2) Square Nalgene 250 ml bottles
(x1) 5' of 3/8" rubber tubing
(x1) 100g potassium iodide mixed in a 2M solution
(x2) 500 ml 35% hydrogen peroxide solution
(x1) dish soap (economy style, not natural stuff)
(x1) food coloring
(x2) 5/8" rubber grommets
(x2) brass check valves for liquid
(x2) 3/8" barbs
(5') rubber 3/8" hose
(x1) Teflon tape
(x4) small diameter hose clamps
(x2) self-priming pumps
(x1) PCB
(x2) 5V SPST relays
(x1) 10K resistor
(x1) Arduino
(x1) M-type connector
(x1) 9V battery clip
(x1) 9V battery
(x1) 22AWG red and black solid-core wire
(x1) 9V / 2.5A wall wart
(x1) 3' floor switch material
(x1) Halloween Door Mat
(x1) Assorted alligator clips
(x1) Assorted zip ties

How to make Chemical Foam

The chemical foam is made from mixing a few simple ingredients:
  • Hydrogen Peroxide (the stuff you put on scrapes and cuts is 3%, the one we're using is 35%)
  • Potassium Iodide (mixed in a 2M solution)
  • Dish Soap (not the eco-friendly kind - get regular stuff like Palmolive)
  • Food Coloring
When you mix the ingredients above in the correct proportions, you get foam, potentially lots of it.  Be safe when working with these chemicals and use common sense.  35% Hydrogen Peroxide is a powerful oxidizer and should be handled with rubber gloves, goggles, and long sleeves.  Always use best chemical practices when making chemical foam.

Step 2: Drill holes in mixing chamber

Picture of Drill holes in mixing chamber
IMG_7506.jpg
IMG_7498.jpg
IMG_7500.jpg
Drill two 5/8" holes into the 1000ml square nalgene container that will serve as the mixing chamber.  

The check flow valves are attached directly to the mixing chamber and thread themsleves in as they are twisted into position with a wrench.  

This part is a little tricky, as a safety precaution we capped the ends of the MIP threaded check valve with a compression fitting - a brass nut of sorts that was just small enough to fit through the mouth of the bottle and screwed into place.  We used a piece of metal tapped onto the nut to hold the compression fitting in place as the check valve was screwed in so that it threaded itself on.

Wrap the check valves with teflon tape and screw on the brass barbs.

Step 3: Insert grommets in chemical reservoirs

Picture of Insert grommets in chemical reservoirs
3B.jpg
3C.jpg
3D.jpg
3E.jpg
Drill a 3/4'" hole in the top of the cap for each 250ml bottle.

Insert a 5/8" rubber grommet into each of these holes.

Put the caps back on the bottle.

Step 4: Insert

Picture of Insert
IMG_7507.jpg
Insert a 2' section of tubing through the grommet into each of the bottles.

If the fit gets very tight, you should use a little WD-40 to ease it through. You might also consider drilling a small hole in the cap to prevent a vacuum from happening when the pump turns on.

Repeat for the second bottle.

Step 5: Attach

Picture of Attach
5B.jpg
5C.jpg
IMG_7508.jpg
Attach the other end of the hose in the bottle to the inlet on the pump and secure it in place with a hose clamp.

Repeat for the second bottle and pump.

Secure the pump to the bottle if necessary to keep the system stable.

Step 6: More tubing

Picture of More tubing
6B.jpg
Attach a two foot section of tubing to the outlet on the pump, and secure it with a hose clamp.

Plug your threaded barb into the other end, and fasten this as well.

Repeat this for the seconds pump.

Step 7: Attach hose to brass barb and check valve

Picture of Attach hose to brass barb and check valve
Squeeze the rubber hose over the brass barb and secure with hose clamp.

Repeat for the second pump assembly.

Step 8: Drill hole in cap and mount nozzle

Picture of Drill hole in cap and mount nozzle
IMG_7497.jpg
Drill a 1" hole in the cap of the mixing chamber and thread in a male male garden hose union fitting.  This fitting just happened to fit inside the neck of the bottle well and was available at Home Depot, so we used it.  It of course can be substituted with something else that is better suited taking multiple sized spouts so you can have the most flexibility for foam spewing.

Epoxy the fitting in place in the top of the cap. 

Step 9: Relays

Picture of Relays
9B.jpg
9C.jpg
IMG_7795.jpg
Attach the relays to the PCB such that they can be controlled by two separate Arduino pins.

See the schematic for more details.

Step 10: Check flow rate of pump

Picture of Check flow rate of pump
IMG_7505.jpg
With everything ready for testing, run the pumps by hooking them up to a 9V DC power supply and calculate the flow rate of the pump.

Step 11: Program Arduino

Picture of Program Arduino
After some preliminary testing we calculated that the pumps had a flow rate of 50ml of fluid at 2 seconds. To pump 400ml, we needed to run it for 8 seconds. To pump 40ml, it had to run for 1.6 seconds.

Download the attached code and upload it to the Arduino:

Step 12: Prep Potassium Iodide

Picture of Prep Potassium Iodide
IMG_7812.jpg
IMG_7815.jpg
Mix a few hundred ml's of a 2M solution of KI...that means 3.3 grams of KI for every 10ml of solution that you'd like to make.

Mix the solution with a gentle swirl.

Step 13: Prep Hydrogen Peroxide

Picture of Prep Hydrogen Peroxide
Measure out 250ml of 35% hydrogen peroxide and mix it with a generous squirt of dish soap.

Step 14: Build door mat switch

Picture of Build door mat switch
IMG_7820.jpg
IMG_7821.jpg
The floor mat switch is a commercial product I came upon years ago and no longer know exactly where to purchase it from.

Basically, it is a series of long switches wired in parallel. Attach wires to each end of the switch, cut it so that it fits under the door mat, and then place it underneath your door mat.

Step 15: Carve a pumpkin

Picture of Carve a pumpkin
IMG_7782.jpg
IMG_7783.jpg
IMG_7791.jpg
IMG_7788.jpg
IMG_7798.jpg
Cut the lid off the top of the pumpkin and then hollow out all of the gunk.

Now is time to carve your jack-o-lantern. It helps to tape a paper stencil to the front of the pumpkin, position how you like it, and then trace it.

Once you have drawn the face onto the pumpkin, cut it up.

Step 16: Wire it up

Wire the motors and the floor switch to the Arduino board as follows:

Step 17: Fill pumpkin with reservoirs, pumps and reaction chamber

Picture of Fill pumpkin with reservoirs, pumps and reaction chamber
IMG_7848.jpg
IMG_7842.jpg
Put all of the components inside the pumpkin. Secure them firmly in place, and make sure none of the hoses have kinks or bends in them.

Plug in the power and battery.

Step 18: Activate door matt switch and spew foam

Picture of Activate door matt switch and spew foam
As soon as you step on the floor switch, it's going to start mixing the fluids. There is typically a slight delay for each pump to run, the chemicals to mix, and spewing to start.

It's good to avoid being spewed upon. The foam is mostly-harmless, but can be quite hot.
bajablue2 years ago
Congratulations on winning the Autodesk Halloween Contest with this entry!!!
whoofoto2 years ago
How much or what do you mean by a saying a 2M solution?
noahw whoofoto2 years ago
2M refers to a molar concentration in chemistry.

http://en.wikipedia.org/wiki/Molar_concentration

It allows someone to mix a concentration of a solution and make any amount they like.
canida2 years ago
Tasteful and understated!
bajablue canida2 years ago
LOL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Ya think? ;-D
nagutron canida2 years ago
And safe! I don't always spray my steps with slippery liquid, but when I do I try to do it when many children will be walking up and down them.

Okay, sorry, was just taking the sarcastic bait. I think it's a funny project and laughed out loud. Just maybe should be pointed away from where people will actually be walking.
Lkymama2 years ago
I THINK THIS IS BRILLIANT! YOU CAN SPRAY MY KIDS WITH IT ANY DAY! JOB WELL DONE!
RickO52 years ago
Nothing like spraying some kids with hot, slippery, oxidizing chemical foam.

I like the project though. Why not just use a baking soda/soap/water solution and vinegar/water/food coloring?

I have a couple other suggestions, but maybe I'll write a follow up instructible for them...
RickO5 RickO52 years ago
That came off a little too judgmental. The foam is fairly mild, but what if on of the ingredients runs out first? The reaction doesn't finish and then you're spraying foam and potassium iodide, or much worse, foam and 35% peroxide.
poofrabbit2 years ago
This is amazing! I would love to have this at my house, looks like a project for next Halloween!
Oh my heavens! This is very creative!