Controlling model railroad signals with mirocontrollers

Thread Starter

CHARLES HALEY

Joined Jul 22, 2011
1
I am trying to use microcontroller technology to control my model railroad signals by processing input signals from (e.g.) sensors (current), switches, and other sources of input. I'd like the microcontroller to control the aspects (signal displays) based on the input it reads. The signals use LEDs to show aspects, with as many as six LEDs lighted at a time and six to eight different displays or aspects possible. The signals themselves are driven by 12 vdc.

Anybody out there have some suggestions/experience with this? I am learning about PARALLAX Basic Stamp controllers and PBASIC - the programming language they use. I have little programming experience and moderate electronics experience. :)

Respectfully,
Charles Haley
 

hgmjr

Joined Jan 28, 2005
9,027
If you take a look at the Arduino UNO at www.arduino.cc you will find in it a fairly inexpensive ready-to-program microcontroller using C-language. To program the board, all you need is a PC with USB port. The programming of the board is accomplished through the boot loader that is stored in the Arduino's micrcontroller.

If you need more IO, you can move up to the Arduino MEGA for under $50.

The beauty of the Arduino is that the hardware is ready to go. There are also tons of already written software that you can use in your application. You will probably need to buy a shield (the term arduino uses to refer to the daughter boards that plug onto the main board to provide special interface circuits. You will probably need shields that contain relays for your application.


hgmjr
 

ErnieM

Joined Apr 24, 2011
8,377
The Stamp is not a bad choice here. They are nice robust devices and easy to work with as their pins are .1" centers and thus nice to hand wire. They also have a version you can build some prototype things on. I worked with them a few years back when I got the "What is a Microcontroller" Kit from Radio Shack (which is currently on sale).

A Stamp has 16 pins for input and output. I don't believe it can do an analog to digital conversion but I am not sure.

To drive the LEDs you would just have to add a resistor and transistor to each output that is driving a LED.

Feel free to toss more of your ideas around here.
 
Top