Digital train system

Steve2381

Senior Member
Hey all.

Been Googling a while looking for details or a circuit diagram of a digital train controller.
Wondered if the good old Picaxe could come to the rescue in some kind of way?

Was basically thinking of some kind of PWM motor receiver controller that can read the overlaid signal on the 12v track. No idea how that is achieved.
This is so that I can operate and control different trains on the same track. Not talking a standard PWM motor driver. Needs to overlay the speed signal onto a constant voltage track.

Any ideas?
 

westaust55

Moderator
The first step might be to consider how many locos you might have on your layout and the frequency of sending data to each.

The frequency of repeating data needs to be reasonable in case a loco misses one packet while traveling across a dirty patch on the track that causes loss of a bit or 2.

How much data will there be in a packet for a single loco. You need address, speed, maybe light control and what about a check sum.

What about the control of any fixed accessories such as points, signals, lighting, etc.?

A train control system akin to DCC is not trivial.
Recall there was a thread on this forum about generating a DCC (type) signal to superimpose on the track supply.

I have a circuit for a DCC decoder (posted on this forum) but physical size would be way too big for installation within a loco - I use it for accessory decoders.
 
Last edited:

Circuit

Senior Member
...Any ideas?
Extracting the control signal from the 12v powerline is not a simple job. Much easier is to take the power from the track and then control the individual trains using infra-red. A simple 08M2 on board the locomotives could handle the IR receiver and the PWM motor control quite easily. The infra-red control needs boosting somewhat over the simple arrangement shown in PICAXE Manual III, but that is easily done. Much simpler than trying to extract digital serial over power lines. I have built two such locomotives for a friend; one of these had rechargeable cells built into the locomotive tender so that it was independent of track power - no more dirty track problems!
 

Steve2381

Senior Member
I knew it wasn't simple.
My layout is pretty expansive... its currently being built in my double garage loft. 6m x 4m.
Therefore, IR might not be quite so simple, unless I mount multiple IR transmitters.

I suppose the other option is low power rf? You can get TX/RX pairs on Ebay for peanuts.... Hmmm

I have 30 locos and about 54 turnouts (points), so I need quite a few channels.
I could however, wire the points directly to cut down channels.
Would like to have multiple channels to each loco for SFX, lights etc

I will continue my Googling....
 

Circuit

Senior Member
RF is another way - I have implemented this very successfully also.
You don't need multiple channels; you just need an address code. Send out the code to the desired device and program the remainder to ignore it and listen out for theirs.
But really with such a lovely and huge layout and stock resource of locos I think you would be best advised to stick with DCC - there is a huge range of equipment out there and it is proven and works well. If you want to build your own equipment then there is another possibility; use the Model Electronics Railway Group (MERG) CBUS system. There is a very comprehensive range of CBUS and DCC devices that are available as kits or you can use the circuit diagrams to build your own. Go to https://www.merg.org.uk/ for details. Download the free book on Model Railway Electronics - you will find a wealth of information there that will keep you going for ever.
 

Steve2381

Senior Member
Thanks Circuit.... excellent link. I had not found that.

Would like to build my own DCC... just for the challenge. 3d printing all my own buildings, bridges etc. Been experimenting with some cheap MP3 modules for the individual engine SFX.

On the RF front... yes, exactly what I was thinking, all on the same frequency, but individual codes. Maybe with certain bits set for loco lighting, SFX, etc.

I will read on further.
 

Circuit

Senior Member
MERG is excellent and the resources alone make it worth joining - the printed journal comes out four times a year and is wealth of useful information. In the technical reference sheet section (members only) you will find circuit diagrams of DCC kits that you could adapt to your own needs should you so wish.
 
Top