1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics IR Remote using PIC?

Discussion in 'Modding' started by ch424, 1 May 2006.

  1. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Hi people

    I want to make an IR remote for my LCD project, but I'm trying to keep it as small as possible. I'm hoping to just use the serial TX and RX on a pair of PICs.

    My school stocks an IR reciever/demodulator TSOP1838, which demodulates 38KHz... but I don't know enough about signalling to understand the datasheet: what do I have to send from the transmitter?

    Alternatively, could I use an IrDA transciever?

    Thanks for any info...

    ch424
     
  2. Confused Fishcake

    Confused Fishcake Minimodder

    Joined:
    25 Sep 2005
    Posts:
    698
    Likes Received:
    1
    Picaxes natively support IR, the picaxe 08-m is particularly good:

    £1.50 each
    8 pin dip - small but powerful (also available in smd)
    Native IR
     
  3. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Thanks, but I'm using an 18F2550 that's running many other services, so I can't use basic! I was actually asking about the IR hardware that I should use: what LED, modulator, demodulator etc..

    Thanks

    ch424
     
  4. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Any ideas people?

    Thanks

    ch424
     
  5. agent420

    agent420 What's a Dremel?

    Joined:
    18 Apr 2006
    Posts:
    227
    Likes Received:
    0
    I've not experimented with ir (yet), so unfortunately I can't offer any personal knowledge... but have you seen this page?
     
  6. GuardianStorm

    GuardianStorm Minimodder

    Joined:
    26 Apr 2005
    Posts:
    1,475
    Likes Received:
    1
    what language are you using?

    different compilers/languages have different stuff built in, maybe there is some prebuilt commands for it?

    or, could you use the (possibly) in built serial transmition comands, and then build an oscialtor (could use the crystal that drives your PIC for this aswell as the PIC), AND the serial output with this waveform, then transmit, then on the receve end bost it using an op amp or similar, then remove the carrier, and interpret output with a PIC.

    just an idea.
     
    Last edited: 5 May 2006
  7. Chrizzle

    Chrizzle What's a Dremel?

    Joined:
    6 May 2004
    Posts:
    249
    Likes Received:
    0
    http://www.rentron.com/PicBasic/RemoteControl.htm is a useful site and I can help a little bit. Are you trying to have multiple functions (potentiometer, more lights than you have bits, etc.)? If so, you'll need to use a PIC on each end to put different data on different on different bauds. http://www.rentron.com/remote_control/TINY-IR2.htm is a simple schematic for a 5-bit transmitter/receiver. You can use switches or logic to control it.

    --oops I didn't realize you were trying to program a PIC to control an IC. http://www.circuitcellar.com/library/ccofeature/millier0999/c99bm2.htm is a useful guide.

    But you only need programming if you have more functions than you have bits. What exactly are you trying to control?
     
    Last edited: 5 May 2006
  8. Chrizzle

    Chrizzle What's a Dremel?

    Joined:
    6 May 2004
    Posts:
    249
    Likes Received:
    0
    As far as IRDA goes, I'm pretty sure that it's a cable-replacement standard which means you'd run into the same problems controlling it since you would need to synthesize the type of output it accepts and then decode it later as input. I've never worked with it though.
     
  9. Confused Fishcake

    Confused Fishcake Minimodder

    Joined:
    25 Sep 2005
    Posts:
    698
    Likes Received:
    1
    Bit-bashing it should work, I have successfully sent serial data across just on a standard ir led, and recieved it on an ir reciever. If you get the baud to roughly match 38khz, or a multiple/factor of 38, you should get at least a metre or two range. What sort of range do you need? You could always try rc?
     
  10. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Thanks for all that people! I'll have a look at all those links.

    I'm using MPLAB with the C18 compiler, and my project is based on the CDC USB firmware. What GaurdianStorm suggested is what I planned on doing, it's just that I'm not 100% sure if that'd work. This is a hypothetical timing diagram:
    [​IMG]
    Ideally, the oscillations and ANDing would be done inside the transmitting PIC: I'd just have to use software UART, which isn't really a problem. I think the TSOP1838 handles removing the carrier. If someone can confirm that this would work, I'll take this route.

    Fishcake, I could use RF, especially as it's so much cooler, but it's much more expensive.

    Thanks

    ch424
     
  11. Confused Fishcake

    Confused Fishcake Minimodder

    Joined:
    25 Sep 2005
    Posts:
    698
    Likes Received:
    1
    Its not much more expensive, maplin stocks a transmitter and reciever 433mhz pair for only £10, and other sites are as low as £7. Considering the extra coolness factor, the extra £3 or so could be worth it.
     
  12. Wolfe

    Wolfe What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    776
    Likes Received:
    1
    Your timing diagram is correct.

    Essentially, you can just look at the system as a "black box" monodirectional serial link If you simply add a 555 timer to the transmitter. It has some duty cycle issues (read the datasheet), but it should work.

    Just remember, the output of the TSOP1838 is active-low.
     
  13. ch424

    ch424 Design Warrior

    Joined:
    26 May 2004
    Posts:
    3,112
    Likes Received:
    41
    Brilliant, thank you!

    ch424
     
  14. GuardianStorm

    GuardianStorm Minimodder

    Joined:
    26 Apr 2005
    Posts:
    1,475
    Likes Received:
    1
    let us know how it goes!
     
  15. iiiibadboyiiii

    iiiibadboyiiii What's a Dremel?

    Joined:
    26 Aug 2006
    Posts:
    3
    Likes Received:
    0
    hey!
    ok i have used a 18f2550 and the tsop1738 infrared reciever to decode infra-red remote control signals! The tsop chip does in fact filter out the carrier frequency...
    i used the interrupt pin of the pic and saved the time intervalls between infrared bursts into an array--that way you can compare the received signal against the saved signal quite easily on the pc side with a small error margin!
    hope this helps
    let me know if u need more help or some source code!
    rene
     
  16. bob hydro

    bob hydro What's a Dremel?

    Joined:
    14 Sep 2006
    Posts:
    1
    Likes Received:
    0

Share This Page