Infrared HPWM setup


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    2 out of 2 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    any Alias that refers to a LATx reg cannot be safely used with HIGH,LOW,TOGGLE or any other pbp high level command
    the sort of bugs it can introduce vary from chip to chip and can be difficult to understand , don't do it

    Blue var lata.2 '; an alias to a lata

    high blue ; will not work safely
    blue = 1 ; will work
    low blue ; will not work safely
    blue = 0 ; will work
    toggle blue ; will not work safely
    blue = !blue ; will work
    etc...

    Yesterday i tried till late at night to set a code for the TX and RX, a very simple one but didnt work.
    how are the chips connected , show a schematic
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    I will make the schematic on paper later today and will upload it here.

    thanks

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,116


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    Quote Originally Posted by richard View Post
    any Alias that refers to a LATx reg cannot be safely used with HIGH,LOW,TOGGLE or any other pbp high level command the sort of bugs it can introduce vary from chip to chip and can be difficult to understand , don't do it

    Blue var lata.2 '; an alias to a lata

    high blue ; will not work safely
    Though this is the recommended way to control output pins. I suppose this was before LAT registers showed up?

    Ioannis

  4. #4
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    Please find the schematic as follows.

    I hope i didnt forget anything. In any case is very simple.

    Name:  Schematic_IR TX_2023-06-02.png
Views: 1510
Size:  99.8 KB

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    if you look at the data sheet for a tsop4838 you will see that you have a numbers of issues to contend with
    Name:  ast.jpg
Views: 1804
Size:  106.1 KB

    1. @9600baud the bit time is 100uS or approx 4 cycles of 38khz , about 2 to three times faster than the tsop4838 can cope with
    2. the max burst rate is 800/sec a 9600baud stream can exceed that
    3. after a 70 cycle transmission a 12 cycle min tx gap must be made [some devices can lock up if u don't and need a pwr cycle to recover]
    4. the device will do its very best to reject a continuous transmission and go mute till a min tx gap in tx is observed, which is what you are doing.

    overall tsop4838 is not particularly suitable for serial tx from a uart, you could try a much lower baud rate and you will need to
    invert the transmission logic so that there no transmission at idle

    i would also wire tx to rx directly to verify code works before trying ir link, also have a look at Manchester encoding and check out ir tx protocols like RC5/6 NEC etc
    Warning I'm not a teacher

  6. #6
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    Hi Richard,

    you are right, i have decreased the speed and manage to play a lit bit with the delay in useconds.

    I worked somehow but not always reliable.

    I think i will try the RC5 method.

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    I worked somehow but not always reliable.
    the series resistor for the led is wat too big, it will make range / reliability pretty low. it could go as low as 39 ohms safely [probably lower even] in a non continuously on configuration otherwise 100 ohm would be better
    Warning I'm not a teacher

  8. #8
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    I will try to change that as well before i go for the RC5.

    The following 15 days i will be in a business trip in Abu Dhabi so i will get back as soon as i have time to check this out.

    Many thanks.

  9. #9
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Infrared HPWM setup

    Quote Originally Posted by richard View Post
    the series resistor for the led is wat too big, it will make range / reliability pretty low. it could go as low as 39 ohms safely [probably lower even] in a non continuously on configuration otherwise 100 ohm would be better
    For most LEDs or SSRs, I found 470 ohms offers a good compromise between response time and effectiveness.

Similar Threads

  1. Replies: 3
    Last Post: - 23rd October 2011, 12:53
  2. InfraRed Data Com
    By rayzrocket in forum Off Topic
    Replies: 5
    Last Post: - 29th March 2010, 15:42
  3. Infrared x PIC
    By ewandeur in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 18:30
  4. infrared help
    By griffin in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th December 2008, 05:34
  5. infrared
    By bmohnsen in forum General
    Replies: 1
    Last Post: - 2nd May 2007, 16:35

Members who have read this thread : 1

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