Introduction: DIY TV-B-Gone SHP (And Save $45)

A while ago I posted my $3.50 DIY TV-B-Gone Micro, which was great and all but didn't have near enough juice. The TV-B-Gone SHP is supposed to be able to turn of TVs from 100 meters away, but cost $50. So for about $5, I made a clone of one that seems to work pretty close to that limit. It's also very tiny compared to the commercial one.

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

I used an ATtiny 85v as the "brains" of this, programmed with Adafruit's original code. It runs off of a 9v battery with a 5v regulator to power the microcontroller. The the LED array has 12 infrared LEDs in it, and the microcontroller is connected to a transistor that can power the whole array. The 12 LEDs blast out almost every TV on-off code, allowing you to turn pretty much any TV on or off. A 3mm green LED blinks between each code to show that it's working. When the battery is removed it is significantly smaller than the original TV-B-Gone, allowing for easy hiding.

Also, I'm entering in the microcontroller contest. If you think I'm worthy enough, give me a vote!

Step 1: Materials

Materials

Each name is a link to a Mouser part you can click (you don't have to use Mouser, I just like them because of great service and how close to my house they are). You could also use an IC socket if you want to be extra careful with your chip or think you might reprogram it in the future.

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, VERY helpful (probably required for this project)
Now let's start making!

Step 2: Prep for Programming

If 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 the programmer. More instructions on how to do this can be found here. The pinout for the chip can be found on the datasheet here.

Step 3: 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 to change the fuses to run off of an external oscillator. I used http://www.engbedded.com/fusecalc, which is a free AVR fuse calculator. You don'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.

Now type:

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

Proceed to the next step for programming the real code!

Step 4: Program the Chip Part 2: Code

The 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 the folder 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!

Step 5: Begin Construction!

This first step is simple enough. 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.

Step 6: Add the Voltage Regulator

Find the voltage regulator in your pile of parts. Lie the flat part along the corner of the chip and bend the middle pin underneath it as shown in the pictures. Bend pin 1 so that it meets the two pins you soldered together in the previous step. Solder this connection, and then solder the middle pin of the voltage regulator to pin 4 of the microcontroller, which is ground.

Step 7: Add the Capacitor

The capacitor smooths out any peaks or lows in electrical current caused by the LEDs' rapid pulsing. Position it under the microcontroller so that its leads face the regulator side. bend the positive lead up and solder it to the 5v side (pin 1) of the regulator. Solder the negative end to pin 4 of the microcontroller, where pin 2 of the voltage regulator was also soldered.

Step 8: Add the Resonator

Position the resonator under the capacitor with the leads facing the opposite way as the voltage regulator's leads. Bend its outer two pins inward and solder them pins 2 and 3 of the microcontroller (the two middle pins of that side). Bend the resonator's middle pin up and solder it to the lead extending from pin 4 (ground) of the microcontroller.

Step 9: Add the Transistor

The transistor allows a low-current pin of the microcontroller to control the high-current LED array. When current is delivered to the middle (base) pin, power flows from pin 3 (collector) to pin 1 (emitter) and ground the LED array to turn it on momentarily. Position the transistor at the same level as the voltage regulator, with the flat side facing outward and the leads facing down. Bend pin 1 (The emitter) and solder it to pin 8 of the microcontroller to ground it.

Step 10: Add a Resistor

This 150 ohm resistor connects the outputs of the microcontroller the transistor's base and limits the current flow from these pins. Bend pins 5 and 6 of the microcontroller together and solder them to one end of the resistor. Solder the other end to the middle (base) pin of the transistor.

Step 11: Make the LED "Triplets"

Find your LEDs in the diminishing pile of parts. Solder the 6 wide narrow beam LEDs into two groups of three (making sure to connect positive to negative) and repeat with the wide angle LEDs.

Step 12: Make the LED Array

Group the triplets together so that all of the negatives are on one side and the positives on the other. Bend them into a line on each side and solder them together. Cut off the last two pins when you are done; you should now have a 4 x 3 block of LEDs.

Step 13: Unite the Two Halves

Position the LED array in front of the other electronics with the positive side facing up and the negative side facing down. Bend down pin 3 (collector) of the transistor and solder it to the bottom negative row of the array.

Step 14: Add the Button

Find your button and fit it between the positive of the LED array and the voltage in pin of the voltage regulator. Solder these two connection points. When the button is pushed, it allows power to the voltage regulator and therefor the microcontroller.

Step 15: Add the LED

Bend the two pins of the LED outward. Fit it on top of the microcontroller and run the negative wire underneath the wire coming from pins 1 and 8. Solder it to pin 7 of the microcontroller.

Step 16: Add the LED's Resistor

This 150 ohm resistor limits current to the LED. Solder one end of it to the positive lead of the LED. Bend the other end around and solder it to the same cluster as pins 1 and 8 of the microcontroller. This is where it connects to positive power, and the microcontroller grounds it to turn it on.

Step 17: Add the 9v Battery Clip

Cut and strip the wires of your 9v battery clip. Solder the positive end of it to the top of the LED array. Solder the negative end of it to pin 4 of the microcontroller, the ground pin.

Step 18: Find a Fresh 9v Battery and Have Fun!

...but not too much fun. The ability to blast TVs on and off from a great distance should be used with care. I am not responsible for what you use this for.

Right now the connections are exposed and could short out. You might want to consider covering it with hot glue or sugru.

If you make one, please send pictures! If you have any questions or comments, post them and I'll do my best to answer them immediately. I like comments :-)

Also, I'm entering in the microcontroller contest. If you think I'm worthy enough, give me a vote!

Comments

author
D3WZM (author)2016-11-05

I can´t find the

ATtiny85V-10PU

which IC could I use instead?

Thanks :)

author
tls01 (author)D3WZM2017-02-05

Just but ATtiny85. It can be 85V-10PU or 85-20PU or 85-20SUR or any version of ATtiny85.

author
GuillaumeD51 (author)tls012017-07-30

Hey, are you sure about that ?

author
tls01 (author)GuillaumeD512017-07-30

Yep, I built it using ATtiny85-20PU and it's working without any problems.

You can check datasheet on Atmel website: http://www.atmel.com/images/atmel-2586-avr-8-bit-m...

Look at page 206.

author
GuillaumeD51 (author)tls012017-07-30

Thanks for the quick answer ! What about 8 mhz resonator, do I still need one ? And what about programming the attiny ?

author
tls01 (author)GuillaumeD512017-07-30

You don't need to use external oscillator. ATtiny85 have internal oscillator (10 or 20 MHz). So you can set fuses instead of using external oscillator (or use it - if you want).

And what you mean by asking about programming? Just set fuses and write hex into your uC. :P

author
seanman3000 (author)2017-05-27

How many LED's could you connect to this? Would more LED's require a different ohm resistor etc?

author
PeterO22 (author)2016-02-22

is it possible to use a 555 instad of the attiny

author
toutoune (author)PeterO222016-12-21

I just checked it out. It is just impossible. 555 is not a mirco controller, it has no memory to store the program.

author
toutoune (author)PeterO222016-12-21

I am curious to know more about it. AtT Tiny is relatively expansive actually, if you compare with 555, and want to make various devices. I don'tknow so much about microcontrollers. Do you just replace the ATtiny, with no other hardware change ? As for software, do you just load the same program ? Otherwise, how do you change it ?
Thanks you in advance for whatever track of explanation.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
FrankyT5 (author)2016-03-06

Dark Sponge,

What could be used to increase the range on this?

thank you.

author
ChristianY (author)2014-09-09

I just made one! the hard part is finding/looking for those parts.

author
JeppeGameZ (author)ChristianY2016-02-08

I havent made one yet. im also looking now for those parts :)

author
PeterB14 (author)2015-01-10

Only $5!!!

and $25 for the usbtinyisp

author
JeppeGameZ (author)PeterB142016-02-08

Around 5$ you can get the usbtinyisp and the parts are around 5$ together... you can get the usbtinyisp here: http://www.aliexpress.com/item/USBtinyISP-AVR-ISP-Programmer-For-Arduino-Bootloader-Meag2560-Uno-R3/1832671667.html?spm=2114.13010208.99999999.261.58PQB7

author
henningh (author)2015-10-18

can i skip the oscillator

if i program the chip to 8 mhz clock

please answer sorry bad english

author
hinkey (author)henningh2016-01-25

Well did you skip the oscillator? if so let us know. :)

author
IamZed_yt (author)2015-11-18

Sry I dont no much about electronics, but how can i get the avr programmer to the chip? Do i have to buy an extra tool for the 4 pin connector?

author
tomrubberduck (author)2015-11-06

will this work when programming the attiny?

https://www.instructables.com/id/Program-an-ATtiny-with-Arduino/

author
ANDREIS6 (author)tomrubberduck2015-11-06

Yes on my mega it worked

author
Jan2220 (author)2015-08-16

how can i programm the ATTiny85 with Arduino? Is this the same command?

author
ANDREIS6 (author)Jan22202015-09-08

Yes you can load the ArduinoISP schetch on your uno/arduino,use avr dude -c ? to see all supported programmers: use "arduino".

I could load attiny using ide and this schetch.

the source code is ncluded in the ide .

author
tomrubberduck (author)ANDREIS62015-11-06

when you mean ide do you mean the aduino ide??

author
ANDREIS6 (author)tomrubberduck2015-11-06

Use the ide as the environment and am arduino uno as a programmer see arduin as isp

author
ANDREIS6 (author)ANDREIS62015-09-08

Also with another attiny85 you can build an usbtinyisp.

author
HaythamL (author)2015-09-25

author
Jan2220 (author)2015-08-03

can i use arduino to programm the ATTiny85?

author
NinjasInPajamas (author)2015-05-20

Just a quick question: Do you have to hold down the push button or just click it once to make it go through all the codes? Thanks.

author
f!n41 3ch03 (author)2015-04-26

is it necessary to use 6x wide beam and 6x narrow beam IR leds as i cannot find it can i use 12x "http://hacktronics.co.in/home/121-ir-receiver-transmitter-pair.html" this IR led or what

author
roguerazlin (author)2015-04-08

Okay... Thanks for the advice man :)

author
Victor805 made it! (author)2014-11-07

Thanks, I did some modifications but it works great, I used 3xAA instead of a 9v battery so it lasts longer.

DSC_0288.jpg
author
roguerazlin (author)Victor8052015-04-08

Hi, could i see the back of your board to see how u join it? Because, the schematics were a little confusing ..

author
Victor805 (author)roguerazlin2015-04-08

I'm not at home atm so I can't take a picture. The only changes respect the circuit posted in this instructable are the way the LEDs are connected, in this case they're all in parallel, with a single resistor for all. I know each LED should have it's own resistor to spread the current evenly, but I was running out of space. Oh, yes, the transistor is a Darlington type, BD159.

author
Rondle (author)Victor8052015-03-26

Hey man, I'm fairly new to this website and also pretty new to embedded electronics or whatever you want to call it. Is there any way I can talk with you like in a PM or Skype or whatever? I kinda need some help starting up, like what I should buy and what not. Anyway, this message wasn't totally aimed on you, but rather to anyone on here that has some experience. But your comment is pretty recent compared to alot others and you seem to have a working on!

So yeah, I kinda would understand if you didn't want to help me out in your time, but I won't ask too much and it would totally be so awesome!

author
Victor805 (author)Rondle2015-03-27

Also this sticky of the /ohm/ electronics general on 4chan might help you and other begginers out.

>I'm new to electronics, where do I get started?

There
are several good books that are commonly recommended for beginners and
those wanting to learn more. There are also plenty of good Youtube
channels that teach about the basics as well as advanced concepts. The
best way to get involved in electronics is just to make stuff. Don't be
afraid to get your hands dirty. Take something apart or build something
you find cool on one of the many electronics websites.

>What books are there?

Beginner:

Getting Started in Electronics by Forrest Mims III
Make: Electronics by Charles Platt
How to Diagnose and Fix Everything Electronic by Michael Jay Greier

Intermediate:

All New Electronics Self-Teaching Guide by Harry Kybett, Earl Boysen
Practical Electronics for Inventors by Paul Scherz and Simon Monk

Advanced:

The Art of Electronics by Paul Horowitz

>What Youtube channels are there?

https://www.youtube.com/user/EEVblog
https://www.youtube.com/channel/UChturLXwYxwTOf_5krs0qvA
https://www.youtube.com/channel/UCosnWgi3eorc1klEQ8pIgJQ
https://www.youtube.com/channel/UChtY6O8Ahw2cz05PS2GhUbg
https://www.youtube.com/channel/UC1rxMIOt82ieNE19w15U5YQ

>What websites feature electronics projects? Where can I get ideas for projects?

https://www.adafruit.com/
https://www.instructables.com/tag/type-id/category-technology/
http://makezine.com/category/electronics/

>Where do I get components and lab equipment from?

http://www.jameco.com/
https://www.sparkfun.com/
http://www.ramseyelectronics.com/
http://www.allelectronics.com/
http://futurlec.com/
http://www.ladyada.net/library/procure/hobbyist.html
http://www.mouser.com
http://www.alliedelec.com
http://www.newark.com
And sometimes even just ebay.

>What circuit sim software do you use?

This mostly comes down to personal preference. These are the most common ones though:

NI Multisim
LTSpice
CircuitLab
iCircuit for Macs

>What software should I use to print circuits

Circuit Wizard
ExpressPCB
EAGLE

author
Victor805 (author)Rondle2015-03-27

Check your inbox.

author
nodoubtman (author)2015-02-14

Hi! What's the firmware version you use?

thank U!

author
Fennec74 (author)2014-12-25

The schematic is it is exact, functional? mine don t work :( thanks you guys

author
Josephs4 (author)2014-11-18

You guys are among the highest ranks of genius that you can find on the internet to me, I know a bit of what you're talking about, but other than that, it's all just numbers and 1100010110 Illuminati type stuff!

author
eley.lewis (author)2014-08-13

Wow this is awesome, What will I need to make one?

author
tyguy2 (author)2013-11-01

Connect the Arduino to the ATtiny as follows:
Arduino +5V ---> ATtiny Pin 8
Arduino Ground ---> ATtiny Pin 4
Arduino Pin 10 ---> ATtiny Pin 1
Arduino Pin 11 ---> ATtiny Pin 5
Arduino Pin 12 ---> ATtiny Pin 6
Arduino Pin 13 ---> ATtiny Pin 7

author
jcksparr0w (author)2013-03-19

Just wondering why there are so many LEDs. More LEDs = More power? More reliability?

author
jcksparr0w (author)2013-03-19

If i were to change the ir LED assembly to say 5w 940nm High Power Infrared IR LED or 2, how might i need to change the circuit? if you do not have the spare time or if this is a complete rebuild i totally understand if you cannot do this. Thanks!

author
qquuiinn (author)2013-02-26

Still waiting for someone to make a version that uses a 10*10 array of IR LEDs. Or better yet, a TV-B-gone-clone IR LED cube. It could be done.

author
Aaron1088 (author)2012-11-23

Hi is there a way to strip-board this because I don't like how fragile and ugly dead bug circuits are.

About This Instructable

128,561views

217favorites

License:

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: