0

Weird Problem?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Weird Problem?

by fdsa on Tue Nov 06, 2007 9:49 pm

Hi Guys,

I'm having a problem, i passed the blinking LED test, then built the rest. I almost 100% that i don't have a soldering issue.

Symptoms:

The green LED constantly flashes, regardless of what I do to the switch.
The IR LEDs flash, so the code is running and they are wired correctly.
The unit doesn't turn the TV (Samsung) off.
The only way to get the green LED to stop blinking is to take the batteries out.

I made a YouTube video of what i'm describing.
http://www.youtube.com/watch?v=64FMQV1LEfo

Any ideas?

I ohmed out the resistors, they are the correct values, I ohmed out the switch, it only makes contact when the SW is pressed (momentary). The AA batteries are good, 2.97V (bank).

I'm guessing maybe I damaged the resonator when I reflowed the joint after I flush cut the leads (after the LED test) and now its running of the internal oscillator, causing the IR LEDs to flash at the wrong frequency? I'll look at it with the scope at work tomorrow.

fdsa
fdsa
 
Posts: 44
Joined: Sun Dec 31, 2006 12:26 am

by magician13134 on Tue Nov 06, 2007 10:47 pm

I could be wrong, but I don't think there is an internal oscillator.
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am
Location: Ann Arbor

by fdsa on Tue Nov 06, 2007 11:03 pm

The part does have an internal oscillator, its set with the CKSEL fuse, im not sure what value this register is set to. I'll have to look at the code.
http://www.atmel.com/dyn/resources/prod_documents/doc2586.pdf
I'm thinking that the reason a ceramic resonator was used was to provide a nice, solid, temp stable frequency source to give reliable IR codes.

Edit...

Turns out that the code is pretty well documented ;) :
This firmware requires using an 8.0MHz ceramic resonator (since the internal oscillator may not be accurate enough).
burn-fuse:
$(AVRDUDE) $(AVRDUDE_FLAGS) -B 250 -u -U lfuse:w:0xfd:m -U hfuse:w:0xde:m
FLB=0xDE, CKSEL[3:0]=0b1101, so 8.0 Mhz, Ceramic resonator, fast rising power...

So at least know i know that the resonator must be running as the AVR is set to run from the external crystal and the power LED is blinking. I double checked, all IR LEDs are installed with the right polarity, flat side negative. What gives? I'm running out of ideas... Maybe tomorrow I will have time to compile the code and reprogram it, maybe it wasnt programmed successfully? I kinda doubt it, I'm grasping at straws here... :)

I'm getting married the 17th, and I would like to have this running before I leave for the honeymoon :)
Last edited by fdsa on Wed Nov 07, 2007 12:30 am, edited 2 times in total.
fdsa
 
Posts: 44
Joined: Sun Dec 31, 2006 12:26 am

by fdsa on Wed Nov 07, 2007 12:25 am

Wait a second, now I'm confused...
burn-fuse:
$(AVRDUDE) $(AVRDUDE_FLAGS) -B 250 -u -U lfuse:w:0xfd:m -U hfuse:w:0xde:m
Code: Select all | TOGGLE FULL SIZE
lfuse=FLB, fuse low byte, right?  So this is set to 0xFD=0b11111101... and FLB[7:0] is defined as: CKDIV8, CKOUT, SUT[1:0], CKSEL[3:0], so...
CKDIV8 = 1 (unprogrammed, so CLKPS = 0000, prescale=0, so div by 1)
CKOUT = 1 (unprogrammed, so not output on PORTB4, ok...)
SUT[1:0] = 11 (11 + CKSEL0 = 1 means crystal oscillator, slow rising power)
CKSEL[3:0] = 1101 (CKSEL[3:1]=110, so 3.0 - 8.0 Mhz crstal oscillators, 12-22 pF caps recommended.
Am I missing something? Why the oscillator setting when a ceramic resonator is used?

What I had in the post above made sense, but i think i reversed the low and high bytes...
fdsa
 
Posts: 44
Joined: Sun Dec 31, 2006 12:26 am

by adafruit on Wed Nov 07, 2007 2:14 am

those fuses set it for the external crystal.
its not using the internal oscillator
http://palmavr.sourceforge.net/cgi-bin/ ... B_CKSEL0=P

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Weird Problem?

by adafruit on Wed Nov 07, 2007 2:16 am

fdsa wrote:Hi Guys,

I'm having a problem, i passed the blinking LED test, then built the rest. I almost 100% that i don't have a soldering issue.

I ohmed out the resistors, they are the correct values, I ohmed out the switch, it only makes contact when the SW is pressed (momentary). The AA batteries are good, 2.97V (bank).

I'm guessing maybe I damaged the resonator when I reflowed the joint after I flush cut the leads (after the LED test) and now its running of the internal oscillator, causing the IR LEDs to flash at the wrong frequency? I'll look at it with the scope at work tomorrow.


yeah id check with a scope on the button pin. also scope the IR led pins, does it look 'right' or is it all messed up?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by fdsa on Wed Nov 07, 2007 12:12 pm

Yea, so... It works just fine, my batteries were just a little drained, causing resets... I used a power supply at work and all was good.

PS - With no current limiting resistors on the IR LEDs, this thing wants like 0.5A@3.33V! I guess thats what makes it super power! This things gonna chew up batteries like a mutha!

I think i know what i will do next, buy a knockoff Wal-Mart mag light with D-cells and use this as the bulb! tripple up on th arrays/ucontroller and split the remote database b/t them. Drive by!
fdsa
 
Posts: 44
Joined: Sun Dec 31, 2006 12:26 am

by adafruit on Wed Nov 07, 2007 1:10 pm

yeah... i think im going to fix the next rev firmware so that it does the 'right thing' on brownout
thanks for the note, its very helpful

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by fdsa on Wed Nov 07, 2007 6:27 pm

yea, it looks like the reason that it just blinked quickly was that it started up, blinked 4 times fast, like normal, then tried to fire the IR LEDs, which craters the battery and leads to a reset, then light blink 4x, rinse, wash, repeat...
fdsa
 
Posts: 44
Joined: Sun Dec 31, 2006 12:26 am

by maltman23 on Thu Nov 08, 2007 4:11 am

I've had the same problem with weak batteries.

But even though we are pumping as much current through the IR emitters as the batteries can supply (which is desirable for super high power OFF!), the duty cycle is not very high, so the batteries actually last quite a long time. My job requires that I do continual extensive daily (and nightly) field testing with my TV-B-Gone Kit, and the new alkaline AA batteries I've been using for over 3 weeks are still working great!

One thing to be aware of: just because a battery says 2.9v without a load, doesn't mean that the battery is good with a decent load on it. Alkaline batteries are highly recommended for use with the TV-B-Gone Kit. Rechargeable batteries will work, but not nearly as well as alkalines, due to the higher internal resistance of rechargeable batteries.

A friend of mine has put a hacked original TV-B-Gone inside of a huge Maglite, and though it is a bit conspicuous to use, it is, indeed, super high power! If you build one of these, please let us know how it works for you!

Mitch.

maltman23
 
Posts: 134
Joined: Fri Jul 13, 2007 4:54 pm
Location: San Francisco

Please be positive and constructive with your questions and comments.