Step 4: 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:
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.
<p>What a time to be alive!:) Science!:)</p>
You just gave me an idea for a device to be placed in the bathroom, to indicate to others (wife, specifically) when it is &quot;safe&quot; to enter.
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. <br> <br>j/k
Can't wait to try these!
LOLOLOLOL!! <br>so cool <br>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?
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
Totally deranged. I Love it!<br>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.
Yes, it's a pretty cool platform for doing just about anything once a fart is picked up.
LOL its great for zapping
was that a REAL fart????
Yes it was, the gas sensor will only change the channel if it smells a real fart.
Hello Schmidtn, <br>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 . <br>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. <br>Thumbs up and bravo, <br>Build_it_Bob
Yes, please keep me (us) posted. I'm interested to see how it turns out. <br><br>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 ! <br>Yea Team! <br>Arduino coupled with good instructables ( and teachers!) make for awesome learning. <br>Many Thanks! <br>Build_it_Bob
hahaha good one
I am trying to &quot;Copy&quot; the readings and can't seam to highlight them ?? Is there a step that i am missing? <br>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. <br>Build_it_Bob
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.<br><br>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.
most epic device ever made!
Now put it in a chair :) it would be a funny prank xD Nice job!
prrrrrrrrrrrrrrrrrrrrrr, prrrrrrr, prrrrrrrrrrrrrrrrrrrrrrrrrr,prrrrrrrrrrrrrrrr,prrrrrrrrrrrrrrrrrr,prrrr,=well job in electronics, change your diet, Instructables Admin open the f@T## windows!!!!!!!!!!!!!!
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.
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.
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?
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
better than a &quot;Clapper&quot;
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 &quot;Magic Fingers&quot; to the frame of the chair they're sitting on . . .
In Australia you can buy a fart remote unit from Jaycar for $12.95 AUD. http://www.jaycar.com.au/ Cat No: GH1088.
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 &quot;troll.&quot;) Have a great day Mr. MadCobbler!
No problem, just a difference of opinion. I just thought telling Questor to &quot;read things closer next time&quot; was a bit confrontational and making an assumtion on the intent and purpose for his posting. I felt Questor was not &quot;off topic&quot;, 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 ....
that is an electronic whoopee cushion
specially designed for this guy http://www.youtube.com/watch?v=qJDbLWROTII
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...
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, &quot;Step 4: Test Your Remote&quot; and follow the instructions under &quot;Work to do on your sketch&quot;
Oops... *facepalm* Apparently I missed that... .
Fartastic idea !!!
This has to be the most ridiculously amazing inventions since breathing. I applaud your skill and humor. Good job. *****
Agreed. Ridiculous, amazing, etc. But the breathing part is getting harder every time the sensor is triggered! Finally, something we *might* be able to call the first non-commercial use of Smell-o-vision. Keep up the good work everybody, between this and the &quot;coin slot detector&quot; we may be able to integrate warning lights into the back pocket design of future fashions- and save the rest of us from an assault from the rear! Phew! Enough!
Got a vids? :D
I've tried but there's a couple problems. There's a lot going on in a one second span. From filming the initial tute, to the red LED lighting up on the CH4 Methane sensor, to the TV changing channels. Also there's a one minute debounce where you can't trigger it again. I'll keep trying and if I get anything promising I'll YouTube it and add a link.
Oh... My... God...<br> <br> I could totally see someone going:<br> <br> *pfrrt!*&nbsp; &lt;click&gt; &quot;What the...&quot;<br> <br> (cautiously) *pfffffrt?* &lt;click&gt; &quot;What in the...&quot;<br> <br> (straining) *pffffrrrrrrrSPLAT* &quot;God dammit...&quot;&nbsp; &lt;click&gt;
ingenious better than a whoopie cushion or a fart machine awesome.
Sometimes I wish instructables had a like button.

About This Instructable




Bio: Former custom bike manufacturer, spent four years in the military and now I'm an Industrial Engineer spending my free time thinking up things to ... More »
More by Schmidtn:How To Have A Talking Dog Zombie Overrun Gingerbread House Fart Operated Random Channel TV Remote 
Add instructable to: