An interesting item to have on your serving table at your Halloween party would be a bleeding heart. It's a fairly simple project and didn't cost much since I reused stuff from around the house, but purchasing the individual parts shouldn't be too expensive either. We'll be using a cheap pump to pump the blood, but using just the pump would give us a constant stream. What we want is a more pulse-like action so we'll use a MiniPOV2 kit (or any ATTiny microprocessor) to control a relay.
What you'll need:
1 - Solid State Relay (120VAC to 240VAC coil, 3VDC to 7VDC control voltage)
1 - Single Gang Outlet Box
1 - Electrical Outlet
1 - Single Gang Outlet Cover
1 - MiniPOV v2 kit from Ladyada.net
1 - Small Liquid Pump
1 - Container (for reservoir)
1 - Foil baking tin
1 - Fake Heart
~2ft of aquarium tubing
1 - Aquarium tubing T-valve
Small gauge Wire
Large gauge wire
1 - Male plug
Small piece of carboard
Step 1: Prepare the Relay and Gangbox
First, take your gangbox and remove one of the knock-outs so that your wire can feed through the back of the box. Connect your male plug to the end of your large gauge appliance wire. Feed the opposite end of the wire through the back of the gangbox. Connect your black wire to one terminal on the Solid State Relay (SSR) coil. Connect a wire from the other SSR coil terminal to the gold screw on your outlet.
Connect the white wire to the silver screw on your outlet. Your outlet is now wired completely.
Step 2: Connect the MiniPOV2 Kit
Follow the instructions for the MiniPOV2 kit and put it together, but leave all of the LEDs off of the PCB. Since my kit was already put together, I just desoldered one LED. Solder two small wires to the spots where LED #1 would normally go on the MiniPOV2 PCB.
If you don't have a parallel port extension cable, you may want to wait on connecting the MiniPOV2 PCB to the relay until after you have programmed the microprocessor.
Feed the two small wires from the PCB through the back knockout of the gangbox. Attach the positive wire from the PCB to the positive control terminal on the SSR. Then connect the negative wire from the PCB to the negative control terminal on the SSR.
After all connection are made to the relay, take your small piece of cardboard and cut it so that it fits neatly inside the gangbox and covers the terminals on the relay. This will help prevent any shorts from the outlet.
Step 3: Completing the Gangbox
After you have made all of your connections, screw the outlet into the gangbox using the provided screws. Then screw the outlet cover using the center screw that came with it. Attach your MiniPOV2 kit to the outside of the gangbox using your wiretires. Make sure to strap the battery box to the gangbox with the switch facing out so that you can turn the microprocessor on and off easily.
Step 4: Setting Up the Pump
For the pump, I took an old cheap desktop fountain I had lying around and removed the top of it leaving only the reservoir and the pump. You can do the same, or buy a small aquarium water pump and use practically any container, even a tupperware container for the reservoir.
After dismantling the fountain, I noticed that the pump had a 1/2" fitting while the tubing I had was closer to 1/4". I had to buy an adapter from the hardware store, but if you use an aquarium pump, it should all fit nice and snug. Connect your tubing to the pump after mounting the pump in the reservoir.
Next, connect your T-valve to the end of your tubing and conenct two more short lengths of tubing to the two ends of the T. These shorter lengths will go to the heart "valves" for the blood to squirt out. If you have a stronger pump, you could use multiple valves and tubing to have more blood squirt out, but I had a low GPM pump so two was my maximum.
Step 5: Prepare the Heart
Take your fake heart (I found mine at Party City for $10) and cut a hole about an inch in diameter into the bottom of it. Don;t worry about neatness -- this will be underneath and not visible. This is where the main water line will feed through.
Next, drill holes into the two heart valves where your tubing will stick out of for the blood to squirt out. I say "drill" but I used a pair of scissors. This is all dependent on the material and thickness of your heart.
Now, place the two split tubes and the T into the large hole in the bottom of the heart and feed the two end tubes through the two holes in the heart "valves." This might be tricky, so don't worry about making a bigger hole if you need to. I found sticking something through the outside of the valve hole made it easy to fish the tubing through. After you pull the tubing through, push it back so it isn't very noticeable.
Step 6: Place Your Aluminum Pan and the Heart
Take the aluminum pan and place it on top of your reservoir. Take note of where the main feed from your pump will come through. Cut a hole in the pan for the main tube to come through and feed it through. You'll also want to push down on the tin so that it is dented in the middle to allow the blood to drain back into the reservoir. I had to cut two more holes under the heart to make it drain easier.
After your tubing is connected the the pan is in place, stick the excess tubing into the heart and place the heart nicely on top of your holes you cut so that it appears to be sitting on a solid pan.
Step 7: Programming the MiniPOV2
To program the heart beat, I used the sample code for the MiniPOV2 that came with it. I modified it with some delays to make it beat. In order to get the blood flowing at first, the pic first primes the pump by running for two seconds straight before beginning the heart beat loop.
The delay code that is written into the MiniPOV2 example code does not function properly, so I had to sue an alternate one to get the delays to work properly. You can download the code file from here. Follow the instructions here on Ladyada.net
to learn how to program the MiniPOV2. You can do this on Mac, Linux, or Windows.
Feel free to modify the code to change the beating pattern, or if you want one of the LEDs to flash with the beating. I've attached the compiled code as well in case you don't want to go through the hassle of compiling. I saved the files as test_leds so that you won't need to modify the makefile to program the PIC.
Step 8: The Finishing Touches
Now that your heart is built, your relay box is built and wired, and your MiniPOV2 kit is programmed, it's time to put the finishing touches on it. For the blood, I used a mixture of fake blood from Party City ($7) and water to thin it out and make it flow better. You could also use food coloring and plain waiter, but this gave it a more realistic look.
Fill your reservoir with enough "blood" to almost cover your pump so that it won't ever run dry. After filling the reservoir and placing the pan and heart back, plug everything in and flip the switch on your MiniPOV2 battery pack. If all went to plan your blood should squirt for about 2 seconds, stop, then start beating like a real heart!