Please be aware of all shipping deadlines before placing your order - we cannot guarantee orders will arrive before Christmas!

My PIC-based TV-B-Gone (design attached)
Moderators: adafruit_support_bill, adafruit

My PIC-based TV-B-Gone (design attached)

by Kayvon on Fri Jul 16, 2010 2:17 pm

I built a TV-B-Gone based off Ada's design. She's given permission to share the design and construction details; she's even encouraged it.

I used a PIC. It's one of the newer XLP (eXtremely-Low-Power) chips they make and has more pins than the original AVR. How is it different? Well...
Code: Select all | TOGGLE FULL SIZE
PROS:
  * Has both start and stop buttons
  * More energy efficient
      Uses 80% less power in (deep) sleep mode
      Stop button saves running power

CONS:
  * PIC footprint is larger
  * Less community support for PICs

Why: because I had access to a PIC programmer and I enjoyed making my own design. The addition of the (optional) stop button allows you to stop the sequence once you've successfully turned off the TV in question. This not only stop the blinking (optional) LED, but it saves power.
built.jpg
The fully-constructed device, mounted on its battery pack. Black is 'go' and red is 'stop'.
built.jpg (34.79 KiB) Viewed 13430 times

Design notes: I forgot the 100uF cap in my original PCB layout, even after I assembled the thing. So its placement is a little odd. Also, I've never used Eagle before. I learned it just so I can share the schematic, so go easy on my schematic.
schematic.gif
Schematic
schematic.gif (39.65 KiB) Viewed 13430 times


Parts:
Code: Select all | TOGGLE FULL SIZE
Recommended list of parts:

  Ex. PART #          DESCRIPTION                          Price
  ------------- -------------------------------------      -------
  PIC24F08KA101 Microchip low-power MCU                    $2.94
  1-390261-6    20-position IC socket    (RECOMMENDED)     $0.23
  SR295E104MAR  0.10 uF, 20+V ceramic capacitor            $0.13
  (stock)       100 uF capacitor                           $0.11
  (stock)       160 Ohm resistor (x2)                      $0.08 x2
  MPSW01AG      NPN 1W transistor (x2)                     $0.40 x2
  751-1203-ND   IR LED (wide output)                       $0.55
  SFH 4511      IR LED (narrow output)                     $0.53
  FCR8.0MC5     8 MHz resonator                            $0.33
  BC22AAL       2-AA battery holder                        $0.71
  PTS645SL43    6mm SPST tact switch, black                $0.13
  PTS645SK43    6mm SPST tact switch, red   (OPTIONAL)     $0.13
  (stock)       100 Ohm resistor            (OPTIONAL)     $0.08
  LTL-307GE     LED (~2.1V forward bias)    (OPTIONAL)     $0.09
                                                           =======
                                                           $6.92

Specific part numbers are just examples. Other parts may work just as well. Prices are quoted from digikey.com and will be less expensive in larger quantities. (Prices are probably outdated by the time you read this, too, but they'll still provide a reference.)

Variant: This project was designed to run off of 3V (2-AA batteries) or 4.5V (3-AA batteries). 4.5V will offer increased power output, but I haven't tested it.
Attachments
PIC TV-B-Gone.zip
Full design, including example perfboard layout. (Updated 21 July 2010)
(192.47 KiB) Downloaded 1159 times
Last edited by Kayvon on Wed Jul 21, 2010 1:06 pm, edited 1 time in total.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by oPossum on Fri Jul 16, 2010 2:31 pm

Very nice. Thanks for sharing.

One more 'pro' of the PIC is that they have very good internal oscillators. You could eliminate the 8 MHz resonator - the internal osc is good enough for consumer IR (and serial, and many other apps).
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
User avatar
oPossum
 
Posts: 635
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: My PIC-based TV-B-Gone (design attached)

by Kayvon on Fri Jul 16, 2010 3:17 pm

Good point. I hadn't looked closely enough, but the ATTiny85's default internal clock's accuracy is 90%. The PIC in question is 99% accurate at room temp (97% at extreme temps). The resonator is some 99.7% accurate. Either device will insert close to 1% error in the timer calculation on top of that.

How accurate does consumer IR need to be? I'll see about doing up a version of this without the resonator next.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by oPossum on Fri Jul 16, 2010 3:40 pm

That is a difficult question to answer because every remote controlled gadget will have a different tolerance to carrier frequency error and data rate error.

I think as a general rule...

+/- 1% error = always works
+/- 5% error = some fail
+/- 10% error = many fail
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
User avatar
oPossum
 
Posts: 635
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: My PIC-based TV-B-Gone (design attached)

by thecrowrc on Wed Feb 16, 2011 12:14 pm

Is posible port to 16f84?.In my city i cant buy another one.Thank you.
thecrowrc
 
Posts: 1
Joined: Wed Feb 16, 2011 12:07 pm

Re: My PIC-based TV-B-Gone (design attached)

by Kayvon on Wed Feb 16, 2011 12:24 pm

I don't believe so. The 16F84 seems to have too little memory (only 1KB) .

Have you considered changing to the 16F88, which costs about half as much, has considerable more resources (enough to handle this), and seems to have made the 16F84 obsolete.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by Agent24 on Sun Feb 27, 2011 7:11 pm

Very nice!
User avatar
Agent24
 
Posts: 307
Joined: Sun Jan 24, 2010 6:48 am
Location: New Zealand

Re: My PIC-based TV-B-Gone (design attached)

by GaMeR on Thu Mar 03, 2011 2:32 pm

I have build this,but it is not working,the TV is not turning off...I have try it on 4 tv's and no luck :(.Under camera the two IR diodes are flashing,and the LED is flashing,but it's not affective on TV.I live in europe,does mean anything?Sorry for my bad english :lol:
GaMeR
 
Posts: 3
Joined: Thu Mar 03, 2011 2:27 pm

Re: My PIC-based TV-B-Gone (design attached)

by Kayvon on Thu Mar 03, 2011 3:02 pm

GaMeR wrote:I live in europe,does mean anything?


You need to modify the .h to use the euro codes instead of the banned codes. The PIC is smaller and can't fit the codes for both regions simultaneously.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by GaMeR on Fri Mar 04, 2011 4:44 pm

Kayvon wrote:
GaMeR wrote:I live in europe,does mean anything?


You need to modify the .h to use the euro codes instead of the banned codes. The PIC is smaller and can't fit the codes for both regions simultaneously.
Hmmm,i'm not sure that i can do that :?...Do you have the hex with the euro codes?Or someone else?
GaMeR
 
Posts: 3
Joined: Thu Mar 03, 2011 2:27 pm

Re: My PIC-based TV-B-Gone (design attached)

by Kayvon on Fri Mar 04, 2011 4:58 pm

I do not, but comparing the attached file WORLDcodes.c with the official TV-B-Gone's WORLDcodes.c should be fairly straightforward. I've not taken the time to make a European version yet because I'd never be able to use/test it.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by GaMeR on Sat Mar 05, 2011 2:12 pm

Kayvon wrote:I do not, but comparing the attached file WORLDcodes.c with the official TV-B-Gone's WORLDcodes.c should be fairly straightforward. I've not taken the time to make a European version yet because I'd never be able to use/test it.

But can you make the hex with the european tv codes?I'm going to test it,and inform you...I don't know how to write the software for the pic,and make it as a HEX file. :(
GaMeR
 
Posts: 3
Joined: Thu Mar 03, 2011 2:27 pm

Re: My PIC-based TV-B-Gone (design attached)

by K-micaz on Wed May 18, 2011 3:51 pm

Hi,
I'm french and I was searching for a TV-B-gone made with a PIC since a long time, so thanks you for it ;-)

Can you explain me what does we have to change in the program to run this TV-B-gone with EU codes ?

If I arrive to do this modification, I will made the layout and I'll post it here for the persons whose want to made it on a PCB ...

Thank you :wink:
K-micaz
 
Posts: 2
Joined: Wed May 18, 2011 3:39 pm

Re: My PIC-based TV-B-Gone (design attached)

by Kayvon on Wed May 18, 2011 4:14 pm

Simply compare the PIC .h file with the official .h file. The differences should be obvious, and the modifications require using EU codes instead of banned codes.
Kayvon
 
Posts: 13
Joined: Tue Jun 22, 2010 5:09 pm

Re: My PIC-based TV-B-Gone (design attached)

by caitsith2 on Fri Feb 24, 2012 3:55 pm

Any possibility of getting the eagle schematic file of this design?

On another note, if the chip was upgraded to PIC24F16KA101, then it becomes possible to have both the European and banned codes, in their entirety. :)

And on a final note, I made the required changes to all of the code files, to support changing the code base from North American codes over to European codes. It is now as simple as commenting the very first line of main.h. :) Both firmware builds are included in the attached archive.
Attachments
PIC TV-B-Gone.zip
Required changes for European firmware, (which is included. :) )
(201.25 KiB) Downloaded 715 times
caitsith2
 
Posts: 217
Joined: Thu Jan 18, 2007 11:21 pm