Pages: [1]   Go Down
Author Topic: Hobby train (n-scale) track switch controller system  (Read 2132 times)
0 Members and 1 Guest are viewing this topic.
Portland, Oregon, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm working on an automation system for my hobby model train system, n-scale.

I have developed a Arduino based circuit that uses IR sensors and shift registers to detect train position and then uses an h-bridge circuit to send forward/reverse DC power to throw track switches (turnouts) to divert the train down one track or another based on the Arduino programming.

Some of my track switches (turnouts) are actually controlled by small hobby DC motors; however my issue that I want to solve involves some of the track switches which are actually AC based, 3 wire electric switches. I'm not sure how to integrate these into my DC based system.

I know you don't know anything of my system, but at its basics, I can control numerous sets (pairs) of DC +/- wires going to each of the DC switches/turnouts, and I can reverse the DC polarity on those pairs of wires so as to throw a switch in forward or reverse.

Now the AC switches are 3 wired. Here is a link to a installation instruction picture which will give a good understand of how they are wired; mine are just like this. The real information is the wiring diagram at the bottom.

http://www.nscalesupply.com/atl/ATL-65.html

The control switches are those buttons on the "switch control box", which are sliders, left/right and press to activate the power. So the slider buttons control direction the track switch will move. You'll notice they are powered from the AC power pack via 2 wires. This further confuses me because I thought AC was "alternating" current, so I didn't think a motor could be made to spin opposite direction by flipping the wires around, like a DC circuit would.

Nevertheless ... how might I deal with these 3-wire AC switches in my DC based system, which uses h-bridge design to reverse DC power?

Ideally I would like to just expand on my DC h-bridge controlled DC power and send that to the AC switches. Might this work if wired properly?

How would 2-wire DC be wired to those 3-wire AC switches?

Thanks for reading, and looking forward to any input or comments.

Cheers,
Eric
Logged

Croatia
Offline Offline
God Member
*****
Karma: 13
Posts: 505
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are two circuits in the switch.
Black is common, powering red OR green determines the direction the switch turns.
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For control of the track switches you may want to take a look at hobby servos. They work out much cheaper than motors and there h-bridges and need far few pin to control.

Mark
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26273
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought point-motors were simple electromagnets, one for each direction, in which case a simple transistor for each should be sufficient.
With a tiny bit of extra hardware (7400 and a couple of capacitors?), you may be able to get away with a single output bit per switch, because you only need to apply power to either magnet for a second or so.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Portland, Oregon, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys for the suggestions.

I'll go back to playing with some DC battery power on those 3-wires and see if I can get some activity because that would be a great way to solve my issue. Also, I never considered that they may just be electromagnets. Thanks!

The servo idea might not be a bad idea if I can get them cheap enough, I'll shop around on that.

Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Micro servos are about 5 pounds (GBP) on ebay, cost for a micro motor and control card is about 20 pounds (GBP).

Mark
Logged

London
Offline Offline
Edison Member
*
Karma: 47
Posts: 1432
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That doesn't state what voltage the Powerpack is supplying. It's usually 12 -16V for turnout motors (00 gauge). As others have stated, the motors are almost certainly a couple of solenoids on a single armature. The solenoids will work off of AC or DC. If you're using DC and powering them from any electronic circuitry, watch the back EMF, as it can be several hundred volts!

Another thing to consider is that one coil may need the common connection to be -ve and the other coil may need it to be +ve. This wouldn't be a problem using AC. Also note the warning in the instructions about only having the power on for less than 1 second. Any more than that and you're likely to overheat the coils, melt the plastic casing or both.
Logged

2nd star on the right
Offline Offline
Full Member
***
Karma: 0
Posts: 103
Everything I am is classified under the official secreats act!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In the old days the simple way was to connect all the neutrals (negative) on the 4 wire solenoids (converting to 3 wire), Use swithches to set which side you want to switch the use a single momentary push button to discharge a capacitor discharge unit through the path.(ofter 16VDC)

And yes model railway motors (conventional not DCC) was controlled just but switching the direction that the dc current flowed through the motors coil.

A simple way of doing the change ove was using a DPDT switch.

A good old ref book is
http://www.amazon.co.uk/PSL-Book-Model-Railway-Wiring/dp/1852601736/ref=sr_1_42?ie=UTF8&qid=1361691905&sr=8-42

With the Arduino, there are hundreds of ways to do a single thing but the Arduino must allways be isolated from the circuit control side to protect against damage.
Logged

Sorry for the noobish post but my knowledge is 10 years out of date!

Portland, Oregon, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I took on of the track turnouts apart and it is indeed a pair of solenoids with a metallic shaft running through the center of the pair. By powering either one of the solenoids causes the magnet field to draw the shaft one way or the other. The shaft itself is connect to mechanism to throw the track frog (rail). Also, I do believe a DC current flowing in either direction will magnetize the solenoid.

I did put multimeter on the AC coming out of the powerpack and it is amazing 17 volts for these little solenoids. For those who had warnings, my circuit uses optocouplers to isolate my external DC power from the arduino circuit. See my fritz link in my previous post for circuit layout.

Here's the Fritz off my circuit; warnings it harry! Each of the pair of wires going to the motors would be an example of a pair that would need to go to the 3 wire solenoid pairs.
http://fritzing.org/projects/train-track-and-turnout-control-system/

Therefore I need to design my 2 wire DC (with forward or reverse current) into the 3 wires of of solenoid pair. I think I can put diodes on each of the 2 main wires to the solenoids, have one diode forward and the other diode in reverse. Then send one of my DC wires to the pair of diodes, and the other DC wire to the common. When the DC goes forward or reverse it should only go through one solenoid or the other. See my attached image as example.

I've yet been able to get the opportunity to wire this up and test it, but the online circuit simulator shows one bulb or the other to light when DC goes one direction or the other.


* dc_diodes.jpg (34.55 KB, 621x370 - viewed 67 times.)
« Last Edit: February 26, 2013, 01:27:34 am by Riccarr » Logged

London
Offline Offline
Edison Member
*
Karma: 47
Posts: 1432
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, I do believe a DC current flowing in either direction will magnetize the solenoid.
The current direction determines which direction the solenoid pulls/pushes.

Quote

Therefore I need to design my 2 wire DC (with forward or reverse current) into the 3 wires of of solenoid pair. I think I can put diodes on each of the 2 main wires to the solenoids, have one diode forward and the other diode in reverse. Then send one of my DC wires to the pair of diodes, and the other DC wire to the common. When the DC goes forward or reverse it should only go through one solenoid or the other. See my attached image as example.

I've yet been able to get the opportunity to wire this up and test it, but the online circuit simulator shows one bulb or the other to light when DC goes one direction or the other.


You're still thinking AC!

Connect the common connection to ground and apply the +ve supply to each of the solenoids in turn. You should be able to get the switch (points in the UK) motor to pull both ways. If not, just reverse one of the solenoid connections so that the opposite end is connected to the common.

12volts will probably be enough to move the solenoids, especially if you connect a hefty capacitor (470uF or more) across the supply. You need to connect a reverse bias diode across each coil to kill the back EMF before it kills your circuit.

You also don't appear to know about 'common ground' wiring. Run a bare copper wire along the underside of your layout (I use a stripped piece of mains cable, 2.52mm cross sectional, I don't know what that is in AWG) and make ALL your ground connections (at both ends) to that. It saves up to 50% of your cabling and pins on multiway plug and socket pairs. You can also connect one side of an independent (not used to supply any other electronics) track supply to it after the DPDT reversing switch, the other side then becomes either +12v or -12v with respect to it, depending on direction of the switch.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, I do believe a DC current flowing in either direction will magnetize the solenoid.
The current direction determines which direction the solenoid pulls/pushes.

Are you sure? A DC relay pulls in no matter the polarity of the applied DC voltage. A solenoid if using a non-magnetized armature should pull in also regardless of the applied polarity. AC solenoids would be very dramatic if applied polarity effected if polarity determined if it should pull or push on the armature.  smiley-cry

Lefty


Quote

Logged

London
Offline Offline
Edison Member
*
Karma: 47
Posts: 1432
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, I do believe a DC current flowing in either direction will magnetize the solenoid.
The current direction determines which direction the solenoid pulls/pushes.

Are you sure? A DC relay pulls in no matter the polarity of the applied DC voltage.

A relay pulls in to complete a magnetic 'circuit'. The top of the relay coil is one pole (depending on the direction of the current flow) and the bottom is the other pole. The iron frame of the relay connects the bottom pole to the armature, which is attracted to the top of the relay (opposite pole). So, as you say, a relay pulls in whichever direction the current is flowing.

A solenoid doesn't (usually) have that magnetic circuit, just a coil and a movable core.

Quote
A solenoid if using a non-magnetized armature should pull in also regardless of the applied polarity. AC solenoids would be very dramatic if applied polarity effected if polarity determined if it should pull or push on the armature.  smiley-cry

Lefty

I see your point, so I'm not quite as sure now...
Logged

Pages: [1]   Go Up
Jump to: