38khz IR camera trigger receiver questions

Discussion in 'The Projects Forum' started by AdamM, Oct 25, 2010.

  1. AdamM

    Thread Starter Active Member

    Mar 7, 2009
    30
    0
    Good day,
    I'm working on a IR camera trigger that will fire a camera when an IR beam is broken. Initially I just had an IR LED on the transmitting side, and an IR phototransistor on the receiving side (with a transistor and variable resistor for sensitivity adjustment). This worked indoors, but was almost useless outside because the high and changing ambient light made it impossible to find an effective sensitivity level.

    Following some suggestions from the forum, I'm now working on a version that uses a 555-powered 38 khz modulated IR and a receiver/decoder from a VCR. After building the circuit I discovered to my dismay that the receivers I have (and apparently most other 38 khz receivers also) can't handle an uninterrupted signal from the transmitter. The active-low output from the receiver will only stay down for a fraction of a second when a steady signal hits the receiver before bouncing back up to the no-signal level. Based on some tests with a scope and a MCU-generated signal, it seems that there has to be a gap of a millisecond or so between pulses, and the pulses themselves can't be very long.

    I could put a MCU on the transmitter and pulse the output, but then I'd have to have a filter of some kind at the receiving end. This would also add a delay to the response, which isn't so good for fast moving subjects (hummingbirds and the like).

    According to a post on the parallax forum (http://forums.parallax.com/showthread.php?t=103026) Waitrony makes an IR receiver that can handle a continuous 38khz signal -- the PIC-2T26ASMB. Unfortunately, I haven't been able to find anywhere to buy one of them!

    If all else fails, I might try putting a uC on the receiving end with two receivers and switching them on and off alternately every few ms. This is an awkward solution though (and probably a troubleshooting nightmare for my skill level!), which I'd like to avoid if at all possible.

    So my questions are:
    1) does anyone have a suggestion for where I could get one of the Waitrony receivers, or does anyone know of an alternate part?

    2) can anyone think of a good way of using an intermittent signal effectively, or maybe using some other type of modulation altogether?

    3) why do the IR receivers "overload" and stop recognizing the incoming signal (something in the AGC?), and is there maybe a way to trick them into behaving better using external components?

    Thanks very much for your help! There's a pack of wolves frequenting our property these days, and my brother (who I gave the original trigger to) is a keen nature photographer -- so I'm hoping we can catch a shot of them going about their business from a safe distance!

    Thanks,
    Adam
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    You could put another 555 in the sender circuit that connects to the enable pin of the existing 555 to create a pulsed signal.
    Then you could put a missing pulse detector on the output of the IR receiver.
    http://ecelab.com/circuit-miss-pulse-det.htm

    <ed> for enable pin I should have written reset pin </ed>
     
    Last edited: Oct 25, 2010
    AdamM likes this.
  3. wayneh

    Expert

    Sep 9, 2010
    12,129
    3,050
    If you use a 556 dual timer, I think you could easily arrange a pulsing signal modulated at 38kHz. On the receiving end you may need some smoothing but that could be as simple as an RC tank with a time constant just long enough. This will all lengthen the overall response time, but I really don't think you'll lose relevant response time. Yes it will be slower, but again I don't think it will be a relevant loss for detecting critters.
     
    AdamM likes this.
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    To obtain the modulated 38KHz infrared LED drive, I would use a crystal with a 74HC4060.

    Both my 38KHz and the modulated signal would then be accurate with time and adjustment free if the correct crystal is being used.

    Goes with a missing pulse detector as Markd77 has suggested.
     
    AdamM likes this.
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    The issue with these TV remote circuits is that the manufacturer never knows what the amplitude of the incoming signal will be. The user could be right by the set, or across a large room, so what they do is build in an auto-gain circuit. It works best if there's an intermittent incoming signal at 38KHz, not a continuous one. Don't quote me, but I think a 10:1 off:eek:n ratio is pretty good, though 16:1 ought to work if you're using a digital divider. Unfortunately, one aspect of the auto gain is that if there's no incoming signal (the path is blocked, by a hummingbird or whatever) the gain will go up until the output starts to "chatter"--produce random blips. This is OK on a TV set, because there's a decoder that won't respond unless a specific code is received, but if you just look for any output, you'll see it all the time if the light beam is blocked. So whatever scheme for interrupting the signal you use at the transmit side, you need a matching decoder on the receive side. Yes, a microcontroller would be good to have.
     
    AdamM likes this.
  6. AdamM

    Thread Starter Active Member

    Mar 7, 2009
    30
    0
    Thanks for your replies. It looks like a modulated signal is the way to go. I think I'll try adding another 555 to the sender (or a counter, if I can get it working), and then filtering the output using either another 555, a microcontroller, or a RC filter. I looked up the shutter lag on my K7 SLR and depending who you read its between 20 and 74 ms, so a couple extra ms won't be a problem.

    I've got several microcontrollers around, and it could be handy to have one in the receiver anyhow because that would give me the ability to set how many times the camera would retrigger if the beam remained broken and such. It seems kind of like cheating though, sticking a computer in there... I might have another go at doing analog first :)

    A few more questions:

    @wayneh: Where do you think I should look for info on a suitable RC tank circuit? I've been curious about resonant circuits for a while and I'd like to learn more about them, but I'm fairly clueless right now.

    @eblc1388: The stability of using a crystal-controlled counter sounds like a good idea. I've got quite a few salvaged crystals, and I think I've got access to some binary counters too so I might be able to do this with parts I have on hand. To drive the LED, I would use two outputs from the counter (one at 38khz and one at the modulation frequency) to control two transistors in series with the LED? I've never used crystals in a home-brew circuit before -- do you know where I could find a good tutorial on this sort of thing?

    @John P: I figured the AGC was the culprit. Based on the test I did with a MCU-generated modulated signal and a scope on the receiver output, I think a 500hz modulation with a 1:1 on:eek:ff ratio will work. I'd like as short an off time as I can get away with to minimize the delay detecting something that's actually broken the beam.

    Thanks again for your replies,
    Adam
     
  7. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Because of the fixed divisor ratio of binary counting ICs, you just can't use any crystal.

    Here is a schematic of the circuit using a common 2.4576MHz crystal. If you can't source the crystal, you can try 2.500MHz but the output frequency would be 39KHz.

    The 74HC4060 is only good to 6V supply voltage or lower. If you plan to use 12V, then you have to select the CD4060B instead and increase the value of the IR diode series resistor.

    [​IMG]
     
    Last edited: Oct 28, 2010
  8. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Last edited: Oct 28, 2010
  9. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Wow Mark, that is indeed a lot messy! It's a good thing building electronics isn't about entering a beauty contest.

    With those high-voltage logic circuits, you do have to use an external power transistor, because the chip itself has very limited output current. Good old 74HC wouldn't have a problem, and TV remotes run on a couple of AA's or AAA's, so it's obviously workable at low voltage.

    Maybe finding an IR link that runs at 40KHz instead of 38KHz (a few do) would help in dividing down crystal frequency.

    It seems I didn't understand the timing of the AGC element in IR receivers, but anyway--it's important.
     
  10. wayneh

    Expert

    Sep 9, 2010
    12,129
    3,050
    Any basic text on differential equations, electronics, or physics will likely cover the basics of an RC circuit. And there are endless online sources, including a wiki article, see "RC Circuit".

    Don't get hung up on the complexity; the practical use is quite simple. As the charge on a capacitor rises or falls, the voltage across the capacitor moves in proportion to the charge. Since that voltage is what drives movement of charge - current - thru the attached resistor, the driving force drops over time. So the voltage changes exponentially. A big voltage changes more quickly than a low one, with a half life related to the product of R and C, or RC, the time constant required for a change of one (natural) log. Higher resistance and/or capacitance increases RC, slowing response time. Lower R and/or C decreases RC and quickens response time.

    A very small RC value is useful for filtering high frequency noise, whereas a big RC value is needed for slow-moving voltages such as a quick-and-dirty "time delay" of several seconds.
     
  11. AdamM

    Thread Starter Active Member

    Mar 7, 2009
    30
    0
    Thanks to everyone's helpful suggestions, after two years of intermittent tinkering (and 3 different threads on this forum) I now have a fully function IR trigger system!

    I ended up using a PICAXE PIC on the transmitting end (I couldn't find the right binary counter to go that route), and a 555 missing pulse detector on the receiving end as suggested by MarkD77. I added a switch and some transistors to enable using it in either interrupt mode (triggering when the beam is broken) or reflected mode. I haven't done any careful range tests yet, but it will go at least 10 feet in interrupt mode, and about 2 feet in reflect mode -- quite adequate for the purpose.

    I installed the transmitting circuit in a water resistant flashlight battery pack. The receiver happened to fit in a project box I had on hand -- not watertight, but at least all the wires are inside!

    Once I've got my schematics organized I'll post a detailed description of the project in the completed projects forum to help out others trying to do a similar type of thing. In the course of building it I found a lot of posts all over the internet by people going through basically the same series of errors that I had -- starting with no modulation, then attempting to use a standard IR receiver with continuous carrier, etc. A thorough tutorial could save people some time, I think.

    Thanks to wayneh for the info on RC circuits. I'd actually been to that wiki page just before I posted, but I misunderstood the meaning of "RC tank" and thought you were talking about something more complicated that would respond to a specific frequency, rather than just a delay.

    Thanks Markd77 for the PIC code. I've got PICAXE code to cover this application, but the info on the Pentax remote signal could be really useful for some other projects I've been working on (I'm also using Pentax cameras).

    Thanks again for all of your help. I've attached some photos of the finished product.

    Cheers,
    Adam
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Good job on the project.

    AND good job on the photographs. They are well lit and nicely displayed.
     
  13. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Nice work.
     
  14. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Nice work, I like using cases from other things.

    Here's my IR remote in a torch case (with penny for scale). Very handy for tripod shots with a long lens.
    [​IMG]
     
    Last edited: Nov 29, 2010
Loading...