Google-Apps
Hauptmenü

Post a Comment On: Ken Shirriff's blog

"TV-B-Gone for the Arduino"

43 Comments -

1 – 43 of 43
Anonymous Orikata said...

Hi,

I use an atmega 328 on my arduino and i don't have light on pin 3 for the IrLED

thank you for your article and the sources

orikata@hotmail.fr

December 6, 2009 at 1:00 PM

Anonymous Orikata said...

Sorry, it works very well on philips tv

December 6, 2009 at 1:26 PM

Blogger Generic Nerd said...

Great work! I've been waiting for this since I first laid eyes on the Arduino and the TV-B-Gone.

December 10, 2009 at 11:51 PM

Blogger Unknown said...

very good job works on my 168

December 16, 2009 at 8:35 PM

Blogger robingchan said...

I loved this so much i built a PCB for it.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261875095

December 28, 2009 at 6:11 PM

Blogger h4v1nfun said...

hi there, i've tried your circuit on a breadboard with half success, i can get it to work with the pin 0 grounded for the EU codes, my option was to set the default one in the sketch to EU instead of the US, can you please post the full circuit schematic, perhaps in fritzing

Gratz, Afonso

January 4, 2010 at 6:26 PM

Anonymous Anonymous said...

this is neat, but could you make a version to turn every tv to the discovery channel?

Imagine a packed sportsbar on the big game switched over to mythbusters!

Blowed 'em up real good!

January 5, 2010 at 8:11 AM

Blogger Unknown said...

very bad tutorial

February 5, 2010 at 4:09 AM

Blogger Unknown said...

I've added sleep() to this, as leaving the arduino running full bore, all the time, the batteries wouldn't last long!

I didnt want to toss yet-another-version out there, so I'll leave it to the reader to add, and Ken to incorporate into Version 2. You can read about it on my blog... http://www.ka1kjz.com/?p=561

March 3, 2010 at 5:00 PM

Anonymous Just Plain Bob said...

Re ladyada's four LED model (1.2).
( See http://www.ladyada.net/make/tvbgone/design.html ).

Unless I'm mistaken, the PNP transistor that drives the four NPNs will introduce an inversion in the output. Am I misreading the schematic? Is this an issue? Or does she provide inverted input to the PNP in this model?

March 15, 2010 at 10:50 AM

Blogger Unknown said...

What could be the range with one IR led ?

April 15, 2010 at 10:51 AM

Blogger Unknown said...

Hello i am using arduino diecimila (USB Powered) and sketch works only when using DEBUG = 1. I've tried to comment out Serial.begin(9600); line to disable serial even with DEBUG enabled, but it also didn't worked. When i left serial debuging enabled, i was able to turn my s*ny TV off and on, but i think it causes suboptimal speed of transmission, when i need to wait for serial line before each code is transmited...

and BTW i am getting
NA Codesize: some_reasonable number,
but
EU Codesize: 0

(i live in EU so i have shorted 0 and GND together. I don't know what should i think about this...)

April 25, 2010 at 5:30 AM

Anonymous Anonymous said...

It seems the EU codes are disabled by default. You can add "#define EU_CODES" to the beginning of main.h to enable them.

May 15, 2010 at 2:22 PM

Anonymous James said...

Hi,

When I try and compile the sketch I get the errors:




o:(.progmem.data+0x0): multiple definition of `NApowerCodes'
/var/folders/sJ/sJhEJAz6HZiIGNVVaTTBwk+++TI/-Tmp-/build7674028882894173597.tmp/TVB/WORLDcodes.cpp.o:(.progmem.data+0x0): first defined here

o
o:(.progmem.data+0xe6): multiple definition of `EUpowerCodes'
/var/folders/sJ/sJhEJAz6HZiIGNVVaTTBwk+++TI/-Tmp-/build7674028882894173597.tmp/TVB/WORLDcodes.cpp.o:(.progmem.data+0x112): first defined here

o:(.data.num_NAcodes+0x0): multiple definition of `num_NAcodes'
/var/folders/sJ/sJhEJAz6HZiIGNVVaTTBwk+++TI/-Tmp-/build7674028882894173597.tmp/TVB/WORLDcodes.cpp.o:(.data.num_NAcodes+0x0): first defined here

o:(.data.num_EUcodes+0x0): multiple definition of `num_EUcodes'
/var/folders/sJ/sJhEJAz6HZiIGNVVaTTBwk+++TI/-Tmp-/build7674028882894173597.tmp/TVB/WORLDcodes.cpp.o:(.bss.num_EUcodes+0x0): first defined here

Can anybody help me with this?
Am I missing something obvious?

Thanks

June 14, 2010 at 3:18 AM

Anonymous Anonymous said...

Does anyone know if the codes work on Stereo equipment rather than TV's?

My neighbour has loud parties and this would put a spoke in the wheels :-)

August 25, 2010 at 2:21 AM

Anonymous Anonymous said...

i built this using a arduino pro mini 16mhz 5v

it runs and you can see the IR flashing away (using a phone cam), but it never turns my tv off :(

im from the uk and have it set to EU

September 25, 2010 at 5:10 PM

Anonymous Anonymous said...

The EU_CODES seems to be broken.

September 26, 2010 at 9:32 AM

Anonymous Anonymous said...

iv added the define for that EU codes and it is running through like 120 of them but none seam to switch any of the tvs off in my house, could it be a timing issue?

September 26, 2010 at 12:43 PM

Blogger Ken Shirriff said...

I haven't tested the EU codes. Since I don't have a European TV, it's hard for me to figure out what the problem is. (By the way, is it the same Anonymous or 3 different Anonymouses who are trying to get EU codes working?)

September 28, 2010 at 3:40 PM

Blogger Unknown said...

two of them where me hehe, it runs fine but does not turn any tvs off, should i try it on a few more tvs?

im running the 328 arduino mini

October 3, 2010 at 4:20 AM

Blogger Ken Shirriff said...

@russdx: I haven't tried the Arduino 328 mini, so I don't know if that's causing the problems. My first thought was the frequency might be different, but the 328 mini and the Duemilanove both run at 16 MHz. My second thought is the pin connections might be different with the mini, so make sure you're actually getting an output from the IR LED. (You can use a cellphone camera to see the IR.) My third thought is that the EU code might not be working (since I didn't test it at all, not having European televisions lying around). Have any of my European readers managed to get the EU codes working?

It's also possible the codes just don't work with your TVs, but that seems unlikely since the TV-B-Gone has so many codes. You could try the US codes and see if that works any better.

October 3, 2010 at 4:45 PM

Anonymous phae said...

Hi !
I've just tried your TV-B-Gone with a duemilanove (so atmega 328P) and worked very well with my french TV (so EU codes worked fine for me). Thanks a lot !
I'm currently working on a transportable version so i can test it in a TV shop tomorrow ;)
Since i'm planning to organize a workshop to build your arduino tvBgone, i'd like to know if it works with Atmega168. Because they're cheaper than the 328P and would reduce the workshop participation fee.
Thanks again,
phae

October 5, 2010 at 10:48 AM

Anonymous phae said...

Hi !

Is it working well on ATmega 168 ?
(as I said earlier the 168's are cheaper to build a barebone arduino)

Thanks

October 13, 2010 at 1:41 AM

Blogger Unknown said...

yeah the little ir sensor is flashing away

very strange, i will try it on a few more tvs trying us/eu codes

October 14, 2010 at 12:19 PM

Blogger zoobab said...

Mitch Altman fixed your code here:

http://github.com/zoobab/tvbgone-arduino/

The EU codes were not working properly.

October 17, 2010 at 9:06 AM

Blogger Ken Shirriff said...

Mitch Altman and I have made some improvements to the code; among other things, the European codes now work. See Improved Arduino TV-B-Gone for details.

November 3, 2010 at 11:33 PM

Blogger Claudio Miklos said...

Works very well for me, thank you!

April 25, 2011 at 4:03 AM

Comment deleted

This comment has been removed by the author.

February 18, 2012 at 5:56 AM

Blogger Johnny K said...

Hey. Which compiler do you use??? How could you include main.h and so on??? If i load TVB.pde a have millions of mistakes. Could you help me please.

March 30, 2012 at 12:21 PM

Anonymous Hilary said...

I have the same error described here:

http://arduino.cc/forum/index.php?topic=51923.0;wap2

(same as quoted by James above)

I am using BoArdino that I made in Mitch's "Arduino for newbies" workshop.
I put the sketch in the library folder thus:
\Arduino\arduino-1.0.2\libraries\TVB

thanks for advice,
Hilary
tech@a2zed.us

December 14, 2012 at 11:14 AM

Blogger Nev said...

I would like to run this on 3.3v 8MHz arduino. Seems timing will be an issue. What you would recommend?

January 10, 2014 at 2:57 PM

Blogger peterparker - Servant of BHAGWAN PARASHURAMA said...

Hello Ken,

Really wonderful work.

I am from India, and trying to make this circuit.

So do I need to put India codes for this, as I can see north america and European codes or is this an universal circuit?

Also, I am not able to compile the code, receiving errors

TVB\WORLDcodes.cpp.o:(.progmem.data+0x0): multiple definition of `NApowerCodes'
WORLDcodes.cpp.o:(.progmem.data+0x0): first defined here
TVB\WORLDcodes.cpp.o:(.progmem.data+0x112): multiple definition of `EUpowerCodes'
WORLDcodes.cpp.o:(.progmem.data+0x112): first defined here
TVB\WORLDcodes.cpp.o:(.data.num_NAcodes+0x0): multiple definition of `num_NAcodes'
WORLDcodes.cpp.o:(.data.num_NAcodes+0x0): first defined here
TVB\WORLDcodes.cpp.o:(.data.num_EUcodes+0x0): multiple definition of `num_EUcodes'
WORLDcodes.cpp.o:(.data.num_EUcodes+0x0): first defined here

I have not put the code in the libraries folder, but inside the sketchbook folder, still getting the error.

What could be the reason for this?

Thanks

April 29, 2014 at 9:55 PM

Anonymous Anonymous said...

Hello.

I'm trying to make it working with my Arduino nano v3, but it doesn't work...
Actually, it works with my Arduino Uno, but not with the Nano.

Could you tell me what to do ?

June 25, 2014 at 2:43 PM

Anonymous Anonymous said...

it gives an error for my :p
I tried it on arduino mega adk...

August 7, 2015 at 2:55 AM

Blogger Unknown said...

I updated the TV-B-Gone sketch so that it works on all version of the Arduino software to date (through V1.6.5). Please see my Arduino For Total Newbies workshop page for the link to download the TV-B-Gone sketch (download #3):
http://cornfieldelectronics.com/cfe/projects/tvbg_arduino/tvbg_arduino_workshop.php

September 26, 2015 at 10:45 AM

Blogger Unknown said...

Oh, and this new sketch also works with Leonardo.

September 26, 2015 at 10:47 AM

Anonymous Anonymous said...

Did Ken Shirriff ever port his TV-B-Gone Code over to use his Arduino Infrared Library?

If so, anyone with a URL to the ported code?

November 24, 2015 at 10:46 PM

Blogger Ken Shirriff said...

No, I never ported the TV-B-Gone code to use my IR library. It worked fine without it, so I didn't see the point.

November 25, 2015 at 7:13 AM

Anonymous Anonymous said...

Has anyone experimented in removing all the 38Khz timing code from the sketch, and switch the code over to use the library Ken has supplied, and then using an lm555, triggering pin 4 on the lm555 which supplies the 38Khz modulation, and frees the arduino to ONLY be responsible for sending the code bits?

This should allow us to simply use the lirc codes, and be any to choose any and all codes from there, and it simply becomes, "plug in the code and play!"

December 13, 2015 at 2:27 PM

Anonymous Anonymous said...

hi, does this work on an digispark?
(with an attiny at16 mhz)

February 21, 2016 at 9:12 AM

Blogger Mike said...

I have put the latest version of TV-B gone on a solderless breadboard.

Using only one IR LED thus far but will add more and spray IR stuff from a great distance.
I am using direct drive from pin 3 on my Uno with a 10 ohm resistor in series with the LED to ground. Might add 2N2222 transistors instead of the direct from the Uno pin #3.
I also changed the pinMode for the NA / EU option to default pulled up rather than rely "floating" which could change while running due to all sorts of stuff.
Temperature change, RF interference, static charge etc.
pinMode INPUT_PULLUP worked with out problem.

Only problem so far is that for my Sony TV it turns the TV off and then shortly after turns it back on again. And quick test of another TV, a Visio gets no action.
Further testing on that is needed.
Would be cool to serial.print (while debugging) the BRAND NAME as the codes are output by the LED.

I wish the codes were commented by brand in the list. The construction of codes is not really user friendly. It must have been terribly tedious to come up with the format.

But happy to know that my initial try is 99.9% functional. See me smile.

March 29, 2017 at 4:16 PM

Blogger Mike said...

I came across info to enable Debugging by setting DEBUG 1. So I did
And I can see using Serial.print whats going on but it's too fast to really read.
Anyone got an idea of where / how to put a conditional delay statement in it.

I tried to insert a DELAY (1000); it didn't work. I thought I took that out but now getting a compiler error. I probably typo'ed the code. I shall now replace the stuff in the library and try again.

And. . .has anyone made TVB Gone work on a Nano? I'd love to have the small physical size.

April 1, 2017 at 6:33 AM

Blogger Mike said...

After a bit of "no that didn't work either..."
I found that the DEBUGP is a function that appears to be called to send
the debug code IF DEBUG is set to 1

Here's the code I added
/*ADDING CODE TO SLOW THE DEBUG DISPLAY SO IT CAN BE READ MikeFlood35@gmail.com


DEBUGP (delay (1000)); // Insert this line at approx line #348
// ^^^^^^^^^^^ ONE SECOND DELAY.

THE CODE BELOW IS ONLY TO SHOW THE LOCATION
*/
// print out the address in ROM memory we're reading
DEBUGP(putstring("\n\rAddr: ");
putnum_uh((uint16_t)data_ptr));


// Read the carrier frequency from the first byte of code structure
const uint8_t freq = pgm_read_byte(data_ptr++);
// set OCR for Timer1 to output this POWER code's carrier frequency
#ifdef __AVR_ATmega32U4__
OCR0A = freq;
OCR0B = freq / 3; // 33% duty cycle
#else
OCR2A = freq;
OCR2B = freq / 3; // 33% duty cycle

April 12, 2017 at 3:24 PM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot