Serial over the IR


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326

    Default Serial over the IR

    Good day to all in this forum,
    I am trying to send serial UART data over the IR using rx and tx at 38 Khz with a baud rate of 1200.
    Does anyone have any sample schematics and a sample code please ?
    Thanks for helping.
    Ambrogio

  2. #2
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    What hardware are you using, and how far have you got with the project?

    Amazing what you can find when you google the subject !

    http://nrqm.ca/2011/08/transmitting-...over-infrared/

    OK this uses an arduino, but it explains the concept https://learn.sparkfun.com/tutorials/ir-communication
    Last edited by Scampy; - 26th May 2017 at 09:44.

  3. #3
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    Thanks,
    at the moment my hardware consist of pic 18f1320, a tsal6100 emitter and tsop4038 receiver.
    The emitter is driven by a bs170 mosfet and it handles about 200 mA of current.
    I did transmit some burst of 38khz carrier and I got the required distance that is around 20 meters: that is OK for me now.
    The small piece of code is like this:
    LOOP:
    HPWM 1, 127, 38000
    PAUSE 1
    HPWM 1, 0, 38000
    PAUSE 100
    GOTO LOOP

    Now how could I modulate the carrier using the serial ( UART data ) ?
    Thanks
    Ambrogio

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    I would look for a processor with a DATA SIGNAL MODULATOR Module. Perhaps an 16F1825, or 16F1847 or such.
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    thanks ,
    but I am linked to the 18f1320 now.
    Bye

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    This may help, achieved from Rentron. Be sure to copy any info that you like. It may not be available in the future.

    https://web.archive.org/web/20120504...munication.htm

  7. #7
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    good ,
    it requires an external Nand gate but it is suggesting to use a resistor in series to the bs170 gate and another pic pin to turn on and off the carrier... this pin should be low state or three state . Three state for carrier on and low for carrier off...
    I will try and let you knw.
    thanks
    Ambrogio

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    You shouldn’t need another pic, just turn on HPWM, and leave it on.
    then use that as one input to an AND gate, and your HSEROUT pin as the other,
    then the AND gate output should be the modulated serial.

    The IR receiver modules don’t go well with a constant carrier, at least in my experience,
    and also your output from the IR receiver module might be inverted (relative to what you expect).
    You might need a 7404 or similar at either the send or the receive end.

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Lightbulb Re: srial over the IR

    If the received data is like a garbage, then reverse IR LED legs.

    Name:  USART_IR.jpg
Views: 567
Size:  13.7 KB
    Attached Images Attached Images  
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  10. #10
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    good idea Sayzer,
    thanks,
    Ambrogio

  11. #11
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    Take a look at the following, these show you some simple information about RX/TX IR communication and some basic code:

    Basic IR Communications (http://www.electro-tech-online.com/a...nications.361/)
    Lazer Tag– concept (http://www.electro-tech-online.com/b...3-concept.216/)

  12. #12
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    thanks,
    I did register but not possible to get in due to error: could you pls specify the links again ?
    Regards
    Ambro

  13. #13
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: srial over the IR

    Not sure if you were referring to the following links; but just in case they are posted below in full:

    http://www.electro-tech-online.com/a...nications.361/

    http://www.electro-tech-online.com/b...3-concept.216/

Members who have read this thread : 3

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts