Jonathan Thomson's web journal

Super Mario Bros. Warp Pipe Sound Effect Toilet Touch Sensor May 27, 2011

Filed under: Electronics — jethomson @ 11:58 pm

I read a comment from a redditor, who had just decorated her bathroom in a Super Mario Bros. theme, a few months back saying she wanted to make her toilet play the warp pipe sound effect. I thought this would be funny, plus I had just recently noticed something on eBay called a sound drop key chain that played Mario sound effects, so I put it on my project list. Some three months later after prototyping the touch circuit I’ve finally gotten around to finishing the project. This document is my build log.

Here’s a couple shots of what the pipe sound drop key chain looks like on the inside. I added the red (power), black (ground), and green (S4) wires to aid in prototyping. The sound effect IC is underneath the epoxy blob and plays the pipe sound effect when the S4 pin is brought high. Although this key chain only plays the pipe sound effect when the play button is pressed, if pins S1, S2, or S3 are brought high the sound effect IC will output the jump, coin, or death sound effects respectively.

 

So how can the key chain be made to play the sound effect when the toilet is flushed? My first idea was to affix the key chain to the underside of the reservoir cover and have the trip lever press the play button when the flush handle is pushed down. However, after a bit of experimentation I decided the trip lever was too weak for this and that the sound effect would be difficult to hear over the noise of the flushing if it was inside the reservoir. I was also worried the key chain would come unstuck and clog the toilet; this is after all the place where “Shit happens.”

Therefore I decided to use a simple circuit that would bring pin S4 high when I touched the metal toilet handle. There are many ways to sense touch but to keep it simple I used a sort of Sziklai pair circuit to detect the static electric field that is present on our skin almost all the time. If you are familiar with triboelectric series you’ll know that human skin picks up a positive charge when rubbed by some of the materials used to make clothing. This positive charge is used to switch on an NPN transistor which turns on a PNP transistor which switches the key chain’s battery voltage onto the sound effect IC’s pin. The capacitor prevents the circuit from bouncing so that the sound effect IC is only triggered once. The 100k resistor limits the current through the base of the PNP transistor and the quiescent current should the NPN transistor be partially on. The 1k resistor is suppose to limit the base current of the NPN transistor and keep the high voltages from the static electricity off of the base but I’m not certain how necessary it really is. I think high voltage should leap across the 1k resistor as if it wasn’t even therefore, but I seem to recall that the circuit works better with it in. I prototyped this circuit months ago and have forgotten some of the results of my experimentation. A schematic for the touch sensor follows; comments on how to improve it are very welcome.

 

Here is a picture of the sensor circuit wired up to the key chain.

 

I made an enclosure for the circuit that resembles the warp pipes in Super Mario Bros out of cardboard tubes. The larger tube is from a roll of toilet paper and I think the smaller one came from a roll of sheet plastic. To decorate the enclosure I scaled, printed out, and pasted an image of the pipe taken from the game. To scale the image properly I first split it into two separate images. Then I scaled, while preserving the aspect ratio, the image of the bottom part of the pipe to be 2.5 inches wide because that is half of the circumference of the smaller cardboard tube. Next, I performed the same scaling to the upper part of the pipe, then horizontally stretched it to a width of 2.75 inches which is half of the circumference of the larger cardboard tube. After that, I put both scaled images into a single image to make it easier to print. I left some whitespace in between them to make cutting the pieces out easier. Finally, I printed out two copies of the image, one per side of a single sheet of paper; then cut and pasted them onto cardboard tubes cut to the proper length.

 

Now that I had my enclosure finished I was almost ready to put the circuit inside it. Before I did that I added some long lengths of solid core 24 AWG wire to the circuit. One of which acts as a grounding wire and goes to the water intake valve. The other is the sensor wire which attaches to the 1k resistor and the metal part of the toilet handle inside the reservoir. I also cut out a couple plastic circles from a lid and used them to seal up the ends of the pipe. Please note that although the grounding wire and the S4 wire are both green they are not connected.

 

Once I had the circuit all sealed up all I had to do was connect the wires to ground and the handle. Sorry the picture of the handle connection is out of focus, but you get the idea. Finally a picture of the warp pipe all hooked up and sitting pretty on the toilet.

 

 

Videos
Here’s a video of the Super Mario Bros. Toilet Warp Pipe in action. Notice that I don’t have to flush the toilet to activate it. This way you can amaze your friends without wasting water.

 

Even germaphobes can enjoy the fun!

 

 

Extra Notes
Finally, please be aware that this sort of touch sensor can be unreliable because of the vagaries of static electricity. Sometimes it will trigger before you touch it, other times it will trigger as you move away from it. Sometimes it won’t trigger and other times it will trigger multiple times. Actually flushing the toilet usually activates the circuit more than once. I’m assuming this somehow caused by the water flowing through the grounding pipe. If you can’t make a connection to a metal water pipe, that’s not a big problem because the “grounding wire” for this circuit doesn’t actually have to be at earth potential. As long as your electrostatic field is strong enough to induce charge to move then the circuit will work, just not as well; also there will be a period where re-touching the handle won’t reactivate the circuit because the induced charge hasn’t dissipated yet. If the sensor doesn’t trigger try rubbing your pants on your leg a little bit to generate some static or touching the grounding wire to balance the charge. Sealing up both ends of the pipe with the plastic disks cut down on the loudness of the sound effect and also makes it difficult to replace the batteries; on the other hand, not sealing the pipe could leave the circuit vulnerable to the high humidity in a bathroom.

 

Comments
Constructive comments on how to improve the circuit and my fuzzy understanding (mis-understanding?) of static electricity circuits are greatly appreciated; book titles and article links would be most helpful.

About these ads
 

6 Responses to “Super Mario Bros. Warp Pipe Sound Effect Toilet Touch Sensor”

  1. [...] about a Super Mario Brothers themed bathroom, [Jonathan] decided that it would be pretty cool to have his toilet play the “warp pipe” sound whenever anyone [...]

  2. [...] about a Super Mario Brothers themed bathroom, [Jonathan] decided that it would be pretty cool to have his toilet play the “warp pipe” sound whenever anyone [...]

  3. [...] you are looking for ways to trick your visitors in the bathroom, here’s a great way to make a DIY sound-making device on your toilet. The clever part about this DIY is that the sound [...]

  4. [...] Super Mario Toilet: Now you’re peeing with [...]

  5. Fefo Says:

    Awesome!
    I’m going to try to build one with some PVC pipe painted green and some kind of mechanical switch inside the tank since my handle is plastic.

  6. [...] Super Mario Toilet: Now you’re peeing with [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.