Trains.com

Servos as Motive Power

3348 views
22 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    August 2003
  • 6,434 posts
Servos as Motive Power
Posted by FJ and G on Thursday, June 8, 2006 9:48 AM
I just finished reading Electronics for Dummies and feel dumber than ever.

The last chapter was the most interesting. It showed how to build a robot using 2 servos as propulsion; even showed how to modify the gears so they spin all the way around without doing that quarter turn thing.

AND, get this, the servos can be linked to a Basic Stamp, which in turn can be programmed to do things by simple computer language.

Furthermore, servo motors, a type of "stepper" motor, can turn slowly for those who like slow running.

Has anyone looked into using servos as propulsion power for locomotives and perhaps even programming them to run computer-directed sequences (that can be changed up any time you like)?

I think this is definitely something worth investigating. Just wish my layout was complete so I have more time to tool around with this stuff. I'm chompin' at the bit!
  • Member since
    February 2005
  • From: Peak District UK
  • 809 posts
Posted by cabbage on Thursday, June 8, 2006 11:00 AM
The main problem with a stepper motor is that fact that they are not designed to do a continuous revolution -but 15 degree 'nudges'... Other than that there is no real reason why you should not try. I have seen 'modified' servos used as winch motors on model boats -but other than that I am only familar with the 1/4 turn type.

Both Torby and I have done some programming for 'embedded systems' -but this was in Forth-79 in my case and PolyForth in his.

regards

ralph

The Home of Articulated Ugliness

  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Thursday, June 8, 2006 11:34 AM
Ralph,

They can EASILY be modified to do continuous revolutions.

That was my point.

Just unscrew the casing

Remove center gear

Remove output gear

set the potentiometer for the center position using pliers

Remove the ridge on the top side of the output gear using an X-acto blade or nippers

File down the remaining ridge

Remove metal retaining ring from under the output gear using small screwdriver

Remove potentiometer shaft clip

Place metal retaining ring back into output gear

Replace output hear on its seat, resting over the potentiometer

Replace middle gear and ensure all gears mesh properly

Add grease if needed

Replace the cover

And, you're now good to go.

2 or more servos can be used in tandom

(as many as you need)

THe servos can be plugged into a Basic Stamp BOD

A computer interface can be worked up with the BASIC stamp editor to give your locomotive virtually any commands
  • Member since
    February 2005
  • From: Peak District UK
  • 809 posts
Posted by cabbage on Thursday, June 8, 2006 1:10 PM
David....

If you read the post I was refering to stepper motors.... I am well aware that Servo Units can be modified for continuous rotation -hence their use as anchor winches. I would also doubt the 'duty cycle' of such motors for use in model loco usage. Most of my locos are powered by 6V pump motors rated at 100% duty and they get pretty warm!

regards

ralph

The Home of Articulated Ugliness

  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Thursday, June 8, 2006 1:37 PM
OK, sorry. My miss.

  • Member since
    January 2006
  • From: Sandy Eggo, CA
  • 1,279 posts
Posted by Ray Dunakin on Thursday, June 8, 2006 6:11 PM
I'm no expert, but I have a little experience with servos modified to turn continuously. For many years I've used them to activate cameras onboard high power rockets. The small ones I used could run for hours on two AAA batteries.

Servos are not really stepper motors, they are geared motors. Stepper motors move in distinct increments.

If you used a servo for motive power, you'd probably want one of the larger ones with a lot of torque. I don't know how well they'd do at low speeds. The ones I use lack power below a certain voltage.






 Visit www.raydunakin.com to see pics of the rugged and rocky In-ko-pah Railroad!
  • Member since
    January 2006
  • From: Des Moines, Ia
  • 49 posts
Posted by icepuck on Thursday, June 8, 2006 8:52 PM
Have a look at http://www.parallax.com they even have continuos rotation servos.
and heres some more links of interest
http://www.robotstore.com/
http://www.nutsvolts.com/
http://www.servomagazine.com/
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Friday, June 9, 2006 8:13 AM
Thanks, Icepuck. Those sites has my mouth watering to do some experimenting. The true potential of robotics has not, IMO, been fully explored in model trains.

I picked up a Robot magazine in the bookstore the other day and marvelled at the creations teens were doing with robotic parts. The young kids are on the cutting edge of this stuff and may have some of us older farts beat be a stretch.
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Friday, June 9, 2006 9:39 AM
I'm looking over the bot kits in the Parrallax and Jameco sites. They're about $100 and sound like a wonderful way to get into this hobby and combine it somehow with model railroads in the garden. I shall try to figure out how these bots can go inside a locomotive and looks some flanged wheels up to them.

Later, I'd like to add some other features like voice programming. For example, tell the train to stop, reverse, uncouple, etc etc
  • Member since
    January 2006
  • From: Des Moines, Ia
  • 49 posts
Posted by icepuck on Friday, June 9, 2006 10:09 PM
The robotstore has a 10 amp h-bridge and stepper motor controllers that can be used with a basic stamp. Go to the downloads on parallax and download the basic stamp manual version 2.0. You should be able to get some ideas by looking at some of the code examples in the pdf. If you do decide buy one, buy a bs1, if you do smoke a port you wont be out much.
www.imagesco.com sells a speach recognition board that can be added to whatever you want.hope this helps.
-dh
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Saturday, June 10, 2006 5:39 PM
Thanks! Helps a bunch. I'm also gonna join a robotics forum and mine the knowledge of the geek teen populace[:D]
  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Tuesday, July 18, 2006 9:22 PM
I have been tinkering with a remote control for an electric loco. I got a remote key-fob and receiver on ebay for about $15.  Its good for about 100 ft or so, more than enough for most garden layouts. The one I found has 4 pushbuttons that trigger 4 outputs on the receiver,. I was going to use those as inputs to either a Basic Stamp or a Picaxe (Picake is a knock-off of the stam, but they sell for $3-$10 instead of $40). I plan to let one button signal a speed increase, another a decrease and the third a panic stop. A momentum functions should be easy to program into the Stamp.

There are now many sources for continous rotation servos, usually for robots. Thye come in several sizes and ought to make a nice power source for a small loco.

This is one of those part-time projects fo rme- I tinker with it from time to time.
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Friday, July 21, 2006 11:12 AM
Ron,

I'm not sure our community has realized the potential that is out there to power our locomotives, to program microprocessors and to bypass trackpower, R/C companies who market stuff to our hobby, and proprietary systems like DCC, DCS, TMCC, etc.

Motorboats, ground vehicle and aircraft are all doing it. It's just a matter of time before it kicks into our more traditional and conservative hobby.

It's all about giving you, the user, control and choices rather than receiving the dictims from the powers that be.
  • Member since
    February 2003
  • From: AU
  • 320 posts
Posted by TonyWalsham on Friday, July 21, 2006 7:07 PM
It is entirely possible to create a perfectly good and low cost R/C system using high frequency RF keyfob transmitters on the (approximate) 400 Mhz band. These low cost items have operating criteria imposed by the FCC when used with toys, that is incompatible with the way we operate our trains.
Therefore, no manufacturer is going to risk the wrath of the FCC by marketing a product on a commercial basis that is illegal to use.

It could be done of course using the 900 Mhz band that is legal in the USA, Canada and Japan but illegal anywhere else.

Best wishes,

Tony Walsham

   (Remote Control Systems) http://www.rcs-rc.com

Modern technology.  Old fashioned reliability.

  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Monday, July 31, 2006 8:57 PM
Can you explain some of the limits that make this illegal? For train use we only need a range of 100 feet or so,  and I dont see anything more complicated than a simple toy like an R/C car.. The fob I have has 4 buttons, the receiver has 4 outputs that come on with each button press. I was going to use each press of the A button to increase speed, each press of B to decrease, including going into reverse. And that leaves C for a panic stop, and D for a whistle.
  • Member since
    February 2003
  • From: AU
  • 320 posts
Posted by TonyWalsham on Tuesday, August 1, 2006 7:38 AM
Hello Ron.

When the 400 Mhz band is used for models the FCC mandates that the TX transmit for no longer than one second and no more frequently than once every ten seconds.

By all means build one for your own use. They work just fine in our environment.
BUT, don't even consider using them commercially for model trains. The FCC have already come down hard on one entrepreneur who tried just that.

Best wishes,

Tony Walsham

   (Remote Control Systems) http://www.rcs-rc.com

Modern technology.  Old fashioned reliability.

  • Member since
    August 2006
  • From: Pittsburgh, PA
  • 12 posts
Posted by dbodnar on Friday, August 4, 2006 11:26 AM
David - The community as a whole may not have realized the potential for microcontroller operation of model railroad equipment and such, but I, for one, have been working with it for several years.

Have a look at an article I wrote a bit over 2 years ago on using a very inexpensive microcontroller called a PICAXE to control a small locomotive.  I have several of these running on my railway under internal battery power and they work very nicely!

To get to the article go to http://davebodnar.com/ and click on "Robot Train Project"

It is quite complete and should give you all of the information that you might need to get started.

dave
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Friday, August 4, 2006 3:18 PM
Dave,

This is cool. I've bookmarked your page and intend to read every bit. Didn't know there was anyone else interested in this stuff (most folks like "ready-out-of-box"; which just suits the train companies fine. But most don't know there's other fun ways to run trains. Using a microprocessor gives you unlimited freedoms. You can even mimic a flywheel's "coasting" effect for stopping.

I envision sharing programs over the forums once this idea gets going. There's quite an active community of "robotics" types on several other forums who are really doing some neat things. I'm happy to see you are getting involved in this aspect. I hope to do so myself.

  • Member since
    August 2006
  • From: Pittsburgh, PA
  • 12 posts
Posted by dbodnar on Friday, August 4, 2006 5:43 PM
David - I am pleased that you found the information interesting.  I have been spending a good bit of my time doing such things since I retired from my occupation in the "real world" - now I get to do what I want to do and have fun to boot!

If you are interested in the robot train article have a look at the other things I have been developing on my other web site:

http://www.trainelectronics.com/

Most of these devices have been written up in some detail at

 http://www.lsol.com/

Enjoy!

dave
  • Member since
    January 2006
  • From: Des Moines, Ia
  • 49 posts
Posted by icepuck on Friday, August 4, 2006 6:34 PM
When I got my first bs1 ver.d(when it first came out), I modified one of the example programs in the book that came with it. I was using a push button to control the direction of a servo. I had at the time an old rc speed controller, the kind that used the servo signal from the reciever to run the drive motor. So as a crude test I tried it and it worked, it was a little rough to operate but it worked.After reading some of the above posts for today I got to thinking... why couldn't something like this work for ruuning a train? All off-the-shelf parts and a few hours programming, who knows what might happen:)
-dh

  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Monday, August 7, 2006 2:01 PM
Hi Dave,  I'm still browsing through your articles. Yours are the best I've seen (and one of the few I might add) on the topic.  You've really pushed the envelop and importantly, you have documented your work.  You likely have seen some experiments I've done (now have a working motor boat R/C layout): http://ogaugerr.infopop.cc/eve/forums/a/tpc/f/3181048701/m/6931099873 I use a motor boat transmitter/receiver/ESC to power my train. But, I could also use the servos that came with the set to power the trains (I'm just using the onboard locomotive motors). You have taken it a stop further and added the Basic Stamp microprocessor and innovated with interrupters/reed switches, which is really cool. Yours seems to work on autopilot and mine is more hands-on throttle control. Both approaches are valid and exciting. I imagine with the Basic Stamp, there could be many pages of code you could write to do train movements and possibly other functions like switching. The reeds also could activate movements, sounds or lights at lineside industries. Possibilities are endless. I'm not big on programming, but since you've supplied some sample code, it might be fun to give it a try. I'll stay tuned to your web pages if you expect further updates. Cheers.
  • Member since
    August 2006
  • From: Pittsburgh, PA
  • 12 posts
PICAXE & train control
Posted by dbodnar on Monday, August 7, 2006 2:34 PM
Dave - interesting work you have done with the R/C control - I gather that you are considering using servos to drive the wheels of your locomotive - although servos can be modified to do that (I did some small robots that way years ago) the motors and drive gears on most servos are not designed for continuous duty.  I would love to do some experiments to see just how long they would hold up!

Please note that I am not currently using Basic Stamps - I did use them exclusively in the early and mid 1990's but have moved on to PICAXE microcontrollers for projects that I write up for others to replicate (like the Robot Train project and others that have been published on LSOL) - I use PIC microcontrollers when I need more capacity and higher speed program execution.  My latest projects with PICs are a multi-scale speedometer (both wireless and with track-side sensors), an auto-reverse unit and a number of LED lighting projects including ditch lights and Mars lights.

I have nothing against the Basic Stamps other than the price.  I encourage you to look over the PICAXE home page @ http://www.rev-ed.co.uk/picaxe/ as they have developed a superb product at a very good price!

Please do keep an eye on the web page, especially TrainElectronics.com as I am always adding things and looking for ideas!

Keep me posted on your progress and let me know if I can be of assistance.

dave
  • Member since
    August 2003
  • 6,434 posts
Posted by FJ and G on Wednesday, August 9, 2006 10:38 AM
Here's a PDF download that explains about microprocessors, in case anyone is interested. I'm reviewing it now and hope to eventually run some experiments.

http://www.parallax.com/dl/docs/books/edu/wamv2_2.pdf

Also, thanks for the picaxe link; I'm reviewing that as well.

NOTE: on some of these sites, they use IR transmitters for R/C hands-on control. However, it is my understanding that there are problems using IR outside in the sunlight. I'd rather be looking at traditional boat/car R/C transmitters using radio frequencies.

Search the Community

FREE EMAIL NEWSLETTER

Get the Garden Railways newsletter delivered to your inbox twice a month

By signing up you may also receive occasional reader surveys and special offers from Garden Railways magazine. Please view our privacy policy