<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>IR sensor: all that glitters is not gold</title><link>/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><description>&amp;quot;All that glitters is not gold&amp;quot; is a concise statement stating that not everything that looks precious or true turns out to be so. I can say that about IR sensor only from experience.
I pride myself on due-diligence before using a technolog...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Mon, 01 Jan 2024 22:35:33 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>colporteur</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-64a32668-ff8f-41a6-93b5-a2fdf0f44c0f/IR_5F00_sensors.png" /&gt;&lt;/p&gt;
&lt;p&gt;Update. I have been working with IR sensors from DFRobot (dfrobot.com) on another project and made an interesting discovery. Two of the three sensors shown in the image are not impacted by IR noise. SEN0523 &amp;amp; SENO556 outputs do not change even when a 1500 watt halogen is shined directly on the sensor, I also used an IR noisy LED desk lap and it did not cause a problem. SEN0503 was impacted by both of the IR noise sources.&lt;/p&gt;
&lt;p&gt;SEN0523 is a break beam sensor and SEN0556 is reflective unit. They cost more than the cheap IR units I have used but they actually work in high IR noise environment.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Fri, 14 Jul 2023 16:17:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>scottiebabe</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Very interesting, thanks for sharing. I can tell you what is gold, my scopemeter + 9V topper...&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-64a32668-ff8f-41a6-93b5-a2fdf0f44c0f/pastedimage1689351300093v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In this case it is modulated IR at 36.2 kHz... interesting&lt;/p&gt;
&lt;p&gt;&lt;img src="/cfs-file/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-64a32668-ff8f-41a6-93b5-a2fdf0f44c0f/HDS2XX.BMP" alt=" " /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 18:59:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Having worked with IR sensors for about five decades, what you see is not a surprise.&lt;/p&gt;
&lt;p&gt;You night check to see if the IR sensor is AC or DC coupled.&lt;/p&gt;
&lt;p&gt;Background lighting can really distract a DC coupled circuit.&lt;/p&gt;
&lt;p&gt;I remember an initial laser guided bomb circuit that was accidentally designed with a DC coupled sensor.&lt;/p&gt;
&lt;p&gt;It made a great sun tracker, but failed its design requirement.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 13:06:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>colporteur</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Thanks for the response folks.&lt;/p&gt;
&lt;p&gt;The IR sensor solution is working in the development layout. Two model trains alternate switching onto a loop of track controlled by IR sensor readings feeding a Arduino Mega. I&amp;#39;ve had model railroaders go through the exercise of manually switching the trains and then flip a switch to have the whole sequence managed by a microcontroller. They are impressed.&lt;/p&gt;
&lt;p&gt;When the design was taken to a different location it failed. The amount of IR noise between the two environments made the sensor unreliable. This is the point in the project I discovered these sensors have limitations. Oh how I wish I had of discovered that weakness during development.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t want to diminish any ones suggestions by responding with &amp;quot;I&amp;#39;ve tried that, it can&amp;#39;t or doesn&amp;#39;t work&amp;quot;.&amp;nbsp;Lets just say IR limitation are known. Unfortunately before now, not by me:( This company recognized the issues and used modulation to minimize the&amp;nbsp;problems.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-64a32668-ff8f-41a6-93b5-a2fdf0f44c0f/Laser_2D00_Sensor_5F00_l.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Principle: The emitting part of the laser sensor is a 180KHz oscillator emitted by an oscillator tube, amplified by a triode, the laser tube emits light, and the receiving part receives the returned light intensity from a matching 180KHz receiver tube. Since the laser sensor uses modulation processing, the receiving tube can only accept the reflected light of the same frequency, so the influence of visible light on the reflected laser can be effectively prevented.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;These units are five times more per unit than an IR sensor.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This post was&amp;nbsp;just me licking my wounds after discovering what I thought was a working solution,(because it worked) had weaknesses that I wasn&amp;#39;t fully aware of. If someone is considering these IR sensor modules in a project, just be aware of some constraints. Who knew turning on a halogen light under the layout to provide some light to work with, flooded the sensors and made them unpredictable.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m currently exploring break-beam sensors using laser light as a solution. It is not ideal but does work reliably. Each model railroad layout environment have their own caveats that limit options. Getting it to work and getting it to work within the clients requirements has its challenges.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 07:25:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>Spain_mtg</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello colporteur,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;My experience with proximity sensors, at the beginning was the same, I made a piggy bank with coin detection by proximity sensors, the solution I found was to make a cardboard tube of about 2 cm. and put inside the detector, this eliminates many interference.&lt;br /&gt;Seeing your project, you can try to install the sensor lower, so that the receiver and the emitter stay inside the hole, when the train passes the light will be reflected in the low of the train and will arrive at the receiver, you will remove ambient noise.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 02:00:16 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>Gough Lui</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;IR is not all bad - given the right coding/modulation, it&amp;#39;s easy to tell noise from signal.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been using ST Flightsense IR ToF sensors for a long time to do measurements of distance/proximity/presence-absence with few difficulties except for being swamped with direct sun when outside. A bit of a complex solution - but you need some complexity to create robustness ...&lt;/p&gt;
&lt;p&gt;- Gough&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 00:56:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>shabaz</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;(Can&amp;#39;t edit).&lt;/p&gt;
&lt;p&gt;These would work very well, and are cheap:&lt;/p&gt;
&lt;p&gt;&lt;img height="384" src="/resized-image/__size/1484x768/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-64a32668-ff8f-41a6-93b5-a2fdf0f44c0f/pastedimage1689209630711v1.png" width="741" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Two of the pins are used for the power, and one pin goes high in the absence of light, and low in the presence of light.&lt;/p&gt;
&lt;p&gt;It needs a separate IR LED, which you&amp;#39;d have to connect to another pin on the Arduino, and set to 38kHz output (i.e. use a timer or PWM function).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 00:43:09 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;You could also try creating a hood (shield) around the LED/sensor area, to try to limit ambient light entry, and perhaps change the position to try to combat the ambient light further. But ultimately, it&amp;#39;s just trying to patch the problem, that a basic light threshold sensor can&amp;#39;t tell the difference much between the LED, and any external light.&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IR sensor: all that glitters is not gold</title><link>https://community.element14.com/technologies/sensor-technology/b/blog/posts/ir-sensor-all-that-glitters-is-not-gold</link><pubDate>Thu, 13 Jul 2023 00:39:21 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:64a32668-ff8f-41a6-93b5-a2fdf0f44c0f</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi Sean,&lt;/p&gt;
&lt;p&gt;That sensor is very basic, just relying on light threshold, so&amp;nbsp;if the ambient light level changes much, then it affects the output.&lt;/p&gt;
&lt;p&gt;A different type of system is like that used in TV remote controls, where the LED is modulated, and the sensor has a capacitor to block the voltage from the ambient light, amplifying only the modulation. It is more expensive though. An example is here:&amp;nbsp;&lt;a id="" href="https://www.pololu.com/product/2578"&gt;https://www.pololu.com/product/2578&lt;/a&gt;&amp;nbsp;and it could be worth experimenting with since it&amp;#39;s likely one of the quickest ways to get results without changing much, since it&amp;#39;s a similar detection system to what you&amp;#39;re already using.&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t find a similar board on AliExpress, but I didn&amp;#39;t look long.&lt;/p&gt;
&lt;p&gt;Another method possibly worth considering (and would be cheaper), is using a hall effect sensor (magnetic sensor) if the train owners can be persuaded to attach a magnet and if it&amp;#39;s possible to mount the hall sensor closely. It would need&amp;nbsp;experimentation to see if it is feasible, and your code would likely need to change, since the hall sensor would only trigger very briefly, whereas your light sensor triggers for the whole length of the train presumably.&lt;/p&gt;
&lt;p&gt;Yet another is to use a microswitch, since that needs very little force from the train to trigger it. However some precision is needed to mount the microswitch and I don&amp;#39;t know if that is practical or not for model train use-case, and again the code may need changes.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=26482&amp;AppID=17&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>