Introduction: Dirt Cheap ATtiny-85 Tv-B-Gone(switches Off Any TV!), Plus Arduino As Isp

Picture of Dirt Cheap ATtiny-85 Tv-B-Gone(switches Off Any TV!), Plus Arduino As Isp

The TV-B-Gone is a great little piece of engineering, and coding. Along with the appropriately named tiny, AT-Tiny, we can make an amazing universal tv remote which can turn of any TV. This was originally sold as a kit, but we are going to make it ourselves, using Mitch Altman's code. The total cost for me was under 4$

Step 1: Materials, and Tools

Picture of Materials, and Tools


Atiny 85 A crystal (depends on your attiny 85 model, If confused leave a comment, and i shall tell you if you need it, or not)

ir leds

a transistor

status led, and an accompanying 330 ohms resistor (optional)

perf board/proto board

wire, and solder

c2032 battery, and an accompanying battery holder.(if you use a different battery, get a voltage regulator if the battery's voltage is higher than 5v.)

push button, preferably a small one

22uf capacitor

150 ohm ressistor

A programmer, I used arduino uno as isp ( more on that later)

*** if using arduino as isp, then you also need a 10uf 16 v capacitor, and a 220 ohm ressistor


Soldering iron (plus solder)

wire strippers

glue gun(optional)

Next we shall make it

Step 2: Programing

fuses - Depending on your at tiny model, you might need an external resonator. I had an attiny 85-20pu which ran on an external resonator, so I burned an alternate the boot loader (found in the boards section of arduino) which allowed it to run on the internal oscillator. If all this confuses you, then stay on the safe side, and use a ATtiny85V-10PU

Using an Arduino as isp- First go to examples, and Arduino as ISP, and burn that on your Arduino, then follow the tutorials below to burn the appropriate tvbgone code(found below).

Using these comprehensive tutorials, program the attiny with a arduino.

Link 1, click here (opens in new tabs)

Link 2, click here (opens in new tabs)

If you have an avr programmer then use these tutorials

Link 1, click here (opens in new tabs)
Link 2, click here (opens in new tabs)

the files to be flashed on the Attiny are availible here- ATtiny code

If you do have a breadboard on hand, I do recommend making the circuit on the next page first on the breadboard, just to verify that your at tiny has been flashed properly.

Step 3: Soldering

Picture of Soldering

Solder your project using the schematic above. Since 1 battery is very unstable, and did not give me enough amp output, I wired 2 batteries in parallel, to support my 3 high power IR leds. If you use lower power IR leds, or fewer leds, then 1 battery should be able to support the amp draw.

If you want to use different batteries such as 9 volt batteries, then attach a voltage regulator if the battery's voltage is higher than 5v. Attaching a voltage regulator is extremely easy, and there are plenty of tutorials online. Just remember, this is only needed if the battery your using is over 5v.

Step 4: Finishing Touches.

You can now hide this in any casing to make it more discrete, or you could apply clear heat shrinking over the whole pcb. I left mine bare, as I like it that way.

Please don't hesitate to leave any questions,coment, or concerns below.

For more personal questions you could also email me at-

Thanks to Dark Sponge, and his tvb gone, which inspired me to make this build.


--scientists-- (author)2017-11-04

Great job..I have a question for your tvbgone tutorial..why u use 2 pins of attiny as IR output>>??

powpher made it! (author)2016-09-19

Hi there,

I'd tried to make this project this weekend.

Actually as other trialer, I encountered how to burn the tvbgone11.hex firmware to ATTINY85 thrugh ArduinoISP writer.

Luckily, I found by google how to make it.

① find avrdude.exe and avrdude.conf (maybe in arduino/bin/ folder)

② move hex file to C:/ root folder

③ Open Dos window command prompt

④ move to avrdude directry,

⑤ type

avrdude -c avrisp -P COM4 -b 19200 -p t85 -U flash:w:.tvbgone11.hex

(change COM port # or hex file name and path)

It was not enjoyable how to burn the firmware , but eventually I had done

by "はやねさん工房” information. Thanks a lot はやねさん!!

And thank you very much for your uploading Saral-san!



Kostas Sarioglou (author)2016-02-17

i have an attiny85 20pu. i wave not changeed any bootloaders or fuses( i am running at 1 mhz). what should i do? use an external oscilaotor and how can i boost it to 8mhz?

arduinomaster (author)2015-11-02

No external crystal is needed. Well I assume as I will build this next.When you buy a new ATtiny 85 chip it runs on 1mHZ. So set the Arduino IDE to 8mHZ, then burn the boot loader and it changes to 8mHZ> then upload program by holding down the shift key. Good luck Arduino folks.

ThijsD1 (author)2015-10-31

Does this work for europe aswell?

Saral Tayal (author)ThijsD12015-10-31

Yes, check out this link ... It contains version 1.2 which supports an external swtich to control EU vs US televisions.

ThijsD1 (author)Saral Tayal2015-10-31

Thanks for the reply, another thing is you do not really specify how to change the fuses to use an external oscillator and how to mount it to the attiny85

Saral Tayal (author)ThijsD12015-10-31

Hey again,

I do apologize if any information was not clear. After all, I do this as a hobby and to educate people, not as a paid incentive.

For the fuses, you can either use internal or external ones. I chose to use the external one, as I heard that the internal ones are not too accurate, and they drain a lot of power. Plus, I had external ones laying around.

You choose the fuses when you are uploading the bootloader to the Arduino. For how to attach the external oscillator, please refer to the schematic that I created for this instructable. All of that information should be there. If you have any more concerns, please ask. I am glad to help any maker.

slatinski (author)2015-10-10

okay i did that and the ir leds are only glowing,,not blinking,where could i be wrong

Saral Tayal (author)slatinski2015-10-15

Strange, perhaps you have a capacitor attached to the leds that are making them glow rather than pulse. Also, please do reupload the code, and make sure that it compiled properly. If you have a spare arduino, then you could also upload the code to it and test with less variables that could fail. The only reason that I used the ATtiny was due to its discrete size.

Good luck

TechnicalKid (author)2015-10-04

what code should i use for the arduino software ?

Saral Tayal (author)TechnicalKid2015-10-05

hey, do you mean the arduino as an isp code or the at-tiny code??

TechnicalKid (author)Saral Tayal2015-10-06

I mean the code wich i can use to programm the Attiny

and yes i will use the arduino as isp

TechnicalKid (author)Saral Tayal2015-10-06

I mean the code wich i can use to programm the Attiny

and yes i will use the arduino as isp

TechnicalKid (author)Saral Tayal2015-10-06

I mean the code wich i can use to programm the Attiny

and yes i will use the arduino as isp

TechnicalKid (author)Saral Tayal2015-10-06

I mean the code wich i can use to programm the Attiny

and yes i will use the arduino as isp

TechnicalKid (author)2015-10-04

what code should i use for the arduino software ?

OhYeahThatGuy81 (author)2015-03-09

Two questions:

1. Why do you have a polarized 22uF cap across your batteries?

2. Why is pin 6 connected with pin5 on the attiny85?


1. The small capacitor acts a noise filter and provides power if the voltage of the batter dips for a moment. This prevents random bootups if the device draws too much power for a moment.

2. Pin 5 and 6 both provide the signals to switch the transistor. It is again a failsafe and supplies the needed current to operate the transistor.

Hope this helps

Victor805 (author)2014-11-01

I'm a bit confused, what's the difference between a resonator and an oscillator? I've seen other people using three legged ceramic resonators, and I'm a quite surprised because you posted a picture of a 20MHz "resonator" with a metal body and two legs, also in the schematic a 8MHz resonator appears but it only has two connections.

Can I use a metal "oscillator" like the ones in the picture below (left) instead of a resonator (right)?

Maybe I'm mixing the therms and all those components are the same and do the same thing.

Saral Tayal (author)Victor8052014-11-01

Hey in this project both should work. I recommend that you use the 2 legged resonator/oscillator, as I am not very sure on how the3 legged ones work. If I am not mistaken, the middle leg of the 3 legged oscillator is connected to ground, or just left disconnected. The point of these oscillators/resonators are to provide 'fuses' or a clock speed for the attiny chip. You can configure the oscillator/resonator you use by selecting the appropriate clock speed while burning the bootloader. In the final product, due to space constraints, I burnt a boodloader that utilized the internal oscillator.

If you are still confused, feel free to ask more questions. :)

diy_bloke (author)Saral Tayal2015-02-14

the 'two legged one' is in fact a crystal :-) both the Crystal and the resonator can be used to run an oscillator :-)
Yes, with the resonator the middle leg usually goes to ground.
The crystal usually has 2 capacitors going to ground

Saral Tayal (author)diy_bloke2015-02-15

Great. Thanks for the information

Victor805 (author)Saral Tayal2014-11-02

Thanks, that dissipated some of my doubts. I heard you can use the internal 8MHz internal oscillator by setting up the appropriate fuses, but I'll try to use an exterior 8MHz crystal for now.

I also heard that when using an external oscillator you should use a pair of capacitors with it, but I'm not sure about the values or how to place them.

I'll buy a crystal tomorrow to let you know how it went.

Victor805 (author)Victor8052014-11-04

It works fine with the oscillator, thanks!

rpotts2 (author)2014-12-19

quite nice! favorited!

BlueD2 (author)2014-11-26

I too had this problem, solved it by including the following into the sketch :

#include <Arduino.h>

#include <WProgram.h>

also note that if using Arduino as ISP you need to select that in the programmer when putting the code on the ATTiny45

dudes (author)2014-11-04

I tried uploading the code and got these errors

sketch_nov04g.ino:32:18: error: main.h: No such file or directory

sketch_nov04g:326: error: duplicate 'const'

sketch_nov04g.ino: In function 'int main()':

sketch_nov04g:354: error: invalid conversion from 'uint16_t' to 'const prog_char*'

I have no idea what they mean or how to fix them. Any help would be greatly appreciated.

Saral Tayal (author)dudes2014-11-05

Hey try this

not mine, but I trust fellow makers!

If it works please let me know, and I will add his link as a reference in my instructable

Good Luck

Saral Tayal (author)dudes2014-11-05

Sure, I will help you 'dudes'. for some reason I can't direct;y reply, but posting new comments will work, I am sorry. To begin with, are you using arduino as isp, or some other programer? are you following the tutorials I posted above. I am sorry, but even I am new to the world of electronics, but I am willing to help you through the journey

dudes (author)Saral Tayal2014-11-05

No worries :). I am using arduino as ISP (with a home made programming shield).

dudes (author)dudes2014-11-05

and those are the exact tutorials I used to program it.

About This Instructable




More by Saral Tayal:V3, No Weld, 3D Printed, Electric Longboard3D Printed electric Longboard V2Intro to 3D Printing
Add instructable to: