<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFCC" text="#3333FF">
    <div class="moz-cite-prefix">Sounds like you are building the basics
      for an HO hump yard -- at least the club members at NRVMRRC would
      love to see the demonstration.  (Combine it with an auto-decoupler
      and push-and-shove moves and you're almost there).  They're in the
      process of building a new yard module for the club layout. 
      (you'll need to detect a modulated reflected signal from a barcode
      on each car)<br>
      <br>
      There was an article in last month's Circuit Cellar or Elektor
      magazine about using an IR LED as a photosensor.  The author also
      compared and contrasted phototransistors, LED's, photodiodes and
      photosensitive resisters as sensors.<br>
      <br>
      Basically you need to bias the LED, and amplify the result through
      a high-gain op amp.  Then a second-stage op amp uses a comparator
      to give you your detection signal (to a straight digital input). 
      Alternately you can use a separate ADC chip and read the analog
      samples from the first stage to detect beginning and end of an
      object.<br>
      <br>
      Give me a couple of days to dig up the article for you.<br>
      <br>
      On 10/07/2013 03:55 PM, Grawburg wrote:<br>
    </div>
    <blockquote cite="mid:4905541f6e9e91a7a08d533657448165@myglnc.com"
      type="cite">
      <pre wrap="">I'm working on a project to demonstrate how a basic conveyor system can separate
different size objects by using some HO train cars and electric turn-out switches.

The intention is to have a detector, either a visible light photocell arrangment using
LEDs or an infrared LED emitter/receiver.  The turn-out switch will be isolated from
the Pi with a relay.

I know the photocell will give me a basic ON-OFF (high-low), but what does the IR
LED give?  I will have a timer loop in my Python code that instructs the switch to remain
in the diverted position for x-seconds and then return to the default position.


Brian Grawburg
Wilson 

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="80">-- 
Scott G. Hall
Raleigh, NC, USA
<a class="moz-txt-link-abbreviated" href="mailto:ScottGHall1@GMail.Com">ScottGHall1@GMail.Com</a>
</pre>
  </body>
</html>