Introduction: The Matrix Effect With Arduino and TV
Remember the movie The Matrix? Of course, who can forget that one!
Remember the code-falling-down-the-screen effect from the movie? Very unique!
Are you interested in creating a similar effect with an Arduino and a TV?
What you will need:
1 Arduino (You need ATMega328 for this project. ATMega168 will run out of memory!)
1 TV (Any standard TV works as long as it has an RCA input . Current market LCD TVs might not work.)
1 RCA Cable
1 breadboard (Half-size works)
1 1K Ohm Resistor
1 330 Ohm Resistor (470 Ohm also works)
1 Potentiometer (To control the speed of the falling code. More info in step 2.)
I've made this instructable keeping in mind readers who are absolute rookies. You can also refer to it if you just want to learn to connect a TV to an arduino. Also, please excuse my crappy camera. I will be uploading better pictures soon.
Before we begin, here's a preview of the final product. Compare the project video with a clip from the movie itself.
Now, let's put this together.
Step 1: Place the Resistors
Plug in the two resistors as shown. We want one single output from both of them.
Step 2: Place the Potentiometer
The potentiometer will be used to control the speed of the falling code. It gives a nice interactive touch to the project. Here's how to connect it:
A pot has 3 pins. One of them is output and the rest two are hot and ground (picture 1). Polarity doesn't matter in case of hot and ground pins; you can use them either ways. Place the potentiometer as shown in picture 2.
Step 3: Attach the RCA Cable
You need only one RCA cable. Whether you choose red, white or yellow cable doesn't matter.
1. Cut off the plug from one end and expose the ground and hot wires inside. Hot is the center and ground is the outside. Attach them to two wires as shown in picture 1.
2. The hot wire goes to the single output from the two resistors. The ground goes to GND pin on arduino which the potentiometer shares with the cable since both of them have a ground. Take a look at pictures 2 & 3.
3. Plug the other end of the RCA cable into your TV's video input (yellow color).
Step 4: Attach the Arduino
Now we bring all the pins to the Arduino.
1. In picture 1 you see three pins. The ground pin GND will be shared by the potentiometer and the RCA cable. For the remaining two pins (Sync & Video) you need to figure out which one goes where on your type of arduino. Picture 2 will guide you with that. Sync goes next to 1K resistor and Video goes next to 330 ohm resistor. Picture 3 shows Sync & Video connected on my arduino.
2. The potentiometer ouput is analog and goes to pin A0 on arduino. Potentiometer's hot pin can either go to 5v on Arduino or to digital pin 2. I used digital pin 2 (picture 4).
3. Picture 5 includes all of the above together.
Step 5: Install the TVout Library
1. Thanks to the good folks over at MIT, we have a friendly environment to work with while programming an arduino for a TV. Here's the download page. Please download TVoutBeta1.zip, older versions will not work with my program.
2. After you've downloaded, extract all the files to Arduino\libraries\ folder.
3. Open the Arduino software and check if the library is visible under examples (picture 1). If it is, the library was properly installed.
Step 6: Upload the Program
Download the program and upload it to your arduino.
Step 7: Watch It Happen!
Turn on your TV, tune to AV channel and see if it works. If it doesn't, check Sync & Video pins on the Arduino. Sometimes you have to switch them around. Try different pairs from picture 2 of step 4. A few switches and it should work.
Enjoy The Matrix effect! Turn the potentiometer to speed up or reduce the falling speed. Watch as the random letters come together to display THE MATRIX in the middle of the screen. Here's what it should look like:
Step 8: What You Can Try Next
The only main thing that lacks in my project is a green color display like in the movie. This probably needs opening up the TV. I did not attempt that because not only I did not have enough time, but also because I am not good at electrical stuff.
Warning: Old TVs have large capacitors that store charge for long periods. There is a risk of serious injury due to electrocution. Seek expert advice before you attempt to open your TV.
I'd be happy to see a green color display if anyone makes it. Thanks for reading this instructable.