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!

Step 1: Materials and Tools

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!

  • 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!
<p>Hi,</p><p>See another instructable shown below.</p><p><a href="https://www.instructables.com/id/Burning-TV-B-Gone-Firmware-Using-Arduino/" rel="nofollow">https://www.instructables.com/id/Burning-TV-B-Gone-...</a></p><p>or</p><p><a href="https://www.instructables.com/id/Dirt-cheap-ATtiny-85-Tv-B-Gone-plus-arduino-as-isp/" rel="nofollow">https://www.instructables.com/id/Dirt-cheap-ATtiny...</a></p><p>regards,</p>
How to program these instructions from Arduino Uno?<br>
<p>Hey, i don't have resonator of 8Mhz. i can put a of 4Mhz?</p>
Hi ! how can i change the code to use it in other avr micro like atmega32 or others??
<p>hi! I was wondering if it would be possible to make this same circuit using 4 leds, and if so would I have to change the resistors? Also, do you know if it would be possible to change something so this runs on 1.5 volts?</p><p>Thanks,</p><p>-E</p>
<p>never mind on the 1.5 v battery question, I've found something in the garage that will work.</p>
<p>Is it possible to build something similar for a garage door?</p>
<p>i have test not work :D</p>
Hey, could someone drop me an email at&quot;legojoe5401@gmail.com&quot;<br>To explain in more depth either how to upload hex using arduino or how to get my hands on a preprogrammed adafruit TVB chip as the link above no longer works. Thanks
<p>For this could you use a 100 ohms resistor</p>
<p>How to Program using arduino</p>
<p>you've solved?</p>
<p>Can u send me you email? or something for contact to you.</p><p>me: oscar.dimetrix.97@gmail.com</p>
heloo Brother its rely amazing trik <br>i want to Buy 5 pcs <br>you dilvr for me in Dubai? <br>i will pay you all Expance, <br>whatsapp +971506378534 <br>email ch.yousuf7 @ gmail . com
<p>hi guys i am not good at that think but can you not buy one online</p>
<p>What is the link?</p>
What's the fun in that? :P
<p>This is really awesome, dude. I currently have it built on a breadboard, as I was going to test it before making the connections permanent, but as luck would have it my tv was subject to a power surge which destroyed the receiver for the remote with lightning precision. So I was wondering, what is the range of this? I apologize if you said it in the Instructable, but if you did then I missed it.</p>
<p>I mean how to upload the tv b gone files using arduino to attiny85</p>
Would using a preprogrammed chip from the tv b gone kit work if I made it the same way you did while using it?
Would using a preprogrammed chip from the tv b gone kit work if I made it the same way you did while using it?
<p>hi great tutorial,but i dont know where did i go wrong.<br>i build both to breadboard (with resenator and without (versio 1.1))<br>but nothing happens. no blink no nothing.</p><p>is this because i used Attiny85-20pu instead Attiny85v-10pu</p><p>thanks.</p>
<p>It seems Attiny85-20pu clock speed is faster than the Attiny85v-10pu and uses slightly more power 2.7 - 5.5 volts which therefor it should work and flash it through an arduino @ 16mhz. (Attiny85v-10pu = 8mhz &amp; 1.8 - 5.5 volts)</p>
It would be cool if put it in a lighter or a keychain flashlight!
the IR leds just glow constantly,no blinking...what could be wrong
<p>they are blinking 38000 times per second :P you think that you can see that?</p>
<p>Made instructable about it. Check my profile.</p>
<p>Why do you reset uC with High state? (connected to 5V instead of GND)</p>
<p>I made this on a breadboard , but whenever I give it power, the status LED turns on, but the IR Leds don't blink. Does anyone know of anyway This can be Solved?</p>
How do you know if it's blinking or not? I light I'd invisible to the human eye, and most cameras these days have IR blocking filters.
*is invisible
This would be awesome in an Altoids Smalls tin! I already have an Adafruit TV b gone in a full size Altoids tin.
<p>does this shut off all tvs at once?</p><p>How do I make it with arduino?</p>
It doesn't shut off every TV at once. How it works is all the on/off signals are stored on the chip and when you turn it on it cycles through them one at a time, so it can take up to one or two minutes to get all the TVs.
<p>Hi! What's the firmware version you use?</p><p>thank U!</p>
<p>Aubtin. I was looking for an inexpensive programmer to make this Instructable. After a lot of looking, I came across this and bought it. It's only $4.99 and has free shipping. <a href="http://www.ebay.com/itm/161128775429?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649" rel="nofollow">http://www.ebay.com/itm/161128775429?ssPageName=ST...</a></p><p>Two things: It only comes with a 10 pin connector cable. But if you look at the pinouts of the 10 pin and the 6 pin cables, they have the same data lines. The 10 pin connector just has 4 extra unused ones. So it's pretty easy to run wires from the 10 pin connector to your programmer board and make it work. I did.</p><p>The second thing is that this instructable is written to use the USBtinyisp programmer. When I tried to use my programmer it failed. Here's the trick. You need to edit the AVR instructions to tell it to use a different programmer. Copy and paste this and then it will work:</p><p>Avrdude -c usbasp -p <br>attiny85 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m</p><p>Followed by:</p><p>avrdude -c usbasp -p attiny85 -U <br>flash:w:tvbgone.hex</p>
<p>Thanks a lot man! I thought that the fuses were programming also... heheh :) i think i got wrong.. :) hahah</p><p>thanks!<br>marC:)</p>
<p>I'm not sure why you used the resonator at all. The attiny85 has an 8 Mhz internal oscillator that is pretty accurate and if there are inconsistencies, you can calibrate the internal oscillator within +/- 1%, via </p><p>http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf</p><p>page 164. The only issue I can possibly see is that the temperature change can cause a frequency swing. Can you get back to me about this? I would like to build one of these in the next few days and if I can minimize components I would prefer to. </p>
<p>Very good article. I used this as the basis for my PCB build. Pictures are below.</p><p>One more thing, I noticed were at least one of the comments mentioned problems programming without the oscillator/crystal connected. You can program the chip first, then set the fuses. This will let you program the ATtiny on either a breadboard or a programming board before sticking it into the circuit. To do this I like to use a GUI for AVRDUDE called AVRDUDESS. Google it, it is great, and makes programming a snap.</p>
<p>Thanks :)</p>
<p>I tried uploading the code and got these errors</p><p>sketch_nov04g.ino:32:18: error: main.h: No such file or directory</p><p>sketch_nov04g:326: error: duplicate 'const'</p><p>sketch_nov04g.ino: In function 'int main()':</p><p>sketch_nov04g:354: error: invalid conversion from 'uint16_t' to 'const prog_char*'</p><p>I have no idea what they mean or how to fix them, any help would be appreciated. </p>
<p>I had to include the port and the transmission rate so it could work with my arduino, but I was able to upload the code without problems: <br></p><p>avrdude -c arduino -p attiny85 -P com3 -b 19200 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m</p><p>avrdude -c arduino -p attiny85 -P com3 -b 19200 -U flash:w:C://tvbgone.hex:i</p><p>(I used the other fuse because I don't have a resonator)</p><p>The problem I have is it doesn't works, I followed and reproduced the schematic but without including the resonator, and I used a small LED to test it but the LED doesn't lights up continuously like I would expect from a remote control.</p><p>Is it the circuit diagram different when you don't use a resonator, if yes how do I connect it?</p>
<p>I've been able to solve the problem: I bought a 8MHz oscillator (the big metallic one) as a substitute of the resonator, that solved all the issues.</p><p>Tip: If you are programming your Attiny at 8MHz you might want to leave the oscillator connected during all the process. In my case I got the &quot;Yikes&quot; problem whenever I forgot to connect the oscillator. </p>
<p>Also I've noticed another thing, the switching action isn't controlled by the program, instead, in order o make it work you need to power the whole circuit. I don't have a problem with this, but I've found<strong> the code just runs once</strong>, when it has been run it just stops, and <strong>you need to turn off and then turn on the circuit in order to make it work again</strong>.</p><p> And the problem becomes larger if we have a capacitor going from positive to negative, that gives the chip some power to keep it on for some more seconds or minutes, depending on how big it is. That means if you turn it off and on again it wont do nothing, I've added a bleeding resistor of 10k to solve this, but the ideal thing would be to loop the code so it could run as long as the button is pressed.</p>
<p>Well, I could also put the capacitor before the button and increase the value of the bleeding resistor.</p>
<p>could you make this one smaller without modifications or does it have to be all spread out and wide like that? Thanks. I wanna cram one inside a 2005/2010 sonic screwdriver toy.</p>
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.
Edit <br> <br>Figured it out, what i did was i used the ardunio-1.0.1 software and did the following: <br> <br>1- Opened Arduino program and selected tools&gt;board&gt;Attiny85(external 20mhz clock) <br>2- Click open tab and click ArduinoISP. <br>3- Connected all wires of arduino uno to attiny85. <br>4- Then navigated to C:\Users\arduino-1.0.1\hardware\tools\avr\bin and opened this path in command prompt. <br>5- Entered the following command (remember to put your com port): <br> <br>avrdude -p attiny85 -P com6 -c stk500v1 -b 19200 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m <br> <br>And everthing worked.
I was still confused about steps 4 and 5, could either make a short video, or go more into depth?
<p>Hi, </p><p>Sorry for the late reply, ill try to go more in depth as i dont have any Attiny85's to play around with at this moment to make a video.</p><p>For step 4, my Arduino software is on my desktop, so click on the arduino folder and navigate to </p><p>arduino-1.0.5-r2\hardware\tools\avr\bin</p><p>In the bin folder you should see a whole bunch of exe files, the one we will be looking for is: </p><p>avrdude.exe</p><p>For Step 5, we want to first see what com port we are using, so connect your Arduino, go to 'Device Manager' and you should see your port(mine is 3), remember your com port number for later:</p><p> </p><p>Now in you arduino folder that you opened up earlier and navigated to </p><p>arduino-1.0.5-r2\hardware\tools\avr\bin</p><p>open up command prompt, to do this press ctrl+shift and right click at a blank spot in the bin folder, then in the dropdown menu click 'Open command prompt window here'. Now your command prompt will be pointing to the correct folder.</p><p>Now type:</p><p>avrdude -p attiny85 -P com3 -c stk500v1 -b 19200 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m </p><p>Hit Enter and hope it works, remember to change your com port accordingly</p>

About This Instructable




Bio: Hi! I've loved electronics and electricity for as long as I can remember, and electric projects are something I do in my free time ... More »
More by dark sponge:DIY TV-B-Gone SHP (And Save $45) $3.50 DIY TV-B-Gone Micro $4 DIY TV-B-Gone 
Add instructable to: