Whether you're in an airport, restaurant or waiting room, the insidious grip of televisions on human life is omnipresent. Sometimes it's nice to talk to other human beings while looking at them directly—actually hearing what they have to say.
Thankfully, there's a DIY device called TV-B-Gone, which can help you bring back this wonderful pastime of acknowledging one another by turning off any and all TVs in the area—at any time! It can also help us prank our loved ones or confuse our teachers.
- Arduino microcontroller
- Infrared LEDs
- 220-ohm resistor
- Jumper wires
Before jumping right into building the circuit, let's take a look at the components and what each of them does, so you have a basic understanding of what's actually going on.
Simply put, the Arduino microcontroller is a tiny programmable computer that can interact with physical objects. In our project, we're going to program the Arduino to interact with the television. To do this, we need to download the Arduino IDE. This is the program that lets us write and load code onto the Arduino controller.
This is a really wonderful platform for beginners, and I urge anyone who thinks it's too hard to get into electronics to start here. Arduino makes it simple to blink lights, make tunes, and use all kinds of sensors. For now, all you need to understand is that the Arduino is programmed via USB using the Arduino software.
An infrared LED, or light emitting diode, is an electronic component that shines infrared light when current is applied to it. Because infrared light is outside the visual range for humans, we cannot see it. However, most digital cameras can translate this light into a visible purple color.
The IR LED is the only component in this circuit with a polarity. That means that all of the other components can go into the circuit in any orientation, as they work in either direction.
A resistor is a component that resists the flow of electricity. It essentially takes in electricity on one side and releases a smaller amount on the other.
For this experiment, we'll need the resistor to protect our infrared LED. The output voltage on the Arduino is too large and would damage the IR LED. By placing the resistor in the circuit with the LED, we reduce the load on the LED to a manageable size. The 10k resistor is a "pull-down" resistor in this circuit. We will use it to make sure the Arduino does not get confused when our button bounces up and down upon pressing.
The colored stripes indicate their values. Check out this chart to determine the values of your resistors.
The button is rather a straightforward component. When we press the button down, two points of metal are connected together and electricity flows through. When we release the button, those metal contacts are separated again and the circuit is broken.
We will be breaking and connecting a circuit to tell the Arduino when we want to turn a television on or off.
A breadboard is simply a means of creating circuits without having to solder wires together. It allows us to make the TV-B-Gone without making permanent mistakes. Along the side of the breadboard is a red rail for positive voltage. This is where power for the IR LED will come from.
Next to it is a black rail for negative or ground. This is where our circuit must end if it is to be connected and allow electricity to flow. The rows coming out sideways from the center of the breadboard are connected horizontally, but not vertically. By selectively placing components in these rows, we can electrically connect the correct pieces and separate the others.
Above, you can see the metal traces that connect the holes underneath the breadboard. Putting two component leads into one of the vertical lines pictured will connect them electrically.
Set your breadboard and Arduino beside each other. Connect the 5-volt pin from the Arduino to the red power rail on the side of the breadboard. Connect the ground on the Arduino to the black rail on the side of the breadboard.
Place the IR LED on the breadboard so that each leg rests in a different row. The negative side has a shorter lead, while the positive side is longer. Connect the positive side to digital pin 3 on the Arduino. Place the 220-ohm resistor so that it connects the negative side of the IR LED to ground on the breadboard.
Place your push button on the breadboard away from the IR LED. Connect one leg to pin 2 and the other leg to the power rail on the breadboard. Where pin 2 connects to the button, use the 10k resistor to connect to ground.
Connect the Arduino to your computer with a USB cable. Download this zip file containing the code for the TV-B-Gone. Open the TVB.pde file and paste its contents into the main window in the Arduino environment.
On the top right-hand side of the window, there's a button with an arrow pointing to the right. This button creates new tabs in the program's window. Click it and name the tab "main.h". Open the main.h file from the zip folder and copy/paste the contents into the "main.h" tab. Make another tab for the "WORLDcodes.cpp" file and copy paste its contents into that tab. Your program now has all the information it needs to run properly.
To make sure everything is working, press the play button on the top-left of the window. If the code compiles correctly, you should get a "Done compiling" message at the bottom. Click the right facing arrow, this time at the top left of the screen. This is the upload button. Press this button to load your program onto the Arduino.
Now that your code is loaded, bring your TV-B-Gone to the nearest television. Point the IR LED at the TV and press the button.
Infrared communication is a little odd. We could not have simply shone a constant infrared light at the TV. The IR receiver in a television set detects infrared light only when it is blinking at a certain frequency, usually around 38khz or 38,000 times per second. In this way, the TV cannot be interfered with by naturally occurring infrared light from the sun. The variations in the frequency determine which command is relayed to the television.
The TV-B-Gone code contains all of the most common pulses that turn on and off television sets. When you press the button, it plays them all one after the other.
Now that your TV-B-Gone is working, you can unplug it from the computer and power it with a 9 volt battery. Find a cool case to keep your meddling under the radar and have fun!
Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.