Enough Already: Silencing Celebs with Arduino

Uploaded by makemagazine on Aug 16, 2011

I’m getting a little sick of hearing about the same people on TV over and over and over
again so I decided to do something about it. This arduino project, which I call “The
Enough Already,” will mute the TV any time any of these over exposed personalities is
mentioned. I’ll show you how I made it.
So at the core of this project is your basic Arduino board. On top, I added the Video Experimenter
Shield from Nootropic Design. You can solder the kit together yourself or buy the board
preassembled. Like the Arduino, the Video Experimenter Shield is open source hardware,
so if you want to make your own version of this board, you can find schematics online.
The Video Experimenter Shield is going to decode the closed captioning text track, which
is actually broadcasted with the NTSC picture signal. I’m going to connect my cable box’s
composite output into the video input on the shield. To initially set up the board, I’ll
connect the video out of the shield to my TV, but once I have it set up, I can disconnect
that and watch the TV through the HDMI cable that connects directly to the cable box.
So I loaded up the closed captioning example sketch from Nootropic Design’s website and
installed the enhanced TVOut library. Once the Arduino was going, I made some adjustments
to the two potentiometers until I could see the bits from the closed captioning track
flashing. These lines are being generated by the Video Experimenter Shield and being
overlayed onto the video to help out with setup. Once it looks like it’s working,
check the serial monitor on your computer. You should start to see the closed captioning
data pouring in. Imagine all the cool stuff you could have your Arduino do with this data!
Anyway, to mute the TV, I’m going to use an IR LED. This will send my television’s
remote control mute command when a keyword is caught.
I used Ladyada’s IR tutorial and example sketches along with this IR sensor on a seperate
Arduino to figure out my remote control’s mute command.
Her IR transmission example was written to trigger a Nikon camera, but I found it very
easy to modify it to mute my TV, based on the codes outputted by the receiver sketch.
Getting your arduino to act like an infrared remote control I think opens up a world of
possibilites for your Arduino projects. So I highly recommend you check out Ladyada’s
IR tutorial.
OK, so I moved the IR transmission functions over into the closed captioning sketch and
I wrote the code to look for the keywords and mute the TV. Here’s a basic overview
of the logic behind the code: Keywords are stored as an array of strings at the top of
the sketch. When one of them comes through the closed captioning track, we’ll add 30
seconds to the Arduino’s current count of time since it was powered up and we’ll store
that value. If we’re not already in a muted state, we’ll send the IR command to mute
the TV and store the current state as muted.
Down further in the sketch, we’ll be repeatedly checking to see if the TV is muted and if
we’ve passed the time that it should mute until. If both conditions are true, we send
the IR Mute command to unmute the TV and save that state.
Now, any time a keyword is mentioned, the TV will mute for 30 seconds. And If, during
that 30 seconds that keyword is mentioned again, the timer resets, ensuring that we
only unmute the TV after we haven’t heard the keyword for a full 30 seconds.
“Our producers caught up with Kim Kardashian earlier today to find out what she was planning
on wear to her--”
It should do a pretty good job of protecting our ears from having to hear about the details
of Kim Kardashian’s wedding.
Anyway, I’ll put a link to the code in the description below, feel free to take a look.
It’s essentially just a mash up between Ladyada’s infrared tutorial and the Video
Experimenter Shield’s closed captioning example.
And if you have a great idea for how you might use either bits of these code, please leave
a comment below. Until next time, so long.