# Anyone here use a microcontroller on their layout?



## xrunner (Jul 29, 2011)

I'm thinking of getting a kit to play with. You use a simple programming language to control inputs and outputs. It has lots of possibilities including LED control, output voltage control , and 16 inputs you could use to detect things with additional sensors.

http://www.parallax.com/


----------



## gunrunnerjohn (Nov 10, 2010)

I've been looking into using either that kit or one of the PIC processors from Microchip Technology.

For multiple units, you can cobble something together with the PIC for a lot less money, the individual processors can go for less than a buck.


----------



## plandis (Oct 5, 2011)

if you have an old clunky junk PC laying around (like most ppl do), I understand there are low cost (2.00 per point) I/O boards you an get that drive from the parallel (printer) port. that way you have a decent platform for control. When I get time I would like to spend some time playing with this concept. Its a cheap PC based PLC.-perfect for trains!!


----------



## xrunner (Jul 29, 2011)

gunrunnerjohn said:


> I've been looking into using either that kit or one of the PIC processors from Microchip Technology.


I'm still trying to understand their entire product line and accessories. I'd like to know if that breadboard can be removed if you want to finalize the I/O you have set up. I'd like to have soldered connections.

The possibilities are pretty unlimited if you can integrate a device like that into a layout. I'm sure I'll be getting one to fool around with even if it amounts to a slight bit of "over-engineering". 



> For multiple units, you can cobble something together with the PIC for a lot less money, the individual processors can go for less than a buck.


OK I'll check it out.



plandis said:


> if you have an old clunky junk PC laying around (like most ppl do), I understand there are low cost (2.00 per point) I/O boards you an get that drive from the parallel (printer) port. that way you have a decent platform for control. When I get time I would like to spend some time playing with this concept. Its a cheap PC based PLC.-perfect for trains!!


When I was working for the aerospace industry I did a lot of data acquisition and I/O using PCs and a suite called LabVIEW. LabVIEW is a very cool way to program using diagrams instead of text.


----------



## plandis (Oct 5, 2011)

xrunner said:


> I'm still trying to understand their entire product line and accessories. I'd like to know if that breadboard can be removed if you want to finalize the I/O you have set up. I'd like to have soldered connections.
> 
> The possibilities are pretty unlimited if you can integrate a device like that into a layout. I'm sure I'll be getting one to fool around with even if it amounts to a slight bit of "over-engineering".
> 
> ...


but not cool enough for what you are wanting to do? As I recall, labVIEW is kinda spendy isn't it? -unless you got an obsolete license around that is!

In my industry (utilities) we use PCs for data acquisition and operator interface also but it (the PC) is not stable enough for control - in the plants that is. but I thought if a guy could find some low cost I/O and use a 90s vintage PC, or anything laying around, that would work great for signal/block automation on a train layout. of coarse when you start getting fancy with graphical operator interface, things tend to get to costly for the hobby builder!


----------



## gunrunnerjohn (Nov 10, 2010)

LabView is very spendy, not something I'd invest in for this purpose!


----------



## xrunner (Jul 29, 2011)

plandis said:


> but not cool enough for what you are wanting to do? As I recall, labVIEW is kinda spendy isn't it? -unless you got an obsolete license around that is!


Oh it's cool enough, but too costly



> In my industry (utilities) we use PCs for data acquisition and operator interface also but it (the PC) is not stable enough for control - in the plants that is. but I thought if a guy could find some low cost I/O and use a 90s vintage PC, or anything laying around, that would work great for signal/block automation on a train layout. of coarse when you start getting fancy with graphical operator interface, things tend to get to costly for the hobby builder!


Yes it's possible to use the parallel port or get a board. Labview had some built-in software modules to enable you to use the parallel port. I just haven't played with these microcontrollers so the model railroad is a good excuse to get one.


----------



## gunrunnerjohn (Nov 10, 2010)

I've used the parallel ports on PC's for input and output directly. My application was a video generator that had 32 output screens, they are on the floor of the NYSE and the Phila SE for overhead crowd displays. I used the parallel port to connect a small switch module so I could program the controller number with no keyboard. The program was contained on a EPROM based disk emulator, so you just set the switches and turned it on.

For output, you can only get a few MA from the parallel ports, but there are many I/O boards available to give you whatever you need.


----------



## TryingMeBest (Oct 27, 2011)

xrunner said:


> I'm still trying to understand their entire product line and accessories. I'd like to know if that breadboard can be removed if you want to finalize the I/O you have set up. I'd like to have soldered connections.


Similar to using a breadboard to test/design circuits, that board is for multiple uses, used for education.

A similar product is the picaxe. Again an educational basis but it has been used for many projects. I've recently built a 6 servo controller board to use on my RR with servo point control.

Basic Stamp and PicAxe use a basic language as opposed to pic microcontrollers. The upside is easy to learn, down side, the code has to be interpreted on the chip so they are a little slower in response.

Hope this helps

Angie


----------



## gunrunnerjohn (Nov 10, 2010)

Well, looking at the Basic Stamp product line, the smallest board is 2.5" x 1.5", kinda' large for most locomotive applications, certainly too big for HO, and even a bit clunky for many O locomotive applications.


----------



## TryingMeBest (Oct 27, 2011)

In practice you wouldn't use a Basic Stamp board, you'd design your own pcb or stripboard circuit to make it smaller. As with anything, the more you put on the circuit, the larger it gets so fitting it in a loco would be one of the considerations when designing and building.

Angie


----------



## T-Man (May 16, 2008)

A coworker of mine is into that stamp technology. That would be a whole new level for me. Just the electronics I do now, is another hobby.


----------



## gunrunnerjohn (Nov 10, 2010)

TryingMeBest said:


> In practice you wouldn't use a Basic Stamp board, you'd design your own pcb or stripboard circuit to make it smaller. As with anything, the more you put on the circuit, the larger it gets so fitting it in a loco would be one of the considerations when designing and building.
> 
> Angie


When you get into designing and laying out circuit boards, you get into a whole other dimension. I've worked in the industry all of my life, and very few folks here are going to go to the trouble of designing and building a custom circuit board for a one-off project. I have all the tools and know-how and I still find it tedious and time consuming for a single project. If there is a modular "project" board that fits the environment at hand, it becomes more practical.

I've never tried any of the hacked up basic languages for uP work, pretty much all of my work has been in assembler or C/C++ for my work.


----------

