350-DIY-TV-B-Gone-Mico

18
http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/ Home Sign Up! Browse Community Submit All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech $3.50 DIY TV-B-Gone Micro by dark sponge on August 17, 2010 Table of Contents License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Intro: $3.50 DIY TV-B-Gone Micro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 step 1: Materials and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 2: To Use an Oscillator or Not... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 3: Prep for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 4: Program the Chip Part 1: Fuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 step 5: Program the Chip Part 2: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 step 6: Begin Construction! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 step 7: Add the Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 step 8: Add the Resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 step 9: Add the Transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 step 10: Start the Ground Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 step 11: Add the Resonator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 step 12: Solder the LEDs Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 13: Add the LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 14: Add the Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 step 15: Form More Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 step 16: Form More Connections Part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 step 17: Add the Battery Holder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 step 18: Optional: Add an Indicator LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 step 19: Add a Battery and Have Fun! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Transcript of 350-DIY-TV-B-Gone-Mico

Page 1: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Home   Sign Up!   Browse   Community   Submit

   All     Art     Craft     Food     Games     Green     Home     Kids     Life     Music     Offbeat     Outdoors     Pets     Photo     Ride     Science     Tech

$3.50 DIY TV-B-Gone Microby dark sponge on August 17, 2010

Table of Contents

License:   Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Intro:   $3.50 DIY TV-B-Gone Micro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 1:   Materials and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 2:   To Use an Oscillator or Not... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 3:   Prep for Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 4:   Program the Chip Part 1: Fuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 5:   Program the Chip Part 2: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 6:   Begin Construction! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 7:   Add the Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 8:   Add the Resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 9:   Add the Transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 10:   Start the Ground Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 11:   Add the Resonator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 12:   Solder the LEDs Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 13:   Add the LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 14:   Add the Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 15:   Form More Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 16:   Form More Connections Part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 17:   Add the Battery Holder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 18:   Optional: Add an Indicator LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

step 19:   Add a Battery and Have Fun! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Page 2: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

License:   Attribution Non-commercial Share Alike (by-nc-sa)

Intro:  $3.50 DIY TV-B-Gone MicroI 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. Adafruitsells 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 ToolsHere is a list of what you will need.

Materials:

Attiny85v microcontroller - $1.82CR2032 battery holder - $0.628MHz resonator - $0.50Wide-angle IR LED - $0.20Narrow-bean IR LED - $0.18NPN transistor - $0.10150 ohm resistor - $0.0522uf capacitor - $0.02Small pushbutton - $0.27 (note: this is slightly different than the one I used)

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 youmaybe 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 wither internet access; I predict you are using one right now :-)Soldering iron with solderHelping hands tools, very helpful

Now let's get started!

Page 3: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. CR2032 battery holder.2. Attiny85v.3. 8MHz resonator.4. IR LEDs, the wide angle one should have a blue tint.5. NPN transistor.6. 150 ohm resistor.7. 22uf capacitor.8. Pushbutton.

File Downloads

TV-B-Gone micro.sch (122 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'TV-B-Gone micro.sch']

step 2: To Use an Oscillator or Not...The first thing you need to do is decide whether to use to use an oscillator. Here is the info to let you make your choice:

Advantages of and Oscillator:

It is much more accurate and doesn't vary near as much as the internal oscillator. This can make the difference between it working and not.

Disadvantages:

It adds about 50 cents extra cost.It takes up more space.It adds slightly more complexity.

I highly recommend you use one, but it is not required. I'll include instructions for both ways.

step 3: Prep for ProgrammingIf you have a programming board, you can skip this step. If you are using a USBtinyISP or similar, use a breadboard to wire the chip to the proper connections of theprogrammer. Because all programmers are different, I won't include a pin map for the programmer. The pinout for the chip can be found on the datasheet here.

Page 4: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

step 4: Program the Chip Part 1: Fuses"Fuses" are a very small part of the microcontroller's memory that tell it how to operate, such as which oscillator to use, enabling the reset pin, and so on. Will will need tochange the fuses to run off of an external oscillator. I used http://www.engbedded.com/fusecalc, which is a free AVR fuse calculator. I included images of this, but youdon't need to use the calculator because I listed the commands here.

I use AVRdude to interface between the programmer and my computer. A tutorial on how to use AVRdude can be found here.

If you are using an oscillator, use

Avrdude -c usbtiny -p attiny85 -U lfuse:w:0xfe:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

If you are not, use

Avrdude -c usbtiny -p attiny85 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

Proceed to the next step for programming the real code!

Image Notes1. The next four pictures (including this one) are what you would do if you wereusing the fuse calculator yourself.

Page 5: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

step 5: Program the Chip Part 2: CodeThe first thing you will want to do is connect the oscillator on the breadboard. Because it is now set to run with one, it has to have one to be programmed with one.

Download the firmware v1.1 from Ladyada.net at http://ladyada.net/media/tvbgone/tvbgone11.zip. This is for their kit, but I used it to program this and it worked. Unzip thefolder and find the tvbgone.hex file. Copy this and put in C:\users\username where AVRdude can find it. Now, in AVRdude, type

avrdude -c usbtiny -p attiny85 -U flash:w:tvbgone.hex

and wait for it to put the code on the chip. Now let's get building!

Image Notes1. Make sure you have the oscillator on the breadboard at this point. The outerpins of the oscillator go to pins 2 and 3 of the microcontroller, the center pin goesto ground.

Page 6: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

step 6: Begin Construction!Bend pins 1 and 8 around so that they nearly touch, and solder them together. These are Vcc and RESET, which will both be connected to the button.

Image Notes1. Pins 1 and 8 soldered together.

step 7: Add the ButtonCut off two of the four leads of the button, making sure you get two that are pointing to the same side. Flip the chip upside-down and solder one lead of the button to pin 8as shown in the picture.

When the button is pressed, it will give the chip power. When the button is un-pressed, the chip gets no power and will turn off.

Image Notes1. Two leads of the button cut off.

step 8: Add the ResistorBend pins 5 and 6 together, and solder them. Cut one lead of the 150 ohm resistor very short, and solder that end to pins 5 and 6, with the body of the resistor facingdown the chip as shown.

The resistor limits the amount of current that the microcontroller can give to the transistor. Pins 5 and 6 are the outputs, and bending them together doubles the amount ofcurrent they can source to 20 ma. This is probably not needed, but is used as a precaution.

Page 7: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. Pins 5 and 6.

step 9: Add the TransistorBend the outer two legs of the transistor outward, and cut the center (the base) short, as shown. Also cut the lead from the resistor short, too. Orient the transistor asshown in the picture (flat side up) and solder the base to the lead from the resistor.

The transistor allows the microcontroller, which can source only 10 ma per pin, to drive these LEDs, which can draw up to 100 ma. When a current goes through thebase, it allows power to flow through the LEDs (at the collector) to ground (the emitter) in this circuit.

step 10: Start the Ground BusBend the emitter (left lead) of the transistor at a right angle as show, and solder it to pin 4, the gnd of the microcontroller.This will be connected to ground of the batterylater.

Page 8: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. Pin 4.

Image Notes1. Pin 4.

step 11: Add the ResonatorIf you decided not to use a resonator when you were programming, you can skip this step and leave pins 2 and 3 unconnected.

Bend the outer two pins of the resonator inward, and the inner pin upwards. Solder the the outer two to pins 2 and 3 of the microcontroller. Bend the leftover emitter leadfrom the transistor over, and solder it to the middle pin of the resonator to connect it to ground.

Image Notes1. Pins 2 and 3.2. Emitter lead is bent again and soldered to the middle pin of the resonator.

Image Notes1. Another view.

Page 9: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. This view shows how the center pin of the resonator is connected to ground.

step 12: Solder the LEDs TogetherSet the two LEDs next to each other, with the blue one on the left and the flat sides facing up. Bend the top lead of the the clear one to the left, and the bottom lead of theblue one to the right. Solder them in parallel, and cut the excess as shown.

From now on, most of the pictures will be wrong. I did it a different way, then experimented and found that this one was better. Pretend the LEDs in the rest of the picturesare like this, sorry for the inconvenience!

Image Notes1. Flat sides (negative).2. Positive.3. Negative.

step 13: Add the LEDsSolder the negative lead of your LEDs to the collector of the transistor, and leave the positive pointing down the side as shown.

Page 10: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. Negative of LEDs and the collector of the transistor soldered together.2. Positive of LEDs.

step 14: Add the CapacitorBend the positive of the capacitor out and along the side of the capacitor, and cut it short. Bend the negative out for about 2mm and then bend it straight up. Fit thecapacitor in and solder the positive of the capacitor to the positive of the LEDs as shown.

The capacitor filters the power from the battery to provide a smooth voltage for the microcontroller even with the LEDs flashing really fast.

Image Notes1. Positive of the capacitor.2. Negative of the capacitor.

Image Notes1. Another view.

step 15: Form More ConnectionsBend the negative of the capacitor over and solder it to pin 4 of the microcontroller. This connects it to the ground of the circuit.

Page 11: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. Pin 4.

Image Notes1. Another view.

step 16: Form More Connections Part 2Bend the positive wire from the LEDs around the capacitor as shown. Take an extra length of lead from something you cut off earlier, and solder it into place so that itconnects the positive of the LEDs to the unused lead of the button. This connects the LEDs to the positive of the battery.

Image Notes1. Unused pin of the button.2. Positive of the LEDs.

Image Notes1. Another view.

step 17: Add the Battery HolderFit the battery holder under the circuit as shown; it should line up perfectly. Solder the positive and the negative as shown in the picture.

The positive goes to the far end of the button, giving power to the LEDs and, when pressed, the microcontroller.

The negative goes to the negative of the capacitor, grounding what needs to be grounded.

Page 12: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Image Notes1. Far pin of the button soldered to positive of the battery holder.

Image Notes1. Common ground soldered to the negative of the battery holder.

step 18: Optional: Add an Indicator LEDUnless you hold up a camera to the front, there is no indication that it is going. Here's a modification to add a visible light LED that blinks between each code to showwhat it's doing.

Materials:3mm LED - $0.06Another 150 ohm resistor - $0.05

First, take your LED and bend the positive lead (not on the flat side) straight out. Keep the negative lead (with a flat side) pointing the same direction and cut it so that it'sabout 3mm long. Solder this to pin 7 of the microcontroller, with the positive lead facing toward the switch.

(look at picture 2)

Next, cut the positive lead very short. Cut one lead of the resistor very short also, and solder the two together. Bend the other lead of the resistor around to the positivebattery terminal, cut it, and solder it into place.

(pictures 3 and 4)

Now when you press the button, the LED will blink between each code. It will also blink 4 times quickly when all the codes have been sent.

Image Notes1. 3mm LED.2. 150 ohm resistor.

Image Notes1. Pin 7.

Page 13: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

File Downloads

TV-B-Gone micro 2.sch (122 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'TV-B-Gone micro 2.sch']

step 19: Add a Battery and Have Fun!Slip in a 2032 coin cell battery, and have fun blasting TVs with a small, compact, and DIY device! Because the wires are exposed, be careful not to let anythingconductive short out the connections. A good way to protect the circuit would be to infuse and cover the circuit with hot glue or sugru.

Note: I am not responsible for what you do with this, act at your own risk.

If you make one, please send me pictures!

Don't forget to rate and leave comments, I like comments :-)

Page 14: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Related Instructables

TV-B-Goneflashlightextension by lyl

Double theRange of YourTV-B-Gone bymitch

$4 DIY TV-B-Gone(slideshow) bydark sponge

TV-B-GoneGen4: Mod toadd a US/EUswitch by chani7

How to Make aTV-B-Gone HardCase byjoejoerowley

Tv-B-Gone Hatby m_jake TV-

B-Gone CoffeeCup by nsutaria

Ultra TV-B-Goneby m_jake

Page 15: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

Advertisements

Comments50 comments Add Comment view all 57 comments

 ethaniel says:  Aug 21, 2010. 3:50 PM  REPLYIf size isn't a big issue, you "could" do this over a breadboard, right? Sincerely, Concerned n00b.

 dark sponge says:  Aug 21, 2010. 4:59 PM  REPLYOf course! Actually, when I was doing prototyping on a breadboard it was getting really annoying when it kept turning my TV on and off :-) You can alsostay tuned for my TV-B-Gone SHP clone instructable which uses a 9v battery and 16 LEDs, which might be better if it takes up the size of a breadboardanyway.

 Arghblarg says:  Aug 21, 2010. 4:14 PM  REPLYYou may not need the 8MHz resonator -- I have done projects with the ATTiny85 using its internal oscillator at 8MHz and it is usually within <1% tolerance.Might require a slight change to the programming or firmware (different fuse setting).

 dark sponge says:  Aug 21, 2010. 4:57 PM  REPLYI actually did do this before without one, see this: http://www.instructables.com/id/4-DIY-TV-B-Gone/. Also, if you read step 2 I talk about this issue.

 Ninzerbean says:  Aug 20, 2010. 6:29 AM  REPLYI love this.

 Hanzo says:  Aug 19, 2010. 1:54 PM  REPLYPlease reconsider selling pre-programmed chips! Soldering I can do but the chip puts it a bit out of reach. Excellent ible!

 dark sponge says:  Aug 19, 2010. 7:56 PM  REPLYI want to, but I currently have a couple conflicts with it. I'll let you know if I can!

 DicktheGreat says:  Aug 19, 2010. 5:50 PM  REPLYDark Sponge, I tried making a CB Jammer (for a specific 11 meter frequency) using a plan I found on the net. It was smaller than your TV-B-Gone bug.Unfortunately I couldn't get it to work. http://www.technodoctor.de/funkeier.htm I really like the step-by-step assembly details you use. Do you think you couldturn this into one of your projects?

 dark sponge says:  Aug 19, 2010. 7:51 PM  REPLYI would if it wasn't illegal, sorry about that!

 kelseymh says:  Aug 17, 2010. 1:23 PM  REPLYThis is a great little project, and a great big instructable! Lots of detail, lots of pictures (a few could do with better focus, but hey...), and a nice followup toyour $4 version :-)

 dark sponge says:  Aug 17, 2010. 1:31 PM  REPLYThanks! Yeah, I tried to get the pictures to come out good, but they didn't go as planned. The main problem was lighting. I had a lamp and a high powerLED light that were pointing right at them, but they weren't quite bright enough. If I used the flash the whole thing would be solid white, and I didn't have adiffuser for the flash.

 rich070966 says:  Aug 19, 2010. 3:07 PM  REPLYa cheap flash diffuser is a sheet of white paper - notebook paper is thin enough to let a good bit of light through, and with your auxillary lighting on,the photos should be bright enough to see more detail. Great 'ible -- Thanks

 dark sponge says:  Aug 19, 2010. 7:48 PM  REPLYThank you! I'm right about to start taking pictures for another picture, and I'm definitely going to try this. I have no idea why I didn't think of thisbefore... Thanks once again!

 dholowiski says:  Aug 19, 2010. 1:12 PM  REPLYVery cool - it would be cool if you put a magnet on it, and modified the code to just loop forever (or every 5 mins). TV-B-Gone Throwies!

Page 16: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

 dark sponge says:  Aug 19, 2010. 7:46 PM  REPLYQuiet... I was planning on doing that :-) Actually I don't think I'll get around to it, someone else can get the credit and make an Instructable.

 GWJax says:  Aug 19, 2010. 7:55 AM  REPLYNice instructable!!! I have to build one of these now. What fun this is going to be turning off the TV when my wife is watching her shows.. LOL I may changethe software so it will be set on a timer and place it in a hidden place.. Nothing like having the TV turn it's self on and off just like a ghost is doing it.. Jax

 dark sponge says:  Aug 19, 2010. 7:59 AM  REPLYLike a TV Poltergeist? http://www.thinkgeek.com/gadgets/electronic/d794/

 GWJax says:  Aug 19, 2010. 12:14 PM  REPLYNice find.. I did not even know that they have one already and at 13 bucks not a bad deal but I did not check if it selected all TV's like the TV-B-Gonecircuit does.

 dark sponge says:  Aug 19, 2010. 1:04 PM  REPLYI think it does. "The TV Poltergeist will work on just about any TV, including CRT, LCD, and Plasma displays"

 Treknology says:  Aug 19, 2010. 10:51 AM  REPLYI love it! No more Jerry Springer while stuck in the waiting room of a government department!

 mauriceh says:  Aug 19, 2010. 9:05 AM  REPLYBest Buy, here we come! Seriously , this is a VERY nice, simple, efficient project.

 dark sponge says:  Aug 19, 2010. 9:09 AM  REPLYNote: I am not responsible for what you do with this, act at your own risk.

:-)

 thekid says:  Aug 18, 2010. 6:40 PM  REPLYDo you know if there is a place to purchase a preprogrammed chip?

 dark sponge says:  Aug 18, 2010. 7:28 PM  REPLYAdafruit sells them for $5, but it has slightly different firmware that doesn't work with this design. I might send them a message asking permission for meto send you one, because it is their code and it might be illegal for me to sell it to you.

 BaldEagle5556 says:  Aug 19, 2010. 7:38 AM  REPLYI would be interested in getting a preprogrammed chip from you.....and I would pay for shipping ;) or other associated costs. Please email me and wecould discuss. Great build.

 dark sponge says:  Aug 19, 2010. 7:56 AM  REPLYI sent Adafruit an email requesting permission to sell a few. They don't sell chips with this code on it anymore; the newer version won't work. Theyhave the code licensed under Creative Commons 2.5 Attribution, Share-Alike, which means I can't sell it without their permission.

 dark sponge says:  Aug 19, 2010. 8:27 AM  REPLYAdafruit says it's okay, but do to some conflicts I will be unable to sell preprogrammed chips :-(

 SomeshRao says:  Aug 18, 2010. 1:08 PM  REPLYNow if I could find a CellPhone-B-Gone ;-)

 jlbutl says:  Aug 19, 2010. 7:19 AM  REPLYhttp://hacknmod.com/hack/a-diy-mini-rf-cell-phone-jammer/

Page 17: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

 dark sponge says:  Aug 19, 2010. 7:25 AM  REPLYAt the end: "Note: Using a RF Jammers to block communication by disrupting the signal is an exclusive right of the authorities... FederalCommunications Commission (FCC) rules apply and they take a dim view against illegal use of RF jamming devices."

 jlbutl says:  Aug 19, 2010. 7:28 AM  REPLYYes, I should have added that "this should be for educational use only, I wouldn't recommend building and/or using such a device" ... ;-)

 dark sponge says:  Aug 18, 2010. 1:59 PM  REPLYToo bad it's illegal... :-(

 server says:  Aug 18, 2010. 7:14 PM  REPLYDoesn't matter. They could not call the police from there phone :P And nice Insructable

 Syx says:  Aug 19, 2010. 7:05 AM  REPLYTo avoid any short circuits, would there be any harm in adding a good dose of hot glue over everything on the back of the battery holder to act as a resin-likeprotector?

 dark sponge says:  Aug 19, 2010. 7:07 AM  REPLYAn excellent idea that I considered doing at first. But I sometimes make changes to mine and like to admire the exposed circuits. I'll add it to theInstructable near the end for the people who want to try.

 anode505 says:  Aug 19, 2010. 6:10 AM  REPLYShould gone SMT for most of the parts. Would be a LOT smaller/tighter

 dark sponge says:  Aug 19, 2010. 6:44 AM  REPLYI considered it, but it wouldn't get much smaller or lighter because the battery is still by far the biggest component in both size and weight. A smallerbattery would work, but I wanted to make this an easy(ish) build for the average person.

 ZwedruTECH says:  Aug 18, 2010. 6:42 PM  REPLYNice. Simple design and clear instructions. Will let you know how it turns out.

 dark sponge says:  Aug 18, 2010. 7:26 PM  REPLYGreat! Send pictures if you can, and if you don't mind I could add them to the last step of the Instructable!

 fishhead455 says:  Aug 18, 2010. 9:32 AM  REPLYI (we) shall be awaiting your: Cell Phone Be Gone device. Thank you. Fishhead455

 dark sponge says:  Aug 18, 2010. 9:47 AM  REPLYAha! Well, I would love one of those too. Unfortunately, it would be illegal... :-(

 yoyology says:  Aug 17, 2010. 2:32 PM  REPLYI've wanted a TV-B-Gone ever since I first heard of them. Even tried to get the inventor to make a software version to run on my Clié. :-)

I am dying to try this project. I love how you explain, at each step, not only what to do, but the purpose of that component in the circuit.  Perfect forelectronics noobs like myself.  The only thing keeping this from a full five stars is the photo quality.  Since you mention buying more components in bulk, canwe look forward to a revamp with more photos?

 dark sponge says:  Aug 17, 2010. 7:34 PM  REPLYThanks a lot! I'm really disappointed with the picture quality myself. Like I said in a previous comment, I tried to get the pictures to come out good butthey didn't go as planned. The main problem was lighting. I had a lamp and a high power LED light that were pointing right at them, but they weren't quitebright enough. If I used the flash the whole thing would be solid white, and I didn't have a diffuser for the flash. It would also never focus and I didn't havea close up lens. I'm most likely going to post more Instructables, but of slightly different versions of DIY TV-B-Gones. Also, I'm probably going to add aschematic diagram to this sometime in the next hour or so. I'm glad you liked it, please send pictures if you build it!

Page 18: 350-DIY-TV-B-Gone-Mico

http://www.instructables.com/id/350-DIY-TV-B-Gone-Mico/

 JamesRPatrick says:  Aug 17, 2010. 9:49 PM  REPLYI think a schematic would clear up any confusion.

 dark sponge says:  Aug 18, 2010. 7:40 AM  REPLYI posted one last night (I think right before you posted this comment), it's the second picture of step 1 and also for download on step 1.

 TNEN says:  Aug 17, 2010. 10:09 PM  REPLYYes! I am going to make it! Thanks for the instructable!

 dark sponge says:  Aug 18, 2010. 7:15 AM  REPLYSure! The parts list is actually a bunch of links I made to Mouser parts, the transistor ishttp://www.mouser.com/Search/ProductDetail.aspx?R=PN2222ABUvirtualkey51210000virtualkey512-PN2222ABU

or manufacturer part #: PN2222ABU

Pretty much any NPN transistor with the pinout of E,B,C in that order should work, as long as it has a high gain.

 ppatches24 says:  Aug 18, 2010. 12:17 AM  REPLYcan you tell me what number NPN transistor you used because i always use the wrong one btw SWEET ible!!!!!!

 dark sponge says:  Aug 18, 2010. 7:14 AM  REPLYSure! The parts list is actually a bunch of links I made to Mouser parts, the transistor ishttp://www.mouser.com/Search/ProductDetail.aspx?R=PN2222ABUvirtualkey51210000virtualkey512-PN2222ABU

or manufacturer part #: PN2222ABU

Pretty much any NPN transistor with the pinout of E,B,C in that order should work, as long as it has a high gain.

 warengadia says:  Aug 18, 2010. 1:28 AM  REPLYnice job , just gonna be great job from youre work led

view all 57 comments