loading
Picture of Fart Operated Random Channel TV Remote
CH4FinishedTopView.JPG
OK, I know that sounds weird, but bear with me for a moment.  My Pops really enjoys two things; 1) channel surfing and 2) farting. 
So one day I was over at http://hackaday.com/ and read about a guy who used his Arduino to turn a TV on and off with one of those brainwave reading headsets.  Then later on that same day I was here at Instructables and a fellow had made an office chair that twitters every time he farted.  So, I got to thinking and decided to mash those two hacks into one remote that changes the TV to a random channel every time he tutes! 
Plus, if you throw it in a plastic enclosure and hide it between the couch cushions, you've got a purdy dang good prank! 

(As an aside, I've done some internet searching and I think this might be the first flatulent operated remote control in the history of the world... I'm happy to be an innovator.)


*****VIDEO UPDATE*****
You asked for it, here's a short video of the remote in action.

 
Remove these adsRemove these ads by Signing Up

Step 1: Parts And Sketches

Picture of Parts And Sketches
The idea here is you have a Methane sensor that smells a fart, then sends a high signal to an Arduino that picks a random number (which will be your new TV channel) and then sends the correct light pulses to an Infrared LED to change the channel.  So to do that I'm going to break up the components list into two parts.  Part One is all set up components and Part Two is stuff that's actually going to be a permanent part of the project.

Miscellaneous Parts:
Arduino (I use a Duemilanove... $30-$35 depending on where you buy it.  I bought mine from Make: as part of a kit http://www.makershed.com/ProductDetails.asp?ProductCode=MSGSA which comes with a Tactile Switch.  But a cheaper option might be to go to Spikenzie Labs and buy an Arduino/Switch combo from them http://www.spikenzielabs.com/Catalog/index.php?main_page=product_info&cPath=12&products_id=40 is the Arduino and the switch is linked lower)
Prototyping shield ($12.50)
http://www.adafruit.com/index.php?main_page=product_info&cPath=17_21&products_id=51
1/4-Size Breadboard ($4)
http://www.adafruit.com/index.php?main_page=product_info&products_id=65
(Or you could replace the ProtoShield and 1/4-Size breadboard with a solderless breadboard)
1X Working TV with,
1X Working TV remote

Part One Components:
1X 10K Ohm 1/4Watt resistor ($0.99 for a 5 pack)
http://www.radioshack.com/product/index.jsp?productId=2062347
1X 100 Ohm 1/4Watt resistor ($0.99 for a 5 pack)
http://www.radioshack.com/product/index.jsp?productId=2062339
5X 15 Ohm 1/2Watt resistors ($0.99 for a 5 pack)
http://www.radioshack.com/product/index.jsp?productId=2062310
1X Momentary Tactile Pushbutton Switch ($0.35)
http://www.spikenzielabs.com/Catalog/index.php?main_page=product_info&cPath=34&products_id=185
1X 38kHz Infrared Receiver Module ($3.95)
http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/177/Default.aspx

Part Two Components:
1X CH4 Methane Sensor ($29.99)
http://www.parallax.com/Store/Sensors/GasSensors/tabid/843/CategoryID/91/List/0/SortField/0/Level/a/ProductID/592/Default.aspx
1X Infrared LED ($1.99)
http://www.radioshack.com/product/index.jsp?productId=2062565
(Some of the resistors from Part One; I'll explain this in a later step)

Optional:
1X Plastic Enclosure (RadioShack sells them, but I was going to use one I picked up at Fry's a while back)
1X 9V battery and battery holder

Tools:
Multimeter (for calibrating your CH4 Methane Sensor)

So if you're starting from scratch you're looking at about USD$86.00.  I'm guessing most folks on this site and looking at this 'Ible already have the tools, Arduino and ProtoShield which would put the cost around USD$40.00 (A $34.00 CH4 Methane Sensor/IR Receiver Parallax order and a trip to RadioShack for resistors/IR LED).

Sketches:
Sketches are linked on the steps that they are used in.  I did my best to document and put notes into my code but I'll be happy to explain anything that isn't clear.  Just ask.

Step 2: Getting Pulse Codes from your TV Remote

Picture of Getting Pulse Codes from your TV Remote
IRreceiverBB.png
IRreceiverDetail.png
UploadSM.png
In order to send channel changing codes from your Arduino you'll have to read your remote's channel changing codes... on your Arduino!  Here's how we'll get that done.

First you'll need to download IRremote.zip below and unzip it into your Arduino's, "Library," folder.  I'm using Arduino version 0018 and my directory looks like this;
arduino-0018/libraries

This is Ken Shirriff's infrared library that's capable of recording and displaying raw pulse codes.  Since it gives raw codes instead of only specific company protocols it should work with any remote sending IR pulses.

Next set up your Arduino like the picture.  If you're looking at the black lense of your 38kHz IR Receiver:
the leftmost Receiver pin gets jumped to Arduino digital pin 11
the middle Receiver pin gets jumped to Arduino Gnd
the rightmost Receiver pin gets jumped to Arduino 5V

Then plug your Arduino into your computer and open your Arduino software.  From the File menu select;
File>Examples>IRremote>IRrecvDump
Click on the Upload button and once your sketch is uploaded to your Arduino click on the Serial Monitor button.  There's a picture pointing out these buttons if you get lost.

Now point your remote at the 38kHz Receiver and you should see your Serial Monitor come to life when you push a button.  We'll want to click the remote buttons 0 through 9 one at a time and save the pulses we get from each so we can clean them up and put them in our Arduino sketch later on.

Step 3: Clean up your Pulse Codes

Picture of Clean up your Pulse Codes
CleanedUpPulses.png
The raw pulse codes come out a little messy for what we want to do with them so we need to clean them up.

1)  Copy/Paste your raw codes into an empty Notepad (or similar) Doc and Label them 0 through 9.
2)  The first pulse (large red circles in the Serial Monitor picture) is a sort of warm up for the IR LED so you want to delete it.
3)  Then move on and delete any negative (-) signs you see in your pulses (small red circles in the Serial Monitor picture)
4)  Go through your code and delete all the spaces leaving a coma (,) between each pulse.

Your finished pulses should look nice and clean like the string of pulses pictured in my code.

Step 4: Test Your Remote

Picture of Test Your Remote
At this point we're going to change the Breadboard on your Arduino to the tactile switch/IR LED setup pictured below.  You'll also need to download my PrankChannelTests sketch linked below. 

Work to do on your sketch:
Replace my channel pulse codes with your pulse codes.  Copy/Paste your cleaned up codes from the previous step to replace the codes I used.  They go between your "{" and "}" brackets.
Also the code is set up to only work for numbers that are actual channels on my TV.  To change this in your sketch you need to modify two pieces of the code.
First is the line just above Serial.println(channel);  You only want a "|| channel == 4" for channels you want printed in your Serial Monitor.
Second is the switch/case;  You only want a
" case 4:
irsend.sendRaw(channel4,68,38);
break;"
for channels you want the IR LED to change your TV to.

Work to do on your Breadboard:
Set up the breadboard exactly as it's shown in the picture:
The left side of the tactile switch goes to Arduino 5V
The right side of the tactile switch goes to Arduino digital pin2 and a 10K Ohm resistor
The other end of the 10K Ohm resistor goes to Arduino Gnd
Arduino pin3(PWM) goes to a 15 Ohm resistor
The other end of the resistor goes to the Anode(+) (longer lead) of the IR LED
The other end of the IR LED, the Cathode(-) (short lead), goes to Arduino Gnd

As a note; my picture shows me using a 15 Ohm, 1/2Watt resistor to limit my infrared LED.  You're supposed to use a 100 Ohm 1/4Watt resistor.  I tried that but only got about 5 feet of range with my remote, so I swapped out the 100 Ohm resistor for 5, 15 Ohm resistors in series (75 Ohm total).  That gave me a little more range, so I decided to slowly remove one 15 Ohm resistor at a time until I had whittled it down to just one 15 Ohm, 1/2Watt resistor.  I'm pretty sure this isn't the best way to treat the IR LED, but it worked so I stuck with it.  I cracked open a real remote control and they used a teeny SMT transistor but I couldn't figure out the schematic they used.  With the one 15 Ohm resistor I ended up with 25-ish feet of range.  So take this as a warning NOT TO BURN UP YOUR IR LED!  This is how I did it, but if you're uncomfortable with this then play it safe and stick with the 100 Ohm, 1/4Watt resistor.

Test it:
With your breadboard modified and your new sketch fixed up with your cleaned up pulses we're ready to test it out.  Plug in your Arduino, upload your sketch and then open the Serial Monitor.
Now when you push the button it'll send signal HIGH to digital pin2 (our trigger pin) which will then display your random channel in your Serial Monitor, delay one second and then flash your pulses to the IR LED, changing your TV channel.  If everything's working, as it should be, then all that's left is to swap out the tactile switch with the CH4 Methane sensor and encase it.

Step 5: Calibrate Your Sensor

Picture of Calibrate Your Sensor
CH4Trigger.JPG
Calibrating your CH4 Methane sensor is pretty easy.  Time to get your multimeter out and sniff some farts. 

Your sensor comes in the mail in two pieces; 1) the sensor and 2) the Parallax breakout board.  The sensor puts out resistive data so it can be plugged into the breakout board either way.  But if you're the type who likes to read it for yourself, here's the data sheet (read under, "Connecting and Testing," and, "Calibrating");
http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/27930-1-2-GasSensor-v2.1.pdf

Work to do on your sketch:
Download my CH4calibration sketch linked below.  Pretty much all it does is make Arduino pin7 your HSW pin, make it an output and set it to low (which turns on your sensor's heater).

Work to do on your Breadboard:
Plug your Methane sensor into your breadboard:
ALR is your Alarm and will be left alone while we calibrate your sensor
HSW is the heater of your gas sensor, connect it to Arduino pin7
+5v is power in, connect it to Arduino 5V
GND is ground, connect it to Arduino Gnd

Calibrate:
Get yourself to a clean-air environment (fart free), upload the sketch to your Arduino and set an egg timer for 10 minutes.  You need to let the heater warm up and the sensor "settle" before you begin calibrating.
When you come back in ten minutes you should have a warm-to-the-touch sensor.
Set your multimeter up to read DC voltage and hold the test terminals to test points 3 and 4 (labeled TP3 and TP4 on the left edge of your breakout board).  You're hoping to read 0.80 Volts.  If you're too low, turn the potentiometer labeled "TRIP LEVEL" counter-clockwise until you get as close to 0.80 Volts as possible.
Once you've got your TRIP LEVEL calibrated to 0.80 Volts it's time to read the voltage across test points 1 and 2.  Again, we're looking for something around 0.80 Volts.  Adjust the potentiometer labeled "SET POINT" up to about 0.80 Volts until the red LED (located at the top, left of the breakout board just under the silk screened "CH4" label) lights up.  This LED lights up when the voltage from your Set Point is greater than the voltage from your Trip Level.  If this LED is lit then it's ALR pin will be sending a signal HIGH, which we will later attach to Arduino Pin2 because that's the input pin we're using as our trigger.  Now turn your Set Point potentiometer clockwise until the red LED just turns off.

OK, so now you have a calibrated CH4 Methane sensor with the red LED off.  Look over your shoulder to make sure you're still the only person in the room and... fart on your Arduino.  Wait for it... WAIT FOR IT... and the red LED turned on!  Hurray, you've done it, your CH4 Methane sensor is calibrated!  If the LED didn't turn on then we've got troubleshooting to do.

Troubleshooting:
If your red LED didn't turn on it's because the voltage from your Set Point didn't go higher than the voltage from your Trip Level.  Check the voltage across test points 3 and 4.  If you're at 0.80 Volts we're OK.  Check the voltage across test points 1 and 2.  You'll show something less than 0.80 Volts... there's your problem.  Get yourself into a clear-air environment and turn the Set Point potentiometer counter-clockwise until you're just under 0.80 Volts.  Fart on the sensor and you should see the red LED light up.  Still no red LED?  We've got one last way to fix that.
If you're still not getting enough voltage from your Set Point, then we'll have to lower the voltage from your Trip Level.  I'd like to take a moment to tell you, that while this will work, it'll also make your sensor more sensitive so you'll have to increase the debounce delay at the end of the void_loop in the final sketch.  To decrease the voltage across your Trip Level, turn your Trip Level potentiometer clockwise until your red LED turns on in a clean-air environment.  Then turn it counter-clockwise until the red LED just turns off.

** If you can't muster a fart or two, the data sheet recommends using Propane as a Methane substitute **

Step 6: Replace Tactile Switch with Calibrated CH4 Methane Sensor

Picture of Replace Tactile Switch with Calibrated CH4 Methane Sensor
Almost there, in this step we're going to replace the tactile switch with your calibrated CH4 Methane sensor and test everything.

Work to do on your sketch:
Download my PrankChannelCH4 sketch linked below, and again, replace my pulse codes with the pulse codes we know work with your TV (you used them in Step 4).  Also replace my channel list with your channel list.
And if you have an overly sensitive CH4 Methane sensor, scroll all the way to the bottom of the sketch.  Replace;
"delay(60000); //60 second debounce for fart to clear out"
with
"delay(300000); //5 minute debounce for fart to clear out"

Work to do on your Breadboard:
Leave your Breadboard the same as the previous step and:
Connect CH4 Methane ALR to Arduino digital pin2 (Do not plug this into Arduino pin2 until after the Arduino has been plugged in and the heater warmed.  This takes about 10 minutes)
Put resistor/IR LED circuit back in between Arduino digital pin3(PWM) and Arduino Gnd.

Connect your Arduino to your computer, upload the sketch, open the Serial Monitor, plug the jumper wire from your CH4 Methane sensor into Arduino Pin2 (after a 10 minute warm up) and you're ready.  Point the IR LED at the TV and break wind.  The red LED on the CH4 Methane sensor should light up, a random number should pop up in your Serial Monitor and a second later your TV should change to the random number in your Serial Monitor.

Congratulations, you have just recreated [what I believe to be] the first ever TV remote operated by farting.  You feel that?  It's not light-headed-ness from farting all day... that's success, my friend!

Step 7: Enclosure

If you're going to hide this between the cushions to drive somebody mad when their TV goes haywire [because they don't realize it's linked to their farting] then you'll want to put it in an enclosure to keep it safe.

I didn't get around to doing this though.  I was working on this project one day (messing with the code) and my Old Man came home early from work!  He walked through the door, lunch pail in hand, and saw me... blue faced and trying to fart on my Arduino.  I tried playing it off cool, "No Pops, it's not what it looks like... everybody's doing it these days, I swear!" but he wasn't having any of it.  He figured out what I was up to and the gig was up. 

So I didn't put it in an enclosure, BUT it isn't rocket science.  Drill a hole in the front for the IR LED and drill a hole in the top to stick the mesh bit of the gas sensor out of.  Everything else goes inside the box. 

Hide it between the cushions, aim it at the TV and wait for the person sitting on the couch to fart. 

You've done it.
1-40 of 73Next »
gtakács2 months ago

What a time to be alive!:) Science!:)

djsfantasi1 year ago
You just gave me an idea for a device to be placed in the bathroom, to indicate to others (wife, specifically) when it is "safe" to enter.
ExtraNormal2 years ago
I bought 4 of these off of ebay! thanks Schmidtn. I was able to calibrate the tuner module so that every time my sister farted, Oprah turned on.

j/k
Can't wait to try these!
techboy4112 years ago
LOLOLOLOL!!
so cool
i wish i had an Arduino........
Have you officially named this amazing creation of yours? It needs a name worthy of its ingenuity and awesomeness. The assmote?
dudesurge3 years ago
i have an arduino nano from http://www.dealextreme.com/p/arduino-nano-v3-0-81877 its uber cheap the only down side is it takes a while to arrive but its worth the wait and kinda wanna make this at some point
LesB3 years ago
Totally deranged. I Love it!
Instead of connectting to a TV, one could connect to claxon horn and flash warning lights and switch on a fan. Never sneak one by again.
Schmidtn (author)  LesB3 years ago
Yes, it's a pretty cool platform for doing just about anything once a fart is picked up.
almamater3 years ago
LOL its great for zapping
kylekosan234 years ago
was that a REAL fart????
Schmidtn (author)  kylekosan234 years ago
Yes it was, the gas sensor will only change the channel if it smells a real fart.
Hello Schmidtn,
I am using 0021 and an Uno . I read some more on line and in the end copied into Hyperterminal. I didn't copy it right ( it was late at night) so the code didn't work right. I will try again and keep you posted .
I also wanted to compliment you on your step by step approach to putting a project like this together and testing it as you go along...very wise! It also makes it much easier to trouble shoot each step as opposed to when the project is complete and a puff of magic smoke is all there is to show for it.
Thumbs up and bravo,
Build_it_Bob
Schmidtn (author)  Build_it_Bob4 years ago
Yes, please keep me (us) posted. I'm interested to see how it turns out.

Also, thank you for the kind words.
Sucess using Hyperterminal and copy paste . I just had to make sure the commas were correct and then it worked for a samsung tv power off/on command . I removed power from the arduino , re-powered and tried it again a few times and it worked each time . This is something that can now be expanded and used in other projects !
Yea Team!
Arduino coupled with good instructables ( and teachers!) make for awesome learning.
Many Thanks!
Build_it_Bob
franspaco4 years ago
hahaha good one
I am trying to "Copy" the readings and can't seam to highlight them ?? Is there a step that i am missing?
Thanks for your help with this as i was able to to decode my Sherwood RC-119 remote by disconnecting pin 11 every time I seen the NEC 32 bit code come up on the serial monitor.
Build_it_Bob
Schmidtn (author)  Build_it_Bob4 years ago
So you can't highlight the pulses in the serial monitor window? Are you using the version 0018 IDE? When I did this project I pushed each button, one at a time, and then copy/pasted the entire thing over into a notepad document. If it wont let you do that (and this would really suck) you might have to enter them in by hand.

It should work just like copying something from a normal word document, just highlight everything and Ctrl+C it, then go over to your notepad doc and Ctrl+V.
etopsirhc4 years ago
most epic device ever made!
PaulCote4 years ago
Now put it in a chair :) it would be a funny prank xD Nice job!
agis684 years ago
prrrrrrrrrrrrrrrrrrrrrr, prrrrrrr, prrrrrrrrrrrrrrrrrrrrrrrrrr,prrrrrrrrrrrrrrrr,prrrrrrrrrrrrrrrrrr,prrrr,=well job in electronics, change your diet, Instructables Admin open the f@T## windows!!!!!!!!!!!!!!
lazyjoe215 years ago
You should add a mode that changes the channel based on the intensity of the fart. Like channel 1 when its a silent but deadly and channel 999 for the loudest and longest in duration.
kitik lazyjoe215 years ago
Loudest and longest isn't always most powerful though. But the SBD should get extra points for its potency. Total fart power reflects a combination of 3 variables -- intensity, spread, and persistence. If there were a way for the sensor to reward farts that were terribly stinky, covered a large area, and/or lingered profusely, that would be the ultimate.
Schmidtn (author)  lazyjoe215 years ago
You could do that. I'm assuming a more intense fart would linger longer, so I'd start a timer when the CH4 Methane sensor's Alarm triggers HIGH and stop the timer when it triggers LOW. Then, based on how big the number on the timer got up to, you would used that timer value to set the TV channel. Bigger number = higher channel. You could make a party game out of it.
what if theres multipul farts would it then channel surf for him?
Schmidtn (author)  riverreaper5 years ago
Yes, within a limit. There's a one minute debounce for the fart to clear out. So, as long as the farts are a minute apart, he could channel surf by farting.
NOW, we're talkin' I like where this is going
Questor5 years ago
better than a "Clapper"
Speaking of clapper, that would be interesting to link it to the light's so the light's flicker when every they fart.
or mount the vibrating unit from a "Magic Fingers" to the frame of the chair they're sitting on . . .
databoy5 years ago
In Australia you can buy a fart remote unit from Jaycar for $12.95 AUD. http://www.jaycar.com.au/ Cat No: GH1088.
vmod32 databoy5 years ago
That's not the same as this at all... Try reading things closer next time..
Not the same, but fart related. He was just trying to contribute. It's better if our maker family is nice to each other and less judgemental.
Aw come on, Vmod wasn't being rude. Very diplomatic and neutral with a helpful suggestion. I'll take whatever flak ensues if my comment to the MadCobbler is misinterpreted. (This is not an attempt to "troll.") Have a great day Mr. MadCobbler!
No problem, just a difference of opinion. I just thought telling Questor to "read things closer next time" was a bit confrontational and making an assumtion on the intent and purpose for his posting. I felt Questor was not "off topic", but just providing info about another fart related gadget (admittedly not a remote, or in the same league though) for those that might be interested. Sorry if I have caused a stir, I certainly don't want to cause a distraction to Schmidtn's fine project. I'm done. - Peace out. -
well a fart machien could be of use if your fartless an wanted to test it as your ajusting the settings or even if you just plainly wanted to swich the channel right befor a climax in a stupid show he was watching when you wanted to watch barrny the dinisor insted . just a thought ....
Questor databoy5 years ago
that is an electronic whoopee cushion
pollom5 years ago
specially designed for this guy http://www.youtube.com/watch?v=qJDbLWROTII
michabailey5 years ago
The problem is, many channels don't actually exist, and entering them gets you nowhere. What you would need to do is compile a list of all the channels that work, and have it choose from those. Of course, you could always set it to something specific, say, Nicktoons...
Schmidtn (author)  michabailey5 years ago
I actually did make it so it only changes the TV to real channels that work. To alter the code to work with your TV provider's channel listing go to, "Step 4: Test Your Remote" and follow the instructions under "Work to do on your sketch"
1-40 of 73Next »