DSC02815.JPG
I previously made a slideshow on my DIY TV-B-Gone, and many people requested I make an Instructable. So, the first in a series of DIY TV-B-Gone clones, is the TV-B-Gone Micro!

Technically, because TV-B-Gone is a brand name, this is a "TV-B-Gone clone."

The TV-B-Gone is a neat little device that can turn almost any TV on or off. It uses a microcontroller hooked up to IR LEDs to output a library of on/off codes. Adafruit sells a kit, and has the code as well as the schematic on their website.

Here's a micro clone of the TV-B-Gone that runs on a coin cell battery, is slightly bigger than a quarter, and costs about $3.50 (compared to $20) to make!
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials and Tools

DSC02805.JPG
TVBGONE schematic.JPG
Here is a list of what you will need.

Materials: All of these prices are if you buy only one of each part. If you buy in bulk, like I did, it will actually have a cheaper unit price. For me the total was less than $3.50, for you maybe more if you only buy one of each part.

You will also need some 2032 batteries to power it. DON'T FORGET!

Tools:
  • AVR programmer (I used a USBtinyISP, a good, cheap programmer made from a kit)
  • Computer with internet access; I predict you are using one right now :-)
  • Soldering iron with solder
  • Helping hands tools, very helpful
Now let's get started!
1-40 of 261Next »
crusso says: Jun 19, 2013. 5:35 AM
Great instructable!!!!!
Just one question: would it work with an ATTINY85-20PU?
jacobanders12 says: May 25, 2013. 8:04 PM
would a 22uF 50v capacitor work?
hilukasz says: Mar 10, 2013. 2:48 PM
do you even need the resonator? since you can reset the fuses on attiny so it runs at 8mhz?
dark sponge (author) in reply to hilukaszMar 11, 2013. 9:28 AM
Nope! See steps 2 and 4.
furrysalamander says: Feb 25, 2013. 4:45 PM
I'm building a V1.2 with one of these: https://www.sparkfun.com/products/10732 Instead of two. What parts can I remove? Can I get away with just the capacitor, the led thing, the resonator, and the microcontroller? I plan on connecting the power wire directly to the batteries, and the digital wire to the microcontroller. Also, if I do that, should I add an extra capacitor, or just have the power for both run through the same one. And lastly, can you help me modify the code so that it stops when you let go of the button instead? Or maybe let me change between the two options with a switch? I'm putting it inside a toy sonic screwdriver. Please reply ASAP, I have a birthday party coming up and I need to finish it.
dark sponge (author) in reply to furrysalamanderFeb 27, 2013. 5:23 PM
If you use that LED, the only things you can take out are the transistor and the resistor that connects it to the microcontroller. Just connect the CTL pin of the LED chip to the output pin on the microcontroller. You shouldn't have to add an additional capacitor, but if the microcontroller resets often you may want to substitute a larger one.

As for the code, you shouldn't have to modify it. I would recommend leaving the button in the way it is right now to save battery, but if you want to wire it for single press operation there should be a schematic on Adafruit's website. The microcontroller would be wired directly to power but the sense pin (pin 6 I think) would have the button between it and ground.

Version 1.1 has worked perfectly fine for me and I've never found a TV I can't turn off.

Good luck and have fun! I'll try to respond more quickly next time if you have any more questions.
furrysalamander in reply to furrysalamanderFeb 25, 2013. 5:59 PM
Okay, so I've poked around in the code, and I now know that the 1.1 has way less codes. Is there a way to merge the codes and the format from 1.2 with the main program from 1.1 so that I can use a 1.1 circuit? Or probably simpler, just modify the 1.2 code to work with a 1.1 circuit? I really need help, and I'm pretty sure that this can be done. Also, as far as hold down button until tv turns off and let go, this would require changes to the circuit as well. PLEASE PLEASE PLEASE help me figure this out, this is my best friend and I need to have everything ready to order within the next two days because their birthday is on the 13th. :-|
furrysalamander in reply to furrysalamanderFeb 25, 2013. 5:00 PM
Wait, does v1.2 have more codes? I'm fine with sticking with v1.1 if they have the same amount of codes!
furrysalamander says: Feb 26, 2013. 2:30 PM
Please please please help me!
mbotond says: Feb 21, 2013. 10:19 AM
Which microprocessor replaces the Attiny85v? I can't find Atmel products in Romania.
pabhilash says: Feb 1, 2013. 3:14 AM
Hi! Great I'ble.. so i have a question. I have a spare ATMEGA328 i can use(got it off an arduino clone). Can i use that instead of the ATTINY? (p.s, i'm assuming it already has a bootloader installed because i have uploaded sketches to it a few times.) Thanks! :)
dark sponge (author) in reply to pabhilashFeb 1, 2013. 6:56 PM
Sadly, no. If you want to use the precompiled code, you need to use an Attiny85v.
karabey says: Dec 5, 2012. 1:06 PM
Does anybody have the actual Codes?
dark sponge (author) in reply to karabeyDec 6, 2012. 4:38 PM
There is a link in step 5 for a .zip download containing the code.
dubstepmaker says: Nov 28, 2012. 11:21 PM
excellent.
degen S. says: Oct 22, 2012. 9:10 AM
hey i,m new at this programing i was wondering if you could just give me a step by step instruction on the arduino software i've done a lot of research on arduino and if you could just give me a step by step tutorial that would be great. i bet it would help a,lot of people too. but if you could that would be fantastic. and ya that,s were i
know arduino and i just need to know what type arduino you used and the software.
titan69 says: Sep 28, 2012. 1:11 PM
Hi there, how would i change the fuses using an arduino uno, i get a blinking led working on the attiny85 using the arduino but cant seem to figure out how to do this step with only an aduino uno.
titan69 in reply to titan69Sep 29, 2012. 9:02 AM
Edit

Figured it out, what i did was i used the ardunio-1.0.1 software and did the following:

1- Opened Arduino program and selected tools>board>Attiny85(external 20mhz clock)
2- Click open tab and click ArduinoISP.
3- Connected all wires of arduino uno to attiny85.
4- Then navigated to C:\Users\arduino-1.0.1\hardware\tools\avr\bin and opened this path in command prompt.
5- Entered the following command (remember to put your com port):

avrdude -p attiny85 -P com6 -c stk500v1 -b 19200 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

And everthing worked.
dark sponge (author) in reply to titan69Oct 1, 2012. 2:00 PM
Glad you figured it out, sorry for the late reply. Thanks for leaving the how-to for other people!
ke7ofi says: Sep 24, 2012. 3:49 PM
What would I need to do to only use the narrow beam LED and a AA batter? I can't really code, but I could struggle through it. Range isn't really an issue, as I'm fitting it in a sonic screwdriver with a reflective cone to boost range a bit, and I'll be close enough that it shouldn't matter.
nodoubtman says: Sep 2, 2012. 11:34 AM
20$ shipping cost is ridiculous..!!! mouser :(
RippedNerds says: Aug 9, 2012. 1:13 AM
(removed by author or community request)
dark sponge (author) in reply to RippedNerdsAug 9, 2012. 2:43 PM
Whoa, fun video! I noticed a bunch of people asking where you got it, maybe you could post a link.
earthtown says: Aug 4, 2012. 11:28 PM
Packaged mine in a "door alarm" from Big-Lots (4 for $1...also got a reed switch, batteries, and speaker in parts). Added some sparkfun.com swag just to be flashy...the "geek" sticker wouldn't fit on there, I tried.
tvb01.jpgtvb02.jpgtvb03.jpg
dark sponge (author) in reply to earthtownAug 5, 2012. 9:22 AM
That looks awesome! Thanks for posting pics!
Michael_Bell says: Jun 27, 2012. 11:24 AM
If i use the internal oscillator, I just omit the external one from the schematic, right?
dark sponge (author) in reply to Michael_BellAug 5, 2012. 9:22 AM
Correct.
batman96 says: Oct 14, 2011. 4:57 PM
Hi Dark Sponge, You seem to know the most about tv b gones. I build electronic stuff, but I use discrete components, and have yet to use any micro controllers. I wanted a Tv B Gone, but wanted to build my own, I think I asked you about using a universal remote as one a couple of years ago. So here is what I did. I found the Tv B Gone data as a wav file on the net. I loaded it onto my mp3 player only to find that it can't play wav files. I converted it to mp3 and then heard some nice fax machine sounds. I made a Infa Red plug for my mp3 player out of a mono jack and two leds one facing each direction, (I found how to wire it in a article about using a Iphone as a universal remote). So the Idea is that I bring my mp3 player when I am going to be in waiting rooms and such, so when i want to shut off a tv I just plug that in instead of headphones. But my mp3 player doesn't have enough power to light them, If I run it though a small amp taken from a set of old computer speakers it works fine and shuts off all of my tvs, but that is to big to take with me. I already tried turning up the audio file on the computer, it is louder, but still doesn't light them. I know it works, obviously the I phone puts out enough power to work, the IR leds I am using are the dark ones, although I tried the ones out of a ball mouse too. Are there any that have a lower voltage? Thanks, Batman96
Michael_Bell in reply to batman96Jun 27, 2012. 10:26 AM
sorry for replying to such an old comment, but can you post a link to the wav file?
batman96 in reply to Michael_BellJun 27, 2012. 11:00 AM
That's OK.

I have no idea where the website I got the files from are, but if you PM me your email I can send them to you, it seems you can't upload a file into a comment.
Also I have individual WAV files for each TV type, and I have them all combined into 4 WAV files, tell me which you want, or if you want all of them. All together the files are about 15MB.

I've found that there are no mp3 players that put out the required voltage to light the led's, you have to run the audio through some sort of amplifier, I wanted to make a very tiny in line amp that used a transistor and watch batteries, but I couldn't get enough quality, the sound degradation was so bad that the TV wouldn't recognize the signal, so you either have to use a bigger amp like I did, or make a high quality mini amp.
dark sponge (author) in reply to batman96Oct 22, 2011. 10:54 AM
In that situation I would advise just building a simple amplifier with a transistor that would plug into the mp3 player and be powered by a separate battery. I don't know why it doesn't already light them, it should have enough power. But If it works with the computer amp, a smaller pocket amp should work too. You could maybe even get it to run off of a coin cell. Good luck!
blinkyblinky says: Dec 13, 2011. 2:26 PM
Is there a way to use Arduino code?

I have an Arduino to ATtiny programmer...do you think that would work?
Michael_Bell in reply to blinkyblinkyJun 27, 2012. 10:24 AM
avrdude -c arduino -p t85 -P [your arduino comport here for example if it was comport 15 it would be '-P com15'] -b 19200 -U flash:w:tvbgone.hex
dark sponge (author) in reply to blinkyblinkyDec 13, 2011. 3:50 PM
I think you can use the Arduino as a programmer to send this code to the ATtiny chip. You could also try to write your own code in arduino, but I would recommend just using the premade stuff.
blinkyblinky in reply to dark spongeDec 13, 2011. 6:23 PM
Yeah, you can. Can you program the original code in through it though?
TobaTobias says: Mar 13, 2012. 9:18 PM
Hi, great project. Do you think I could program the Attiny with Arudino as ISP on my mac?
Michael_Bell in reply to TobaTobiasJun 27, 2012. 10:12 AM
Nevermind I figured it out. You need to change the command abit:

avrdude -c arduino -p t85 -P COM2 -b 19200 -U flash:w:tvbgone.hex

Change the programmer to the Arduino, include the port to whatever port your arduino is on ie com port 2 would we '-P com2', make sure the p is capitalized, and change the baudrate to 19200, The baudrate was the thing that was messing me up
Michael_Bell in reply to TobaTobiasJun 25, 2012. 7:38 PM
sorry for the bump, but have you had any luck with this?
dark sponge (author) in reply to TobaTobiasMar 14, 2012. 2:03 PM
That should be able to work, but I'm not sure. I know it has been done on a PC but I am not very familiar with ISP programming on macs. You might be able to find instructions on a forum somewhere...
acerpeng229 says: Jan 30, 2012. 6:56 PM
what pnp transistor to use
1-40 of 261Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!