Author Topic: Fun with infrared  (Read 481 times)

0 Members and 1 Guest are viewing this topic.

NtheBasement

  • Crew
  • *
  • Posts: 395
  • Respect: +489
    • Moving coal in N scale
Fun with infrared
« on: November 01, 2025, 10:08:30 AM »
+7
My flood loader required throwing a DPDT switch twice for each hopper to control the Tortoise that dumped and reloaded coal.  I decided to automate it, and as long as I was at it I rebuilt the concrete silo-ish loader to a cooler looking steel construction.  As always the project took longer than expected.

The automation approach was to use two infrared detectors, one to load the hopper when one detector was blocked by the front of the hopper and the second to reload the measurement bin when the gap before the next hopper approached the dumper chute. 

First stab was to control the Tortoise with an Azatrax D2 Dual IR detector but it was the wrong choice for my application.  The device is intended to control turnouts.  It prevents one detector from actuating if the other is still blocked so as to avoid throwing the turnout while a car is on it.  Turns out that means it won't load the second and subsequent hoppers.

Second shot was to use a single Azatrax D2T-2W detector but there was a flaw.  It triggered the reload over the gap between hoppers, but when the valves initially move loose coal comes down the chute and lands on the rails (bump bump as each truck passes over a granule) and couplers.  That caused a derail out of the dumper once when a coal granule somehow got caught between the rotary couplers' magnets.  Attempts to minimize the coal's stickiness failed.

Third time's the charm: three D2Ts driving an Azatrax non-latching MRAPR DPDT relay in series, so the Tortoise would dump if all three detectors are blocked (hopper under chute) and reload if any are not (gap somewhere near chute).  I could probably run trains faster if I used a fourth D2T to reload the bin sooner.

I learned a few interesting things about D2Ts:
  • I thought I could get away with a single emitter, but it turns out that each one only responds to the emitter that is wired to it.  I have no idea how Azatrax did that but it would keep them from interfering with each other in other applications.
    They are surprisingly precise.  When the emitter/detector pairs were set low they would switch on and off as the thin vertical support under the hopper ends passed by.
    They are sensitive.  When I blocked them with a .01" thick piece of Evergreen styrene two of the three behaved as if the styrene was transparent to infrared.  I have issues with IR reflecting off the white paint on the hopper ends and haven't avoided it 100%.
    You can hear a click with each on/off.
Pics of the loader and the Azatrax board in operation.  The two D2Ts on the left (oops, pic is upside down) are blocked.  Quick video of loading a unit train.
[ Guests cannot view attachments ] [ Guests cannot view attachments ]
Moving coal the old way: https://youtu.be/RWJVt4r_pgc
Moving coal the new way: https://youtu.be/UUk0kOaZliY

peteski

  • Crew
  • *
  • Posts: 35272
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6641
    • Coming (not so) soon...
Re: Fun with infrared
« Reply #1 on: November 01, 2025, 10:24:40 AM »
+1
If each IR pair only responds to its IR transmitter I suspect that the IR LED is actually pulsing at some specific frequency or in some sort of code and only its matching detector will respond.  Just a speculation.

Most digital cameras can pick up IR radiation through their lens (it will appear as faint white light).  See if you can point your smart phone or other camera at the IR transmitter and see it flashing?  Even if it shows steady light, it might be flashing too fast for human eye to notice.
« Last Edit: November 01, 2025, 10:28:24 AM by peteski »
. . . 42 . . .

NtheBasement

  • Crew
  • *
  • Posts: 395
  • Respect: +489
    • Moving coal in N scale
Re: Fun with infrared
« Reply #2 on: November 01, 2025, 11:14:44 AM »
0
I was thinking something similar, like it is sending a pulse through both the emitter and detector every few nanoseconds and checking the result, but I don't know how they avoid two units synced to the same time.  With the lights off you can see an orange glow from the emitters that seems constant.
Moving coal the old way: https://youtu.be/RWJVt4r_pgc
Moving coal the new way: https://youtu.be/UUk0kOaZliY

GGNInNScale

  • Crew
  • *
  • Posts: 198
  • Gender: Male
  • GGNinNScale
  • Respect: +173
Re: Fun with infrared
« Reply #3 on: November 01, 2025, 12:17:37 PM »
0
I have a lot of Azatrax stuff on the layout.  John does a really nice job, and many of the programs for control are available on his site.  Easy to modify for Arduino applications.

peteski

  • Crew
  • *
  • Posts: 35272
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6641
    • Coming (not so) soon...
Re: Fun with infrared
« Reply #4 on: November 02, 2025, 12:38:42 AM »
0
I was thinking something similar, like it is sending a pulse through both the emitter and detector every few nanoseconds and checking the result, but I don't know how they avoid two units synced to the same time.  With the lights off you can see an orange glow from the emitters that seems constant.

I would expect something of much higher frequency (like kHz) - way faster than the eye can see.  The pulses might actually have a digital address encoded in them (sort of like IR remote controls for TVs), and each detector unit is configured to only respond to that address.  Just a pure speculation on my part.
. . . 42 . . .

nkalanaga

  • Crew
  • *
  • Posts: 10576
  • Respect: +1755
Re: Fun with infrared
« Reply #5 on: November 02, 2025, 01:16:14 AM »
0
Nice job!  There's a similar loader south of Kenova (Docks Creek) on Norfolk Southern. 

I wouldn't worry about the clicks.  The real one isn't quiet when it's working.
N Kalanaga
Be well