Optimizing IR range


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Anand,

    I found a page from someone who reverse engineered a Canon remote.

  2. #2
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Dave, thanks for the link. I had stumbled upon that site, and used the information there to be the basis for my own design. The guy uses an Atmel, which was another incentive for designing my own around a pic. But of course, the detail timings table he's given helped a lot.

    In the page you pointed out, the writer uses a switch to control the Vdd itself; when I tried that my signal burst was not very clean. So my version has Vdd always connected to the battery and 2 separate momentary contact switches for the 2 functions.

    My version is now working very well, functionally, so am now in the process of reducing the current consumption. Shutting off the watchdog, configuring the I/Os and using a nap in the loop has now reduced it to around 40 uA; I guess that means a single CR2032 should last for well over half a year of average use!

    Again, thank you so much for the inputs.

    Regards,

    Anand

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru View Post
    Shutting off the watchdog,
    Sorry, my mistake, that has to be kept on.

  4. #4
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Okay folks, with all the help from you guys, I have this working pretty well now.

    For the benefit of others designing an IR transmitter powered from a typical coin battery, I would like to share this point. Once you have the basic thing working, probably the one single factor to increase the range significantly would be a large capacitor (100uf plus) across the battery.

    I dont know how this would impact the battery life though.

    Regards,

    Anand

  5. #5
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru View Post
    Dave, thanks for the link. I had stumbled upon that site, and used the information there to be the basis for my own design. The guy uses an Atmel, which was another incentive for designing my own around a pic. But of course, the detail timings table he's given helped a lot.
    Anand, can you post the part of the code where you encode the trigger for the Canon, I would like to add it to the timelapse remote I'm building. Thanks!!

    Pablo

  6. #6
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Hi Pablo,

    Thats a nice idea; a sort of semi-universal (Pentax/Nikon/Canon) time lapse trigger.

    The Canon trigger is perhaps the simplest to encode. I'm pasting my code, of which you could delete the delayed-trigger related lines. These a re used on the remote to trigger the shutter 2 seconds after the signal is sent.
    Code:
        Main:
        NAP 0                           ; Reduce consumption in standby from 900uA to 116uA (cost of 18ms delay)
        IF SW1 = 0 THEN GOSUB NO_DLAY
        IF SW2 = 0 THEN GOSUB DLAY
        GOTO MAIN
     
        NO_DLAY:
        HIGH LED
        CYCLES = 16                     ; COUNTER HAS TO BE RESET TO DEFAULT!
        Gosub Pulse
        PAUSEUS 7300
        CYCLES = 16                     ; COUNTER HAS TO BE RESET TO DEFAULT!
        GOSUB PULSE
        PAUSE 50                       ; Prevent inadvertant double triggerPAUSE 500
        LOW LED
        PAUSE 500
        RETURN
      
        DLAY:
        HIGH LED
        CYCLES = 16                     ; COUNTER HAS TO BE RESET TO DEFAULT!
        Gosub Pulse
        PAUSEUS 5300
        CYCLES = 16                     ; COUNTER HAS TO BE RESET TO DEFAULT!
        GOSUB PULSE
        PAUSE 50                       ; Prevent inadvertant double triggerPAUSE 500
        LOW LED
        PAUSE 500
        RETURN
        
        Pulse:          ' THIS GENERATES "Cycles" number of 40kHz pulses (if total delays are 25)
                        ' So, for Canon, 16 Cycles of 31 uS (32.6 KHz) => Demodulated pulse of 0.496 mS
    ASM
       bsf IRTX,PIN     ; 1uS, LED=on
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       goto $+1         ; + 2uS = 13uS   
       goto $+1         ; + 2uS = 15uS 
       goto $+1         ; + 2uS = 17uS 
       bcf IRTX,PIN     ; 1uS, LED=off
       goto $+1         ; + 2uS = 3uS
       goto $+1         ; + 2uS = 5uS
       goto $+1         ; + 2uS = 7uS
       goto $+1         ; + 2uS = 9uS
       goto $+1         ; + 2uS = 11uS
       decfsz _Cycles,f ; + 1uS = 12S           ; This decrements in a loop till 0; then goes to next line    
       goto _Pulse      ; + 2uS = 14uS
       return           ; Return to caller    
    ENDASM
      
        END
    Would be nice to have your feedback on the finished product.

    BTW, in your schematic you have a pullup on the switch input; cant you just enable the internal pullup?

    Regards,

    Anand
    Last edited by ScaleRobotics; - 12th January 2011 at 09:20. Reason: added code tags

Members who have read this thread : 0

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