Thinking about building an HO layout and I would like to use my knowlegde of the Arduino to control the switch machines for the turn outs using servos. Servos are cheap and can be programmed very easily with the Arduino with them mounted under the table. Will this work? I am thinking that the servo uses a circular motion and a switch machine uses linear so I am not sure if this would work.
JC
see servo turnout linkage
greg - Philadelphia & Reading / Reading
That's some complex linkage. You don;t really need anything nearly that complex. There are several mounts, or you can make one with 2 small blocks of wood, to screw the servo to, and drill a small hole for the wire to pass through. Then you drill a larger hole (like for a Tortoise) under the throwbar and stick the servo with the wire going up the hole into the throwbar. The servo turning with the wire goign through the small hole will make the wire wiggle back adn forth just like a Tortoise.
Or you cna go even simpler - drill hole, use Gorillar glue to glue servo on it's side with the horn (the plastic piece that goes on top of the servo's shaft) lines up with the throwbar, piece of wire through the throwbar and onto the horn.
I use to get mine on ebay but I've now seen servos at that price point on Amazon with Prime shipping, so no waiting. It's insane how cheap they are, and driving them with an Arduino is incredibly easy. There's a lot of examples you can copy and just use, no need to learn to code, just hook up the wires like shown in pictures and off you go.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
My mounts are the old resin ones made by Motrak but they are functionally identical to the wood SwitchWrite brackets that Tam Valley sells:
http://www.tamvalleydepot.com/products/servosaccessories.html
These worked fine for me with .032 wire (I had to buy my own though, the supplied piece was too short) through my previous layout which was 1/4" plywood with 2 sheets of 2" foam on top - for 4 1/4" plus cork roadbed to the throwbar. Solid springing of the points against the stock rail even with just .032 wire. The way the brackets work witht he servo is you don;t even have to set end limits, you just go fully end to end, and the wire is pushed somewhat over center so even if you turn the servo off, force on the wire won't move it.
SG90 servos are so cheap - for crossovers I just hooked 2 of them to the same output. No sense engineering all sorts of linkage plus using a more expensive servo. There is practically no power consumtion on the signal line, so one controller output can easily drive 2 or 4 servos, the power all comes via the power pins on the servo connector. The Arduino-based controller I am designing has 2 different power connections, one feeds the electronics and the other feeds only the servo plugs.
I'm using Peco turnouts this time, and I have one I've been using to test my circuit, I have the servo stuck to the bottom of the turnout with double sided tape, about where the Peco solenoid would clip on, but still in the Motrak mount. There's only the thickness of the resin to act as a lever pivot yet it still moves plenty far to fully engage the points with a strong holding force, and my code just runs the servo from 5 degrees to 175 (since response to the pulse train can vary a bit, I left a little headroom at each end). This is not really practical for layout use unless I want to carve out big pits under each turnout, but it does serve as a bit of proof of concept - the spring is still installed in the Peco turnout, yet the .032 wire moves it just fine.
rrinker SG90 servos are so cheap - for crossovers I just hooked 2 of them to the same output. No sense engineering all sorts of linkage plus using a more expensive servo. There is practically no power consumtion on the signal line, so one controller output can easily drive 2 or 4 servos, the power all comes via the power pins on the servo connector. The Arduino-based controller I am designing has 2 different power connections, one feeds the electronics and the other feeds only the servo plugs. --Randy
I run them on 5V. At the bench I just connect to my bench power supply. The power supply connect to my breadboard and I just jumper the power rails to the +5 and gnd pins on the Arduino. That way there is no chance I am trying to power the servo with the Arduino's regulator - it can't handle it. With just one servo, I set my meter on peak hold and got almost .6 amp if I restrained the servo. That would just melt the Arduino's regulator. When I deploy this Iwill probably have a 12V bus on my layout and use some cheap buck converters to regulate down to 5V, the ones I found and am trying out are good for up to 2 amps, so should easily handle 2-4 servos, and to keep noise out of the Arduino I will have a second one, or maybe just use a 7805 voltage regulator, to get 5V for the Arduin and support chips.
rrinker When I deploy this Iwill probably have a 12V bus on my layout and use some cheap buck converters to regulate down to 5V, the ones I found and am trying out are good for up to 2 amps, so should easily handle 2-4 servos, and to keep noise out of the Arduino I will have a second one, or maybe just use a 7805 voltage regulator, to get 5V for the Arduin and support chips. --Randy
When I deploy this Iwill probably have a 12V bus on my layout and use some cheap buck converters to regulate down to 5V, the ones I found and am trying out are good for up to 2 amps, so should easily handle 2-4 servos, and to keep noise out of the Arduino I will have a second one, or maybe just use a 7805 voltage regulator, to get 5V for the Arduin and support chips.
I have some of these little guys
http://www.ebay.com/itm/201465740515?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT
I don't think they can do 3 amps, not without a heat sink, but 1-2 shoud be fine. The output hold steady ove a wide variation on the input voltage. I need to hook one to my scope and see if they are noisy.
You want this article to get started:
http://thenscaler.com/?page_id=174
I'm doing the same thing. Ten for the price of one Tortoise, you can't beat it.
Julian
Modeling Pre-WP merger UP (1974-81)
Excellent, that is a great article on the Arduino. Everyone here has been so very helpful!