Pages: [1]   Go Down
Author Topic: Arduino and old trains  (Read 1353 times)
0 Members and 1 Guest are viewing this topic.
Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1829
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My wife recently set up a U-haul storage shed, and I spent yesterday moving some stuff to the shed, including my old train set (American Flyer S gauge) from the 1960's, and my father's set (Lionel O gauge) from the 1940's.

As I was doing the move, I thought maybe it is time to get the trains out of storage and run them again for Christmas.  The trains need some TLC (one wire flaked off as I was moving the train to the plastic boxes), and I'm not sure I would trust the transformer from the 1960's, and replace it with a more modern one, perhaps under Arduino control.  I didn't record the details before packing it away, but a quick check on ebay transformers for sale right now shows voltage is in the 15 volt range (varying between 7 and 15 volts for speed control), watts are in the 75-300 watt range, and amps are around 6.

I bought an Adafruit motor shield recently and I'm waiting delivery on it.  The Motor Shield can handle up to 25 volts, but only 1.2 amps.  So I assume, I would not be able to use this particular shield.  If I wanted to control the train with the Arduino, what would I be looking at for control?

I assume I would need a separate transformer that converts the AC to 15 volts, 6 amps, and then the Arduino would control the actual power to the train.  Is this correct?  If so, what are examples of units that can handle this?

Or are there combined units, that have an AC plug on one end, and DC plug on on the other end, and a 5V/G/S terminal to hook up to a PWM pin that Arduino controls how much volts, amps, etc. are emitted directly?

Thanks in advance.
« Last Edit: June 17, 2012, 09:35:02 am by MichaelMeissner » Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1015
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to see a lot more links and more numbers:
U-Haul : http://www.uhaul.com/Storage/
Americal Flyer on wikipedia : http://en.wikipedia.org/wiki/American_Flyer
The Lionel website about Gauge : http://www.lionel.com/forthehobbyist/aboutgauge/

Can you get more information:
DC or AC ? If it is DC, is reverse voltage used to drive backward ?
Is is regulated DC, or unregulated DC.
Can you measure the actual current of a train?
Does a train use a few amps ? That's a lot.

The Adafruit Motor Shield is for 0.6A (1.2A peak). That's probably not enough for you.

I think that both trains use AC motors. Sometimes an extra DC voltage is used for whistles and so. If a DC voltage for whistles is not used, both engines will run without problem on DC (either regulated or unregulated).
I still don't understand how the direction is changed. Is that changed with a switch on the transformer ? What does that switch do ?

This is for controlling (normal modern) trains: http://modelrail.otenko.com/arduino/controlling-your-trains-with-an-arduino
This is a simple circuit I like, just a transistor for PWM and a relay to reverse direction: http://pcbo.dcs.aber.ac.uk/blog/2008/01/29/arduino-model-railway-control/
This uses a mosfet for high currents: http://www.picotech.com/applications/pwm_drivers/#chap7

May I suggest not to change the trains for other motors or so. I think they better can be kept original.

Can someone give some links to websites for controlling these trains ?
« Last Edit: June 17, 2012, 02:34:04 pm by Krodal » Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1829
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to see a lot more links and more numbers:
U-Haul : http://www.uhaul.com/Storage/

Basically I'm moving stuff we only use occasionally (Christmas, Halloween, or in the case of the trains, stuff we haven't used in years) to a U-haul shed that we rent by the month.  However, it means that I can't get to the stuff immediately, but instead have to drive 10 minutes to the shed, and do it during their working hours.

I was dropping more stuff off yesterday, and I had about 3 minutes to snap some pictures before they closed for the day.  I only saw the transformer for the Lionel (I suspect I used them interchangeably when I had the trains up).  The transformer is faded with age, and the pictures aren't that good.


The 4 terminals are labeled as:

  • Terminal 1 to 2, 6 volts
  • Terminal 1 to 3, 12 volts
  • Terminal 3 to 4, 5 to 10 volts in 1 volt steps
  • Terminal 2 to 4, 11 to 16 volts in 1 volt steps
  • Terminal 1 to 4, 17 to 22 volts in 1 volt steps

Then underneath it says type W transformer, 75 watts, 115 volts, 60 cycles A.C. Made in the USA, Lionel Corporation, New York.  Since the Lionel train was my fathers, and he was born in 1931, I would guess it was made pre-World War II, so maybe late 1930's or 1940-1941.

The trains have sat for about 20 years in our house, and so I need to get them looked at first.  I'll be taking the two engines to a local train specialist for an assessment.  As I was putting one of the trains away in the box, one wire came off.  But with 20 years of neglect, it probably needs other things than just resoldering the wire.

Ultimately, I would like have them running by fall.  When I was growing up, we had the trains around the Christmas tree, and since we are driving to my father's for Christmas, I thought I would like to set them for the family.  Even if I don't have the Arduino running the train, I might want to have it do some other electronics.

If I could run it via the Arduino, I would put the boards, etc. on my never ending to buy lists.  I'm not sure I need a full motor driver shield, just something to produce 1-16 volts of DC current under program control with the appropriate wattage (75).  I didn't see anything for the amps.

Americal Flyer on wikipedia : http://en.wikipedia.org/wiki/American_Flyer

Yep, the set I have was made when it was owned by A. C. Gilbert.  According to my father, it had been used the year before by a department store for their window display, and the window dresser sang in the church choir my father was the minister at, and when the store did another display the next year, gave the set to my father for me.

The Lionel website about Gauge : http://www.lionel.com/forthehobbyist/aboutgauge/

I think it was O-27 gauge, but it may have been O gauge.

Can you get more information:
DC or AC ? If it is DC, is reverse voltage used to drive backward ?

I had assumed it was DC, but perhaps it was AC.  More things to check. 

The Lionel transformer did not have an option for going backwards.  I didn't notice the American Flyer transformer.  I don't have a multimeter yet, so I haven't measured the voltage that the transformer produces if any.  I suspect I will probably need to replace them.

Is is regulated DC, or unregulated DC.

Given the age of the gear, I would guess that it is not regulated.

Can you measure the actual current of a train?

As I said, I'm not sure the trains are functional at this point.  So, I need to test both the train and the transformer, and fix or replace as needed.  It will be awhile yet, but I was hoping somebody else had already done it, and knew the voltages, etc.

Does a train use a few amps ? That's a lot.

The Adafruit Motor Shield is for 0.6A (1.2A peak). That's probably not enough for you.

I think that both trains use AC motors. Sometimes an extra DC voltage is used for whistles and so. If a DC voltage for whistles is not used, both engines will run without problem on DC (either regulated or unregulated).
I still don't understand how the direction is changed. Is that changed with a switch on the transformer ? What does that switch do ?

I'm not sure back in the day we had the trains running in reverse, but I would suspect that if I had a newer transformer, it probably would work.

This is for controlling (normal modern) trains: http://modelrail.otenko.com/arduino/controlling-your-trains-with-an-arduino
This is a simple circuit I like, just a transistor for PWM and a relay to reverse direction: http://pcbo.dcs.aber.ac.uk/blog/2008/01/29/arduino-model-railway-control/
This uses a mosfet for high currents: http://www.picotech.com/applications/pwm_drivers/#chap7

May I suggest not to change the trains for other motors or so. I think they better can be kept original.

Can someone give some links to websites for controlling these trains ?
Many thanks for the links.  Yes, I want to keep the motors as close to original as possible, but the transformers I can see replacing with more modern stuff.
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1015
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the photos.

The normal shields can't handle that kind of current.
You need to make something yourself with a transistor or mosfet.
But you don't need a variable voltage, since the Arduino has PWM.
If you use a DC voltage of about 15V, the PWM signal can be used to control the speed.
An AC train also runs on DC. So that's no problem.

The Lionel transformer is indeed AC. At that time, a high current diode didn't even exist.
The handle on the transformer seems to select points with different voltages for the speed.

You could use a 1:1 mains isolation transformer for safety, to try the old transformer. If you get the trains running, you can always try an Arduino with PWM.

I was also hoping someone else would help with this very interesting project.
Have you thought about making a webpage for this project ?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would +1 a webpage for this. My Dad has a train set that I would like to inherit that has a similar controller for speed. I think the last time he pulled it out, he tried to run it, but got electrocuted, so he packed it up and hasn't run it since.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1829
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Once I get into the project, I will try to create a web site.  Though I do have several different projects on the horizon.

I figured a single PWM control could control the voltage level, though obviously you have to do it through protections (transitor/mosfet/etc.) and step-up transformers so I don't burn out either Arduino or the train.  The Lionel transformer has discrete values at the 1 volt level, while the newer American Flyer transformer had a potentiometer so you could control the speed with finer grain of control.  Basically, you learned the max speed the train would go before it would go off the tracks.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, Michael. I wonder if you've had any more time to work on this project since the last post?

I came across this thread while doing some preliminary research for a project. We have a yearly AC Gilbert/American Flyer display running November-December, and this year we were hoping to modernize our trains with an Arduino controller. It seems not a lot of people have done this! I am very interested in hearing what you may have learned, and maybe reviving this thread if you're still working. Hope to hear from you!
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It sounds like Michael needs a variable voltage power supply producing 0 to 22V @ up to 3.5A, or a pwm motor controller driven from about 24V and with 3.5A output capacity. The power supply or driver should be current limited, to protect against short circuits between the rails.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: [1]   Go Up
Jump to: