• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Model Train Mod

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.


Sep 17, 2002
Hey, ever since i finished the parallel port interface, i am interfacing it to my model trains, i got a circuit that will give 64 bits from an 8 bit parralellel port, i finished that, now i need to know if anyone would know any way of contoling speeds of a dc motor with voltages from 0volts to 35volts , i want to have at least 10 positions, more would be nice but i am limited to 64 bits! I got a digital pot from dallas semiconductors to play with (http://pdfserv.maxim-ic.com/arpdf/2748.pdf) , but i played a little to much and melted the chip and my breadboard, boy do those chips get HOT i have a blister on my finger from it! well if anyone knows any circuits or anyways, that doesNot use a relay for each speed, post it here!!!!!!!!!!!
basically all i'm trying to do is control train speeds with my computers parallel port
I've never tried anything like this, but it would make sense that you could pulse one of the outputs to control the motor speed. Just like a dinner switch works. more pulses, the morepower the motor gets. Since its just a signal voltage out of the parallel port, you would need some power transistors, or maybe an SCR. there's a whole lot about controlling things with the parallel port though, try doing a search about it in yahoo or something.
Like i said, i did get these nifty digital pots from Dallas semiconductors, but they couldn't hold the power of the train!
i meant just using one output and pulsing that. you should be able to increase the wattage a pot can handle with a good transistor. probably want to watch that stuff to make sure it didn't get to hot too. especially if you're using something bigger like O gauge
I'm only using ho, so thats pretty small, and thanks for the transistor idea, i was going radio shack tonight to get some, so i'll look for some for that too.
I just found a site that talks about what you want to do. It goes pretty in depth, but it seems to have the right stuff.

This is the whole thing and all its controllers.


This is the part on controlling the motors.


It looks like some pretty fun stuff. I wouldn't mind doing some of this stuff myself, but i don't have the space to set up the train. I have a bunch of cars and track though. Its neat how cheaply you can built some of the circuits though.
hey thanks for the site, he talks a lot about controlling the motors, but really doesn't give any schematics or anything, i was just wondering though if you know if there is a transistor that works like a dimmer, when more power is applied to the base, it lets more power from the emiter to the collector.
I'm not really good with transistors, so i can't make any schematics, but a regular power transistor should do that. Thats sort of how they work. Here's a site that gets into making a basic circuit that would do that sort of stuff. It gets into it pretty deep, but looks simple.


I was looking at the other site again, and i didn't see much in the way of circuit diagrams either. Soo close the the right thing :)
My 2 cents

Please remember, everything I know pertains to VERY LARGE Components. eg. Electric forklifts

A transistor is nothing more than a swich ( on / off)

On an electric forklift, you have a speed pot (throttle) running at a very small voltage/amperage, this controlls 2 things.

1) as soon as you depress the throttle any at all it opens a transistor energizing an amplifier

2) the reading of the speed pot is also sent to the amplifier circuit to be amplified and the passed through a set of capacitors (2 farad) to the motors

this could be shrunk down in size to control your model trains.

the only part of the circuit I'm not sure about would be building an amplifier.

the amplifier basically takes a signal and amplifies it to a usable power, I know radio shak carried a book on op-amp circuits that might help. The amplifier is supplied a voltage equal to max voltage for the trains.

Lets say max output of your paralell port is 5v

You have 10 positions
amp in | Amp out |
| |
0 v | 0v |
.5v | 3.5v |
1.0v | 7.0v |
1.5v | 10.5v |
2v | 14v |
2.5v | 17.5v |

I'm sure you see the pattern here.

by building the amp circuit the amperage draw on your paralell port would be minimal 5-10 ma. but the output would be limited by the components and powersupply you use in the amp.

Basically similar to a car amplifier.

Wouldn't be too expensive to build, and if you really worked at it, could be a $ maker.

I know a few computer enthusiasts that love model trains too.

PM me if I have confused you.
and sorry for the long post
The amplifier would basicially be a transistor. Transistors do allow variable voltage, not just on off. The problem is that when they do that they put off a lot of heat. Which is why amps have such big heatsinks. if you ever take one apart, you'll find the transistors are whats connected to the heatsink. Just a bit of extra info
After doing some more reading, yes, the amp does consist of multiple transistors.

Unfortunately, until just now the only transistors I've really dealt with were standard NPN, PNP ON/OFF ones.

I guess we all learn something new every day.

The more I look into this, the easier it looks to build.
hey thanks for all that info it really helped, if you have any more info and don't want to post it here just simply feel free to email me too, and DeRose306 what do you mean it could be a money maker, because if it makes money, i want to know how!

You talked about using a pot chip, but it melted when used to control the motor. How about using some of the circuits you can find about fan control and exchange the normal pot for the chip pot? So LPT->chip pot->LM317T circuit or similar. That should be the easy way of doing it..

I'm working om some parallell port interfacing myself what circuit/software are you using?
This is the cicuit i am using for multiplexing,

and for software, i built a program in Visual Basic to do the software part
Would you consider sharing your code?

I have some ideas but not much time learning to code as well.. I can probably find a compiler somewhere.. Is the software you made commandline or GUI based?

I have buffers, optocouplers, flip/flops and multiplexers around just waiting for a hot soldering iron :)
Sure i'll share my code, but its in Visual Basic, you need visual basic to run it, nothing else will work but visual basic, so if you still want it, just post another reply here, and i'll upload it somewhere for you to download.
That would be great!

I can get access to Visual Basic on the computer labs on my college to get i modified and compiled, or even get a good discount if I decide to buy it..

I had a course in Java a couple of years ago so I guess I should be able to figure out the code..