Hobby train (n-scale) track switch controller system

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

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

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

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.

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.

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

Mark

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

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.

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

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.

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

Riccarr:
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.

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.

Henry_Best:

Riccarr:
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. =(

Lefty

retrolefty:

Henry_Best:

Riccarr:
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. [/quote]

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.

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. =(

Lefty

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