Comments on: Detecting trains with InfraRed + Arduino https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino Trains, computers, vintage, retro, model railways... the lot... Wed, 01 Feb 2023 02:57:06 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: InfraRed + Arduino revisited « modelrail.otenko https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-40749 Tue, 17 Jul 2018 04:38:32 +0000 http://modelrail.otenko.com/?p=580#comment-40749 […] See the previous blog post here […]

]]>
By: stevenh https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-26149 Fri, 07 Aug 2015 07:19:14 +0000 http://modelrail.otenko.com/?p=580#comment-26149 In reply to Kingsley.

Kingsley,

This information is invaluable for anyone wanting to implement what I really only lightly touched on. Your idea of sampling the values of light when on and off is perfect, as it’ll let you work out the ambiance… as long as the ambiance doesn’t change.

Do report back if shining from between the tracks works. I assume it would work fine, as long as the surrounding area was dark. You’d be monitoring the reflection of the vehicle chassis’ as they pass and any light shining down into the sensor would disrupt that.

Thanks for the input!

]]>
By: Kingsley https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-26148 Fri, 07 Aug 2015 07:04:49 +0000 http://modelrail.otenko.com/?p=580#comment-26148 These little IR sensors (I’ve mainly used the TCRT5000) are designed for detecting close things primarily. If you read the datasheet for the TCRT5000, it works best at 2mm!

While I’m yet to try the QRD1114, with the TCRT5000’s we’ve used, you need to do two things.

The first is to give the IR LED its maximum rated current. We ran these at 20mA, and at 60mA. At 20 mA they kind of worked on the bench within about 20 millimetres. At 60mA they’d work on the bench out to about 150mm. You can’t pull 60mA out an Arduino port. Use the arduino to drive a transistor (2N3904), which powers the IR LED.

The 2nd thing is to “flash” the IR LED, and take a reading both IR illuminated, and with only ambient illumination. Reading the IR sensor both times, you can take a delta. This is your “real” reading.

On our circuit it did take a couple of milliseconds (~10) for the IR light to “power up”. So we’d power up the LED, wait 10 milliseconds, read, power-down, wait 10 milliseconds, read again. We didn’t tune this though, maybe 3ms is enough. *shrug*.

I was thinking you could also embed them in the track, maybe “beaming” up between rails. yeah, that might work. Hmmm, dust might be a problem.

]]>
By: pete bradbury https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-24325 Sat, 20 Jun 2015 09:03:48 +0000 http://modelrail.otenko.com/?p=580#comment-24325 I’m using TCRT5000, which are combined emitter and receiver, and so far working well and have adjustable sensitivity on uk ebay at £0.99

http://www.ebay.co.uk/itm/Infrared-IR-Reflect-Photoelectric-Switch-Barrier-Line-Track-Sensor-TCRT5000-HC-/281648170253?pt=LH_DefaultDomain_3&hash=item41938a050d

]]>
By: Don Goodman-Wilson https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-39 Thu, 25 Feb 2010 16:03:09 +0000 http://modelrail.otenko.com/?p=580#comment-39 In reply to stevenh.

I have two of the Si1120 that I’d be happy to send to you to try out. I thought they were SSOP packages, which I am comfortable soldering, but they weren’t. They were free samples, so it’s no problem for me if you think you’d like to try them. You do have to build an enclosure for them though, is the rough part. And be comfortable soldering them. Email me if you’re interested.

]]>
By: stevenh https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-38 Thu, 25 Feb 2010 03:03:37 +0000 http://modelrail.otenko.com/?p=580#comment-38 In reply to Don Goodman-Wilson.

That first Si1120 looks interesting, but not too easy to find.
Otherwise the Sharp is the model I mentioned in the post. I’m just concerned of it’s size and it is a lot more expensive. I’ll give this another go in due course, with those Sharp detectors… Better things to attempt next :)

]]>
By: Don Goodman-Wilson https://modelrail.otenko.com/arduino/detecting-trains-with-infrared-arduino/comment-page-1#comment-37 Thu, 25 Feb 2010 02:57:22 +0000 http://modelrail.otenko.com/?p=580#comment-37 It’s in an ODFN package, which should rightly give you the shivers (although I bet there’s a SchmartBoard for it), but I have a couple of these and they look really promising:
http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1120.pdf
Or these?
http://www.sparkfun.com/commerce/product_info.php?products_id=242

]]>