Outdoor IR barrier

Discussion in 'General Electronics Chat' started by drkblog, Sep 14, 2013.

  1. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    Hello! I'm starting a new project and I would like to here your thoughts about the solution I developed (in my mind) before going further. The requirement is to sense a vehicle passing through a street up to 5m wide (16 feet).

    After reading about IR transmission I came up with the following solution:
    I'm going to build two modules (transmitter and receiver).
    The transmitter is going to send a continuous pulse train of 1kHz 50% duty cycle, of a carrier frequency of 38kHz (just like remote control systems do). It will use an IR led.
    The receiver is going to get the IR signal using a phototransistor. There will be an LM567 calculated for the 1kHz signal detection using the typical application circuit.

    Let aside power supply and optional amplifying stages that may be needed. My main concern is building a simple solution, suitable to work outdoor (with rain and sun) and with other IR light sources which could add noise to my detector. Besides, I'm going to place two different detectors near each other. There is a good chance one detector receives light from both transmitters. My idea is using different pulse train frequency such as 1kHz and 3kHz (having into account limits imposed by carrier frequency and LM567 bandwidth).
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,364
    Sounds ok to me.
     
    drkblog likes this.
  3. crutschow

    Expert

    Mar 14, 2008
    13,042
    3,243
    Mount the detector in a tube, if possible, and use an IR filter (dark red plastic) over the tube opening to minimize stray and ambient light.
     
    drkblog likes this.
  4. Shagas

    Active Member

    May 13, 2013
    802
    74
    I made a similar project a few weeks ago , except it was an IR barrier alarm designed for outdoor use.

    I suggest you use one of these reciever modules .

    http://www.engineersgarage.com/electronic-components/tsop1738-datasheet

    They are bloody immune to noise and with a 100mw Ir diode It was effective at a distance of up to 20 meters even under fluorescent lighting ( in my dormitory corridor ) .

    When the module sees the carrier it outputs 0 volts , otherwise it outputs 5 volts.
    The module includes an IR filter epoxy case .

    If you want to use two independant detectors you can get two of these modules with different carriers (as far away from each other as possible).

    Or you could put the recievers and/or transmitters in a tube for directionality.
    Also , Ir passes through alot of stuff so rain won't be an issue

    Also , if you are going to do this then I suggest you use a micro with an XTAL to generate the precise carrier for the particular TSOPxxxx that you are using and an 980 nm IR diode
     
    drkblog likes this.
  5. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    Lasers give a narrower beam, you can get IR from an old CD drive or laser printer, DVD lasers are visible. The IR sensors used in TVs etc are tuned to about 38kHz and usually have IR transmissive - visible opaque encapsulation, as well as that they usually include AGC to minimise the effect of ambient light.

    If you scrap anything that uses a remote, like a TV VCR, DVD etc the IR sensor is easily traced for the pinout - ground is easy to identify, Vcc is usually fed by a 100 Ohm resistor and has a decoupling electrolytic close by - the remaining lead must be signal (Vcc is +5V the o/p is open collector, but may have a pull up resistor).

    You can also use the VCO section of a 567 as a stable frequency reference for the sender - but you'd have to double check the datasheet whether its good for 38kHz.
     
    drkblog likes this.
  6. Shagas

    Active Member

    May 13, 2013
    802
    74
    Was trying to scavenge a laser when I was was making my project , went through 3 drives and all of them(1-3 lasers in each) were in visible red :/

    But yeah if interference between the two modules is a problem then an IR laser would be preferable.
     
  7. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,061
    3,833
    This is essentially the width of an American garage door. The automatic garage door openers used here have a floor-level IR safety beam to make sure there are no obstruction (children) as the door closes. These are very good at filtering out ambient IR and work well with simple single ir emitter and single receiver. No ir laser is needed.
     
    drkblog likes this.
  8. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    Actually, I have a VS1838 which seems to be a replacement for the TSOP1738. I'm leaving it as a second option because I think I will have to cover a somewhat large surface in the receptor side with detectors. And this detectors are much more expensive than phototransistors (since they have a whole IC inside). Using phototransistors I can share a set of them (let's say four in series connection) with a single LM567 circuit. Which would be cheaper (I guess).

    The reason for having many detectors is vehicles to be detected vary a lot in size and shape. And I can't rely on just a single ray of light as it will result in too many errors. That's the same reason I can't make the light source very directional nor use laser diodes. I have no option but differentiate signals with circuit logic.
     
  9. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,061
    3,833
    Last edited: Sep 14, 2013
  10. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
  11. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,061
    3,833
    I understand, it was just an example for you to see how it could be packaged and the alignment LED idea.

    Narrow angle LED IR emitters are available (less than 10 degrees and 100 mA) to increase the intensity of a 38kHz pulse at 16 feet.

    There is also a 'missing pulse' circuit on the old 555 data sheet. This circuit could trip to indicate a car is breaking the beam.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,802
    I'm not following the reasoning here. Why would using a single ray of light result in too many errors? Why does this make it so that you can't use directional sources or laser diodes?

    Assuming you don't have hovercraft in your area (and that you are willing to miss the occasional motocycle that jumps over the beam), aren't all the vehicles, regardless of size and shape, in contact with the ground and stand at least some minimum height, say two feet, above it?

    But what about other objects? Do you want to detect a human walking down the same section of street, or is it important that you don't detect them and only detect the cars?
     
    drkblog and GopherT like this.
  13. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    A handy tip for testing IR LED/laser - you cant see the IR, but a digital camera can.
     
    drkblog likes this.
  14. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    I think I forgot to mention it, but it has to count vehicles too. The problem they have with single ray solution is it counts two for a single vehicle in some cases. And yes, a person should be detected if it passes the barrier.

    My idea (to be tested) is to shot a bunch of receptors (phototransistors or detectors) with a single IR led. I guess this should be possible specially when there is 16 feet gap between them. But I'm not sure.
     
  15. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,802
    Uh...yeah. You forgot to mention that part. And it's a really, really big part.

    You've got LOTS of complications, now.

    For instance:

    How are you going to tell the difference between a car towing a trailer and two cars travelling close together?

    What happens as two vehicles going opposite directions cross the beams at the same time?

    What should happen as a group of three people walk through that are not all walking at the same speed or if someone stops and then continues on while another person stops and then goes back to get something they forgot.

    What should happen if a car comes past while this group is walking through?

    What should happen if this car stops to ask them a question?
     
  16. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    :) Well, it isn't that bad. I said that the sensor should be able to detect a person, but there will be no people crossing under normal circumstances. The street is one direction only. The most likely situation of error would be the trailer case. I have to count that as a single vehicle. So I must be able to detect the connection between them.
     
  17. WBahn

    Moderator

    Mar 31, 2012
    17,768
    4,802
    Those certainly help.

    Good luck with that!

    You need to stop and consider just how important is it that you detect the trailer and count it as a single vehicle.

    It appears that you are basically saying that miscounts due to people walking (what about bicyles) should be infrequent enough so as to be tolerable. Well, then you need to ask if the miscounts due to counting a trailer as a separate vehicle will be infrequent enough to be tolerable. If not, is it because the event rate of having a trailer come through is so much higher, or is it because you fundamentally can't tolerate counting a trailer as a second vehicle. If it's the latter, then you need to reconsider whether you can really tolerate miscounts due to foot and bicycle traffic -- after all, does it really matter whether the number I get is off because I miscounted a trailer or miscounted a pedestrian?

    In general, you need to take a step back and clearly specify what your requirements are. You WILL have counting errors. You need to specify how many and what kind are tolerable and what, if anything, you need to do to deal with them. That will drive the design of your system.
     
    drkblog likes this.
  18. Shagas

    Active Member

    May 13, 2013
    802
    74
    I know that , but if I can see the red that means that the laser is about 680-700 nm max which is not IR .

    Also drkblog if money is an issue then you can always scavenge Ir sensors from old stereos , tv sets , recievers etc .

    As for the problem of counting cars , assuming you are going to use the double beam In my opinion you could get good results but you have to use a micro for 'smart counting' because it would have to differentiate between a car and person and bycicle etc . Also I would space the beams about 2 meters apart. That way you could probably even differentiate between a car and truck.
     
    drkblog likes this.
  19. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    Money isn't the most relevant issue here. But, you know, we always try to keep the costs low.

    The "precision" requirement came from the customer, so I don't want to go against that now. Unless I reach a dead end because of that. Or if I see that requirement make the project too expensive.

    I'm going to buy a couple of LM567 today and some IR leds and phototransistors, in order to do some testing. That way I will have a better idea about the costs.
     
  20. drkblog

    Thread Starter Member

    Oct 4, 2012
    109
    0
    I've got a couple of IR leds today along with two LM567. I've paid the IC less than a dollar (which is really cheap) and the QED234 (led) a dollar (which is too expensive). The good news is I've done the first successful test by sending a 16kHz square signal to the led and receiving it at the other end with a generic phototransistor, an opamp and the LM567. It works :)

    But, I'm not using the 38kHz carrier as I was planning to do. This way I can simplify the solution (as long as I don't use the detectors which need the 38kHz carrier).

    Then my question here is: Why using the carrier at all?

    I guess using the carrier I could reduce the chances of detecting noise as if it was the actual emitter. But, how likely is that? Unfortunately it's been raining for three days here in Buenos Aires and we aren't going to see the sun until Wednesday (according to forecast). So will have to wait a couple of days before doing a test myself.
     
Loading...