Author Topic: Using SMD chips for IR occupancy detection  (Read 1860 times)

0 Members and 2 Guests are viewing this topic.

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Using SMD chips for IR occupancy detection
« on: February 10, 2018, 11:36:32 PM »
+2
Infrared (IR) occupancy detection has been on my mind for a while, especially for grade crossing control. I haven't liked the "traditional" approaches with IR since everybody defaults to the "classic" old-style LED 3mm dome shapes for the detection pair. For across-the-track, there's the challenge of hiding them, for reflective, big holes in the track. I reasoned the store-bought IR sensing circuits would work with surface-mount chips and could be done nearly invisibly.

This reflective pair works great with an Azatrax MRD6X:



The upper hole has the phototransistor in 0805 size, the lower is a 0604 IR LED. A little ballast in the gaps and these will be hard to see. Added benefit is the phototransistor in this placement somewhat "models" 1:1 track shunts.

Hardest part of the job was soldering the #36 wires to the chips.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

Philip H

  • Crew
  • *
  • Posts: 8910
  • Gender: Male
  • Respect: +1655
    • Layout Progress Blog
Re: Using SMD chips for IR occupancy detection
« Reply #1 on: February 11, 2018, 07:43:27 AM »
0
Those are indeed tiny and thus well placed. Do you have onangle them at all or is their proximity enough to get good signal return off the underside of normal freight cars?
Philip H.
Chief Everything Officer
Baton Rouge Southern RR - Mount Rainier Division.


C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: Using SMD chips for IR occupancy detection
« Reply #2 on: February 11, 2018, 10:31:50 AM »
0
No, not angled, more or less gently stuffed in the holes face-up. Proximity seems to be the key. I was concerned about too close, but apparently making sure the IR LED was slightly recessed took care of it. Detected all rolling stock I tested with, and then surprisingly resistant to incidental falsing - I could lower my palm to ~1.5" directly over before it would see it. Ambient lighting made no difference in performance, from fully dark to @Gary Hinshaw surgical levels. :D

I've generally been skeptical of reflective IR detection, but this proof-of-concept might motivate semi-finishing a crossing scene on the layout. The Azatrax circuit uses three detector pairs on each side to emulate approach control. It doesn't try to determine approach speed - it lowers gates on first detection - but it will raise the gates after X seconds if no detection on second sensor, and then do the same until the third, which is to be placed adjacent to the street and will lower the gates regardless.

Another feature of the Azatrax circuit is built-in R/C servo control for the gates. Genius, and you know how I love my servos. Downside (...boo, hiss!...) is John (Parsons, of Azatrax) designed it for manual adjustment of the linkage rather than setting servo limits in software. So I'll have to use Tam Valley for soft-configurable servo drives. It's only money.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

woodone

  • Crew
  • *
  • Posts: 799
  • Gender: Male
  • Respect: +33
Re: Using SMD chips for IR occupancy detection
« Reply #3 on: February 11, 2018, 04:05:31 PM »
0
Care to share what SMT's you are using?

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
« Last Edit: February 11, 2018, 04:40:09 PM by C855B »
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

GaryHinshaw

  • Global Moderator
  • Crew
  • *
  • Posts: 6344
  • Respect: +1869
Re: Using SMD chips for IR occupancy detection
« Reply #5 on: February 11, 2018, 06:42:28 PM »
0
Very nice.  8)

ednadolski

  • Crew
  • *
  • Posts: 4812
  • Respect: +1757
Re: Using SMD chips for IR occupancy detection
« Reply #6 on: February 11, 2018, 11:01:38 PM »
0
This seems pretty interesting.   I had looked into IR detection a little bit ago and for me the limitation was a way to mount the devices (in a helix with four parallel tracks).  This looks like it opens up some interesting possibilities for mounting in limited spaces.

One concern with IR is, if the gap between cars could lead to missed detection.  These seem to be small enough (and cheap enough) that you could place 2 or 3 sensors within maybe an inch or so of each other and wire-OR them to the detection circuit so that it reads occupied if any of the sensors detects a car.

The attractive thing about the IR over current detection is not having to cut rail gaps and equip rolling stock with resistor wheelsets (with the resultant potential for electrical contact issues to become a problem.)

Ed

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: Using SMD chips for IR occupancy detection
« Reply #7 on: February 11, 2018, 11:30:57 PM »
0
... One concern with IR is, if the gap between cars could lead to missed detection.  These seem to be small enough (and cheap enough) that you could place 2 or 3 sensors within maybe an inch or so of each other and wire-OR them to the detection circuit so that it reads occupied if any of the sensors detects a car. ...

What I found really interesting in the test setup is that it detects a car 1/2" either side of the sensor pair. Apparently the "wash" of IR is bright enough and wide enough to reflect back to the phototransistor, yet it doesn't false. Most IR setups I've seen have the LED and sensor buried in a tube to narrow the beam. I also should experiment with placing the pair crosswise between the ties up against opposite rails.

That's an interesting idea to use multiple pairs on the same sensor leads. I surmise you would wire the LEDs in series, and the phototransistors in parallel. But it may not be necessary.

In some respects "detection is detection" whether with current sensing across the rails or IR pairs. However, there is a big difference in spot detection versus segment detection. My plan is both on the layout - block detection for signals and IR for grade crossings. The IR detection can be a second confirmation of block occupancy (i.e., a known fixed location within the block is occupied), but it can't be primary since it will only detect something above it.


Now that I'm away from the layout... on a whim I filled the gaps around the sensor pair with ballast. Should've taken a pic - on my list for tomorrow, then. They didn't disappear completely, but now seem to look like normal track clutter. I'll take it.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

peteski

  • Crew
  • *
  • Posts: 32956
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5340
    • Coming (not so) soon...
Re: Using SMD chips for IR occupancy detection
« Reply #8 on: February 12, 2018, 12:15:08 AM »
0
 Funny (and non-intuitive) how black-colored underframes reflect IR radiation quite well. If you want to try to actually see the IR light, Use any digital non-DSLR camera (look through the viewfinder or its screen).  While those do have built-in IR filter, it lets some of the IR light through (especially the near-visble IR radiation from LEDs).  Better yet, if you have an old camcorder hanging around, use it . Some camcorders had a "night mode" which removed the IR filter from its optical path.  You might actually be able to see how much IR radiation illuminates the car.
. . . 42 . . .

ednadolski

  • Crew
  • *
  • Posts: 4812
  • Respect: +1757
Re: Using SMD chips for IR occupancy detection
« Reply #9 on: February 13, 2018, 06:08:37 PM »
0
Would it be useful to etch PCB boards for mounting the SMD parts?    The etching is being discussed in this thread:

https://www.therailwire.net/forum/index.php?topic=43987.msg563449#msg563449


Seems that ought to be easier than soldering to magnet wire.  With a slim PCB, one could install it between ties by slipping it in from the side (cover with ballast as needed).

Just a thought,

Ed

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: Using SMD chips for IR occupancy detection
« Reply #10 on: February 13, 2018, 06:33:19 PM »
0
Already working on that idea. :D
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

railnerd

  • Crew
  • *
  • Posts: 764
  • Gender: Male
  • Respect: +230
Re: Using SMD chips for IR occupancy detection
« Reply #11 on: February 13, 2018, 07:19:04 PM »
0
Already working on that idea. :D

A friend built a version of Geoff Bunza's detector this way:

http://www.spcoast.com/wiki/index.php/IO4-IR-Detector-GBunza