Introduction: System for Automatically Limiting TV Time

Picture of System for Automatically Limiting TV Time

Most of us spend far too much time in front of the TV. So I designed a system that will automatically limit when and how much the TV can be on. The system works by controlling the input signal going to the TV. This is done by adding a relay switch to the input cable. When certain conditions are met, the relay is turned on and the TV is able to receive the input signal. Using an Arduino microcontroller, you can program the system to only allow the TV to be on for a certain amount of time each day or between certain hours. You can setup a pin code so that only certain people can turn it on. You could even set it up so that the TV will not turn on unless you have done a certain amount of exercise that day. The system is very versatile and can be customized to fit your needs.

This project is a remix of the project "No TV unless you exercise!" by user "plays in traffic." I saw this project a while back and I just had to make my own version. I attempted to broaden the scope of the project and make it more adaptable to alternate configurations.

Step 1: Watch the Video

Here is a video walkthrough of the project.

Step 2: Materials

Picture of Materials

Here are the materials and tools that I used when making this project.

Materials:

Arduino Microcontroller and Power Supply

5V Relay (the coil current must be less than 30mA)

Diode

Perf Board

Insulated Project Enclosure

Input Connector Cables for your TV

Input Switching Box (optional)

Jumper Wires

Tools:

Screw Driver

Soldering Iron and Solder

Wire Cutters

Wire Strippers

Hot Glue Gun and Glue Sticks (optional)

Step 3: The Control Circuit

Picture of The Control Circuit

The control circuit for this project is very simple. It is basically just an Arduino microcontroller and a 5 volt relay. In order to power the relay directly from the Arduino, the coil of the relay needs to be rated for 30 mA or less. If your relay requires more than 30 mA, then you need to add a transistor to drive the relay. The normally open terminal and common terminal of the relay are connected to the input cable. The coil of the relay is connected to one of the digital pins and one of the GND pins on the Arduino. A diode is connected in parallel with the coil of the relay to protect the Arduino from voltage spikes that can occur when the relay turns off.

Normally the digital pin is set LOW. This means that the relay is turned off and the two halves of the input wire are disconnected. In this state, the signal cannot reach the TV. But when the digital pin is set HIGH, the relay turns on and connects the two halves of the input cable. This is how the Arduino determines when the TV receives the signal from the input device.

Step 4: Select the Appropriate Connector Cable

Picture of Select the Appropriate Connector Cable

The first thing that you need to do is get a connector cable that matches the input terminals on your TV and the signal source. The most common types are Coaxial cable, RCA cable, and HDMI cable.

Step 5: Cut the Cables and Remove the Outer Insulation to Expose the Internal Wires

Picture of Cut the Cables and Remove the Outer Insulation to Expose the Internal Wires

Next we need to cut the connector cable in the middle. Then strip off about 2 inches of the outer most layer of insulation to expose the first layer of internal wires. Separate and peel back these wires to expose the next layer of insulation. Strip off about half of this exposed section of insulation. This will reveal the inner wires. Twist the first set of wires together. Then twist the second set of wires together. You should now have two separate strands of wires that you can connect these wires to a relay switching circuit.

This simple procedure will work well for RCA cables and coxial cables. However, HDMI cables are a little more complicated. There are a lot of wires inside an HDMI cable. If you want to try to manually separate the wires of an HDMI cable you will need a lot of time and patience and you need to be very careful. An alternate method that might make things easier is to use an HDMI break-out board such as this one.

Step 6: Solder the Relay Circuit Together

Picture of Solder the Relay Circuit Together

Start with a blank piece of perf board. Solder the relay onto one side of the board. Then solder the diode onto the board adjacent to the relay and connect the leads of the diode to the coil terminals of the relay. Next you need to connect the wires from the input cable.

The inner most sets of wires can just be soldered back together by attaching them to adjacent holes and connecting them with a bead of solder. The outer set of wires in each cable will all be grouped together. With RCA cable these wires are all connected together as a ground. So it won't affect the signal. These wires are soldered to the board. Then a jumper wire connects them to the switch terminals of the relay.

The last connections to make are the wires that will connect to the Arduino. Connect one wire to each terminal of the relay's coil.

Step 7: Connect the Relay Circuit to the Arduino

Picture of Connect the Relay Circuit to the Arduino

Now you need to connect the relay circuit to the Arduino. Connect the wires from the relay board to the Arduino so that the anode of the diode is connected to one of the GND pins on the board. Then take the wire that is connected to the cathode of the diode and plug that into one of the digital pins on the Arduino board. It is very important that you get these polarities correct. If you accidentally reverse them, you could destroy the Arduino.

Step 8: Mount the Parts Inside an Insulated Project Enclosure

Picture of Mount the Parts Inside an Insulated Project Enclosure

Find a large insulated project enclosure. Then attach the relay circuit and the Arduino to the inside of the housing with a small drop of hot glue. A small drop of hot glue will be just enough to hold the boards in place but still allow you to remove them later if you want. Cut holes and slots in the back of the housing for the cables and power cords and sensor wires.

Step 9: Decide on How You Want the TV to Be Controlled

Picture of Decide on How You Want the TV to Be Controlled

Now you need to decide on the set of conditions that will allow the TV to be connected. There are a lot of ways that you can do this.

The simplest method is to use a simple timer. For example the TV will only be connected between certain hours (such as 6PM to 8PM). Another option is to set a certain number of hours each day that the TV can be on. This limit the number of hours like the first option but is not restricted to a certain time of day. You can also create pass codes that will only allow certain people to turn the TV on. If you want to make sure that your family gets more exercise, you can set up the system so that the TV will only turn on if you have done a certain amount of exercise that day. The possibilities are endless. So use your imagination.

In the next few steps, I will give some examples of how you could set the system up in different ways.

Step 10: Use a Simple Window Timer to Activate the TV

Picture of Use a Simple Window Timer to Activate the TV

The simplest kind of control program is a window timer. Here is a very basic example of this. Once the system is activated, the TV will be connected for 1 hour (3600000 milliseconds). Then it will be off for 23 hours (82800000 milliseconds). This will create a one hour window each day where the TV can be watched. You can easily change the timing of this by changing the values in the code.

Alternatively, you could set up a button to activate the TV watching time. This would let the user select when the TV may be on but still limit the total number of hours per day that it is on.

Step 11: Set Up a Pass Code for Authorized Users to Activate the TV

Picture of Set Up a Pass Code for Authorized Users to Activate the TV

Another variation on the design that you could implement involves setting a pass code so that only authorized users can turn the TV on. This can easily be done with the TV remote. All you need to do is add an infrared receiver to the Arduino. You can check out an example of how to do that here: https://www.instructables.com/id/Control-Any-Circui...

You can either use a single key button as in the example, or you can create a secret combination of buttons that will activate the TV.

Step 12: Create a Sensor to Only Turn on the TV If You Have Exercised

Picture of Create a Sensor to Only Turn on the TV If You Have Exercised

My favorite way to control a TV limiting system is with exercise. The simplest way to do this is to set up a sensor on an exercise bike that will send a signal to the control circuit when someone is pedaling. This will let you program the system to only let the TV be on while someone is exercising on the exercise bike. The more you want to watch TV, the more you have to exercise. You can see a good example of this kind of system in the project "No TV unless you exercise!" by Instructables user "plays in traffic."

Another way to set up this kind of system is to use a heart rate monitor. Here is an example of a simple DIY heart that was published by Make magazine.

Other good examples of DIY heart rate monitors include the following instructables:

https://www.instructables.com/id/Microcontroller-me...

https://www.instructables.com/id/Electrocardiograph...

https://www.instructables.com/id/Simple-DIY-Pulse-S...

https://www.instructables.com/id/Smart-Heart-Monito...

You can use the heart rate sensor to measure how active the person is being. So you can program the system to only let the TV be only while the person's heart rate is elevated. Or you could program it to only turn on if the person has had their heart rate above a set level for a certain number of minutes a day (indicating that the person has exercised).

Step 13: Connecting the Sensors to Your Arduino

Picture of Connecting the Sensors to Your Arduino

Most ways that you might set up your TV limiting system will requires sensors of one kind or another and these need to be connected to your Arduino. Connecting sensors to an Arduino is easy. There are two main kinds of inputs with an Arduino. There are analog inputs and there are digital inputs.

Analog inputs detect the relative voltage of a signal. To measure an analog input, connect the ground wire of the sensor to one of the GND pin on the Arduino. Then connect the signal wire to one of the analog input pins on the Arduino. Then set this pin to input mode and use the analogRead function in the Arduino code. The Arduino will then measure the voltage of the input signal and turn it into an integer value between 0 and 1023. This corresponds to a voltage between 0 and 5 volts. Analog inputs are a good way to monitor signals that change over time.

Digital inputs just detect whether a signal is above a certain threshold voltage (3 volts for a 5 volt Arduino). These are useful for detecting simple on-off states. Is the signal there or not. To use this king of input, connect the ground wire from the sensor to one of the GND pins on the Arduino. Connect the signal wire to one of the digital pins on the Arduino. Then set this pin to input mode and use the digitalRead function in the Arduino code. The Arduino will then measure the voltage of the input signal and register it as either HIGH (above 3 volts) or LOW (below 3 volts).

Step 14: Use Your TV Limiting System

Picture of Use Your TV Limiting System

Set up the box with the control circuit near your TV. Then plug one end of the cable into your TV and plug the other end into the signal source. I used an RCA cable to connect my XBOX 360 to the TV. Lastly connect your chosen sensors that will control they system.

This system is an interesting way to cut back on the amount of TV that we consume. Use your imagination and have fun.

Comments

NandanM (author)2017-05-22

Great content and keep it up !

lagcatfour (author)2016-04-10

Awesome!

CorgiCritter (author)2015-09-21

Cool. I need this for youtube, I watch way too many knife and gun reviews.

dillonxti (author)CorgiCritter2016-03-17

a good firewall can do this

retweet!

plays in traffic (author)2015-09-17

This is really cool! Thanks for the shout-out, too. Nice work

Datawolf (author)2015-09-17

How do you prevent the unplugging of your Arduino box ?

You could prevent it from being unplugged from the TV by simply making it the only connector cable in the house. You could prevent it from being unplugged from the power supply by having backup batteries. There are a number of options. But when you get right down to it, if someone is determined, they will get past any system.

plouc (author)2015-09-17

You also could power the TV from the exercise you did (or are doing at the same time to save a battery). That will make it a greener project!

That is a good idea. I just don't have my bike generator set up yet.

About This Instructable

11,975views

125favorites

License:

Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:36 Things to Cook in a Coffee MakerHow to Make a Festivus PoleAdd Wings to an Infant's Halloween Costume
Add instructable to: