Flexible automation on analogue?

Hi all,

I'm trying to help my brother in law provide a small section of semi-automated activity on his fairly large (a loft-full) model railway layout.

He basically wants to have a length of single track that goes round the outside of his whole layout and ending with the main line plus siding (at each end). He would then like to have 3 trains in use, each taking it in turn going from one end to the empty 'slot' at the opposite end, possibly stopping at a station (or two) along the way.

He has already bought a ready made board that uses diodes and timers to do something similar but it seems a little crude so I was seeing if we could do better.

Now, he doesn't want to go DCC (for all sorts of reasons) and the intention is that I build him a analogue controller (using feedback) and with 'Inertia' that I can then interface with track sensors for controlling the run / brake / stop functions directly. What I would like to do though is add some flexibility for him via a 'computer' of some sort, possibly using one of the USB i/p - o/p boards you can buy, but don't really want to re-invent that particular wheel if there is something practical, functional, flexible and affordable already out there (that isn't DCC). ;-)

He wouldn't mind buying a suitable program (Win / Linux) as he has use of a spare laptop etc, and said i/o boards aren't that expensive, just neither of us are into programming, unless it's via some user friendly wizard type interface.

Anyway, that's the question so any pointers or ideas gratefully received please. ;-)

Cheers, T i m

Reply to
T i m
Loading thread data ...

Surely this kind of thing is exactly what Digital Control is supposed to make easy? What are the problems with going that route? I haven't had a layout since I sold my Hornby Dublo setup in 1964, but if I was starting again, DCC would surely be the way to go. But I accept that some folk like to use Photographic film and enlargers, and vinyl records, so fair enough, but it would be interesting to hear 'why' in this case.

Reply to

So I understand.

Apart from my BIL 'not wanting to' you mean? ;-)

Quite, and with the size of his current collection, 'starting again' simply isn't a option.

And I think you will find most of that is coming back again. ;-)

See, my Dad was an 'amateur photographer' and the interest for him was in the art of film-photography. When digital took over, when film cameras were no longer so easily available, when film was less easy to buy and photo-labs went out of business, he stopped taking pictures. Now, at the same time, I wasn't taking pictures with film because the whole process was too slow (other then via Polaroid's etc) because I didn't take 36 pictures of the scenery, I took one or two picture of something I was working on and only wanted an instant photographic record of that.

Same with vinyl records. I designed, built and ran a mobile disco (audio, cabinets and lighting) a good few years back and the use of it was really an aside to the building of it. However, in spite of the problem lugging a few hundred 7" singles, EP's and albums around, they were very much hand's-on in use. Now I could turn up with a couple of mp3 players or a notebook and do the same thing ... but there would be no fun in that for me.

So, BIL would just like something going on in the background on his layout whilst he does stuff in the foreground.

He would like to run any of his existing (and extensive) rolling stock and to be able to do so without any modification.

He would like to have said automation at a reasonable cost, something that is already available via a few diodes and a relay / timer board.

So, I would like to come up with a solution to his needs, not only because he would like such, but so he has suggested would several of his railway enthusiast friends.

Now, whilst I am no electronics design engineer or programmer, I can usually hook a few concepts together and do have some access to people who can do those 'other' things.

I am currently playing with an Arduino UNO and have a crude PWM emulator running (on a LED, rather than an electric model train).

From power up, the power slowly ramps up (simulating inertia), runs at pot adjustable 'max speed' until an IR detector is triggered (the entry to a station or the sidings), when the speed slowly ramps down to what should be a crawl. Once a second IR sensor is triggered (the far end of the platform or the buffers in the sidings), the power is cut completely. On the final program the power will be managed by the track logic routine or a second Arduino.

So, this route will be about a 20m of single line track with a siding at each end.

For the, the program will first test to see if there is a train at a pre-set marshaling point and if there is, it sets the route to an empty end and drives the train there.

Then it checks to see which 3 of the 4 ends are occupied and sets the destination end points to the empty end (mainline or siding) and then selects one of the two train / tracks at the local end, sets the points accordingly and drives that train there via speed controller routine / module. If I do have two Arduinos, the speed controller one will be able to be used manually if required (but still with speed via PWM, adjustable inertia and end limit overrides / interlocks).

Once the train has reached the destination, the program simply starts again. ;-)

All this will cost over the existing hardware is a couple of Arduinos (~5GBP delivered) some IR sensors (6 off min, similar price), a motor driver bridge, a PSU and a few other low cost bits. And that should be it for ever ... and he can run any of his rolling stock on it, as is. ;-)


Cheers, T i m

Reply to
T i m


Sounds reasonable to me! I have a full amateur photographer?s darkr oom's worth of kit for sale, if you're interested.............. And I rebuilt a Pioneer PL12D deck last year. Now, about that Polaroid film.......

Reply to


Too big a subject for an easy reply . There is equipment out there that will do it but a straight search of the WWW can get very confusing. Many of the suppliers of DCC kit will also be aware of analogue methods. A purchase of one of the Model Railway periodicals and perusing the adverts will show a few. One of the main suppliers is near Worcester and emailing them with the requirements would get some advice. ISTR that Maplin the electronics store(now nearer a toy shop) once did some simple self assembly kits for some functions like a shuttle track.


Reply to

And me, and why I'm trying to help my BIL with something. ;-)

Em no (thanks). ;-)

Dad passed away a couple of years ago and a bit back Mum was able to get rid of all his photographic equipment. We started with the Roliflex, the 4 off Canon F1 bodies with motordrives and 20 Canon lenses. I told a guy over the phone that I considered them to be in immaculate condition and he said he had heard that before and had found it was rarely the case (dented and scratched camera bodies, dust / fungus in the lenses etc). When we showed him Dads collection he had to concede it was indeed all in immaculate condition. In fact, some of is was actually unused and one F1 was still in it's plastic bag in it's polystyrene packing and cardboard box, complete with all paperwork and silica gel. ;-)

We found all the receipts, one F1, motordrive and typical lens was

studio spot / flashes took a bit of getting rid of and we still have some 'bits' left over, like a load of Cokin filters, brand new camera bags, foldable spot / reflectors etc. I'm sure most of it would go on eBay ...

I still have that box of disco singles in my loft, although I doubt they would be playable today ... and two new 'disco desks' in the packing ... somewhere ...


It's funny, it seems that for some of us 'progress' means we don't do what we liked doing any more. eg. I used to race RC electric cars (from the very early days and I was even a 'sponsored driver' at one point) and building the kit was very much part of the deal. When you did so you learned how it all went together and more importantly (when racing), how to fix it quickly between races. Now days it's rare to find such a vehicle that isn't 'Ready-To-Run'.

Now, I guess that most of that is actually supplying demand, people don't want to be bothered building up the stuff, they just want to go out and use it, just the same as I guess that most model trains are being run as they came, rather than being 'weathered' and further detailed etc?

As I get older and my 'Roundtuit' list seems to be getting longer, I too will often 'just buy something' rather than build, assuming such was possible but I'd have to admit I don't generally get the same out of it as when I built (or rebuilt even) it myself.

Cheers, T i m

Reply to
T i m

Have you thought of approaching MERG (Model Electronics Railway Group). They have a lot of expertise on this sort of thing one possibility would be the "MERG Shuttle Control System" which has had many extension added from just the simple system developed by members a few years ago:

formatting link

Only members can buy the kits and access archives but a year's subs don't cost very much and well worth it.

formatting link


Reply to
Alan Dawes

Well, possibly, depending on what I / we have already got covered. ;-)

Noted, I'll get a copy (to use over and above all the searches etc).


(agreed). ;-(

And they still do similar things and we (daughter and I) have built some of them.

What I was trying to do by asking here is trying to avoid re-inventing the wheel. However, it's doesn't seem that there are an abundance of ready made or suitable wheels in this size, or not that I have found as yet.

I already have (or will have) all the electronic hardware I need, from the Arduino programmable controller, to some IR sensors to the motor driving bridge to now the test track and points with 'motors'.

What I don't have is the right programming skills (because I don't have a 'programmers brain') to pull it all together. ;-(

And from another POV ... I feel you can sometimes get drawn in to doing things the way it always has been done, or the way everyone now does it, because no one ever tries anything new or different.

A good example of that was when I used to race full sized 'electric vehicles'. The carpenters had beautifully crafted (wooden) machines but often the electrics and mechanics were a mess. The electrical engineers would have some very sophisticated controls, if only the chassis would last the race. I was a jack of all trades so used the key components from two suitable mopeds, welded together using 1" square steel box section that was my old bench from work, with some heavy duty electicals, bicycle gearing and 'Datacomms Support Tech' level electronics. I didn't copy anyone but put together what I could from what I had in a way that I knew that I could. It won me one race and an IEEE award . ;-)

I didn't invent any of the 'wheels' but I put them together in an inventive and possibly original way.

So my proposed solution for this semi automated railway is actually pretty simple. The function is no more than replicating (in a stand-off scale pov) no more than the real trains would do themselves. They would be parked in sidings and take it in turns running up and down a single line track. All of that is very easy to understand and equally easy to control in a model sense, as long as you have the means to do so from the 'logic' pov. An Arduino UNO and a good programmer would have it running in an afternoon I'm sure. ;-)

Single stretch of track with a siding at each end.

(Startup routine)

Check to see if the is a train at the marshaling point (IR sensor) and if so, check which ends of the track are free (two out of four will be, one at each end). Drive the train to occupy an empty end (through IR sensors to set speeds and a final IR sensor for dead stop).

(Main routine)

Check to see what ends are occupied (3 of 4 will be).

Set the points toward the (one) empty end, at the empty end.

Select one of the two trains at the full end and set the points in its favour (random or alternate).

Drive the train from one end to the empty end, using IR sensors and computer generated inertia to manage the speed changes.

Rinse and repeat. ;-)

Cheers, T i m

Reply to
T i m

I haven't Alan as I'd not heard of them (till now). ;-)

WOW. That at first scan looks exactly like what we would like to do and nearly the same way I had conjured up in my head for doing it! ;-)

"A pre-programmed PIC micro controller controls all aspects of shuttle operation. The PIC program implements fixed sequence operations whereby train movements follow set patterns defined in the form of look-up tables stored in the PIC memory. These tables can be added to, or modified at will to implement almost any movement sequence the user can devise.

Power to the track is derived using a standard variable voltage regulator arrangement, with speed variation implemented by the PIC using Pulse Width Modulation (PWM).

The remaining four manual controls affect other aspects of train

the PIC as analogue voltages which set the rates of operation of these features. Typically, clockwise rotation of the control increases the

acceleration & deceleration times and longer dwell time."

And figure 3 as shown on your link is also exactly what we had in mind. ;-)

Thanks very much for that Alan. I have already passed the link onto my BIL and will look into joining as their meetings are within fairly easy reach of us. ;-)

Cheers again, T i m

Reply to
T i m

I've not been to meetings recently as other activities have taken my time but when I did I always found them very interesting and the members very friendly and helpful. There are also MERG local area groups who hold activities.

As they attend quite a few shows it always surprises me how many model railway enthusiasts haven't heard of them or think that it will be too complicated for them to understand.


Reply to
Alan Dawes

I hope to go with BIL to a club / layout (he helped setup *years* ago) to see how they are doing their automated stuff. I think it's more basic that what I was considering but it will still be interesting for me to see how it can be implemented in the real world.

Ok ta.

I think there can be different levels of appreciation for this sort of thing, ranging from 'it must be magic' to your full-blown electronics design engineer (or these days, that plus software programmer).

Like the use of diodes on the track and the auto-shuttle solutions. I'm sure there are many who have installed such who don't know *how* they work (or care about 'conventional current' electron (hole?) flow) but if it all works, they don't really need 'to know' do they?

BIL is ok with 'electricity' but isn't at all up on 'electronics' or 'programming'. I'm ok with most simple electronics (especially cobbling existing modules together) but not particularly good creating solutions that include logic and I'm certainly (therefore?) no programmer.

BIL has put together the test track for me and it's currently round at my mates who is also interested in model railway stuff and this particular sort of project.

Last night I finished the prototype analogue speed controller which has step-adjustable inertia (capacitors on a BCD switch) and two 'speed' controls, one for the std running and one for the marshaling type speed. There is also a straight fwd/rev switch but all these switchable features are designed to be externally controllable (mix of relays and transistors (probably optically isolated)) if required. That way I would then only have to sort the track logic and if I was to stay with straight electronics and a bunch of IR sensors and NE555 timers. ;-)

So, I'm hoping to pop round there today, solder power leads to the tracks and run a test track around the outer loop to both test the controller / inertia and measure the typical current drain and ideal PSU voltage for this sort of solution (I'm thinking it might be around

15V and .5A). I can do this easily via the use of a bench PSU with readouts for voltage and current.

Looking at the existing model railway automation market (and ignoring DCC etc) it seems that much of it is already out there and often available via modules but 1) the cost of the modules can soon add up and 2) you can only do with them what they can do (either individually or when grouped). That's not to say that you can't do everything that one could realistically want, but then how easy would it be to make changes?

Whist I don't have the time, interest or skills to re-invent the wheel, I would like to think that because I'm not already familiar with all this, I might just come up with a unique solution [1] (for good or bad of course). ;-)

Cheers, T i m

[1] Looking that the sort of thing you brought to my attention re the MERG, it may well be what I had already conjured up in my head may well be pretty close to how it is being done by many in any case. Great minds? Nah, just a logical conclusion / solution to this problem *these days*. ;-)
Reply to
T i m

In message , T i m writes

With the MERG stuff, you don't have to be an electronics bod, all you have to be able to do is to follow their instructions (much the same as with a wagon kit), you shouldn't need any tools that you don't already have (soldering iron, small wire cutters, snipe nosed pliers and a multi meter). If you want to take it further than that, you can, but you don't have to.


Reply to

No, sorry, I was really just thinking out loud re what I might be able to do that ordinarily non- 'electronics bods' might not (like my BIL etc). ;-)

I was also talking of the dilemma I'm in re knowing what I want to do and having a reasonably good idea how I could do it, just for the missing piece, the 'programming' skills.

So, with that in mind then, is there an existing (non DCC) and intelligent solution that would say check which (of the 4) end-points are occupied and randomly select (one of the three) available trains to run and using inertia appropriately? I'm not suggesting there isn't, I'm asking if you can confirm that there is (as I'm not familiar with all the terms and modules etc)?

What if you wanted a station in the middle, or a turn-round loop (where the engine can go back past the carriages and hook itself back on the front)? If those things are easily available, would you be able to add them onto whatever you needed initially do you think?

I'm just trying to get a feel for what sort of things are available here. ;-)

Cheers, T i m

Reply to
T i m

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.