Skip to main content

Reply to "The RR Track Signal Control Board Project"

gunrunnerjohn posted:
MJCAT posted:
So for about $9 ($3 for the nano, $1.50 for the breakout board, $4.50 for 3 logical level mosfets )  you can add a really prototypical crossing operation to existing crossing signals/gates on your layout, and each $9 investment would allow you to control 3 different crossings.

Hmm, can you explain the three different crossings for $9 for all three?  Don't you need more sensing at least?

Ok, you can do TWO crossings per nano.  As I was writing up the below, I caught the fact that I had gotten my arduino boards mixed up on the number of analog pins they have.  The nano has 8 analog pins.  We need 3 per crossing. 

For the insulate rail detection, I use 2 input pins per detection block on the nano; a digitial pin and an analog pin.  

The digital pin is configured as Input_Pullup, which causes the arduino to attach the pin to +5v through a 50K resistor internally. We attach the detection rail to this pin, and also to the analog pin. The digital pin is doing nothing other than allowing us to connect to +5v through a pullup resistor internally, so we dont need to add these components externally.  We can then perform an ADC read on the analog pin.  When nothing is on the detection rail, thebanalog pin would have see the full +5v, and would report back a value of nearly 1023.  If something brings the detection rail down to ground, the digital pin voltage would drop to near zero, and the ADC value would drop. Placing your fingers across the ground and detection rail drops the voltage enough to be detected.  (Digital value drops to just below 1000. )

 

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×