by adafruit on Sun Dec 23, 2007 11:47 pm

magician13134 wrote:Yeah, I was just going with Micth's 98% statistic, I like optimism!


read it more carefully: 1 out of 50 is just for sony TVs which he's also noted are the easiest to turn off.

mitch is also an electrical engineer with dozens of years of experience, which means he's able to tweak, debug and fix 'hacked up' projects with substandard parts. he owns a scope and lots of tools specifically designed for debugging tv b gones.

again, if you dont have the right parts you're likely going to end up wasting a lot of time... :(
User avatar
adafruit
 
Posts: 11666
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

by magician13134 on Mon Dec 24, 2007 1:51 pm

Well I was working with a Sony TV. But, about wasting time, I don't really care, that's what highschool's all about isn't it? This is for a physics project, so I can rationalize my wasting time by saying I have to. :D

But, yeah, I guess having equipment and experience would be a nice thing. Oh well... maybe someday I'll get some equipment. I'm not thinking I'll ever get a whole lot of knowledge though, I'm kind of low on the common sense chart....
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

by magician13134 on Sun Dec 30, 2007 6:56 pm

Ok, another question. What about the two pin resonators? Do they work/how do I attach them, just leave out ground?

And what about oscillators/crystals? Are they the same as resonators?
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

by oPossum on Sun Dec 30, 2007 8:01 pm

A two pin resonator will require capacitors just like a crystal. 22 to 47 pF is typical. An oscillator module has four pins and requires power. The most common sizes for hobby use are 'half' and 'full' size DIP modules. They are the size of a 8 or 16 pin DIP IC package, but with only the four corner pins. The clock output of an oscillator module goes to a single pin of the microcontroller, so one less pin is used than with a crystal or resonator.

If you are going to order parts, get some 3 pin resonators at 4, 8, 10, 12, 16, and 20 MHz. They are cheap and accurate enough for most applications.
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by magician13134 on Sun Jan 06, 2008 11:03 am

Ok, I got some three pin 8Mhz resonators, I burn the fuses just like Mitch said (make burn-fuse_cr), avrdude said it worked fine. I hooked pins 4 and 5 from my attiny2313 with the tvbgone_na.hex file successfully burned to it to the two outside pins of the resonator, then I attached the middle pin to ground. I then ran it, and the visible LED flashed like it should, the IR LED was pumping away brightly when I looked through a camera, but I still cannot turn off any TV. I've tried everywhere from 3 inches to 10 feet. 3 different TVs. Two of them are Sony.

Also I noticed I can no longer write to the 2313s if they have been burned to use an external resonator, is there any way to write to them again?
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

by oPossum on Sun Jan 06, 2008 11:08 am

magician13134 wrote:Also I noticed I can no longer write to the 2313s if they have been burned to use an external resonator, is there any way to write to them again?


Yes! There must be a clock source (xtal, resonator or oscillator) connected during programming if it has been configured for external clock.
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by oPossum on Mon Jan 07, 2008 2:53 pm

Try this firmware - it has 31 codes compressed to fit in the 2K memory of the 2313.

Download
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by magician13134 on Tue Jan 08, 2008 10:25 am

Will that help? If I can't turn off a TV with a couple codes, will this really make it possible? Oh well, I'll give it a shot when I get home. But where does everything go? Like the resonator, and IR LED.

Another thing is, how important is the transistor? I may not have it hooked up quite right, but it should still turn a TV off from up close, right?

(Do you have the C file for that code?)
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

by oPossum on Wed Jan 09, 2008 5:18 pm

Both Sony codes are in that firmware, so it should work with your Sony TVs. The firmware is for the schematic show here.
If you can see the IR LED light up with a camera, it shoud work at ten feet or more.
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by oPossum on Wed Jan 09, 2008 5:26 pm

I tested a 2313 running on internal oscilator, and found it to be almost 5% high. This is at the edge of what will work.

I don't know if this is typical for an AVR. I have very little experience with them. I have used many 12F series PICs with internal osciallaor and all have been within +/- 1%. Good enough for reliable serial comms and IR.

Image

With a resonator, there was no error...

Image
Last edited by oPossum on Wed Jan 09, 2008 5:46 pm, edited 1 time in total.
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by adafruit on Wed Jan 09, 2008 5:35 pm

the oscillators are calibrated for 70degF, 3.3V operation
User avatar
adafruit
 
Posts: 11666
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

by oPossum on Wed Jan 09, 2008 5:40 pm

Test done at 3.2 V (2 fresh AA) and 68 F.

Also checked with 5.0 V bench supply - was a little higher (42.06 kHz)

One sample is of course statistically meaningless.
User avatar
oPossum
 
Posts: 635
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

by magician13134 on Wed Jan 09, 2008 8:01 pm

I tested my batteries, and I'm getting 3.18V from them. The temperature was exactly 70degF AND I was using an external resonator. This leads me to believe that timing is not the issue. I've tried it with a new chip, same exact thing. What else could be wrong here? There's not a whole lot going on. 3.18V going into the chip, the chip is grounded, a resonator on pins 4 and 5 which is grounded too, a visible LED on pin 11 (or maybe 12, I can't remember off the top of my head), it is flashing like it should. An 808nm LED on pin 14 the is flashing quickly... I'm using a Sony TV to test, the regular TV-B-Gone turns it off immediately. And sometimes I try to put in a 2222A transistor, but I don't really know how to attach it, so I mostly leave it out
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

by caitsith2 on Wed Jan 09, 2008 10:09 pm

Most TVs don't respond to 808nm IR Leds. They respond to 940nm IR leds, this would explain your inability to shut your TV off.
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 10:21 pm

by magician13134 on Thu Jan 10, 2008 6:34 am

Sorry for the mistake, these are 940. I wasn't thinking there. I just checked the package again, they are 940.

Ok, I switched to a tiny85 and got it working. Now it's time for the fun part, modding :o! Thanks for the help, I'll post my final product (or if I need help again :wink:)
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor