Showing posts with label Wiring. Show all posts
Showing posts with label Wiring. Show all posts

Tuesday, January 29, 2013

Transfer Table Staging-Part V

Continued from: Transfer Table Staging-Part IV

Wow, I can’t believe it’s been more than a year since I last touched this project!  I had to read my own blog to figure out what I posted last!

Anyways, over the past year, I’ve had very little time to work on this and anytime I did so, it was a very frustrating exercise in trying to figure out how I will accomplish what I want.  There are a lot of very simple ways to do this manually.  But I want to use a control panel like so:

Staging Drawer Control Panel

The way this would work is I would have a flip switch that either powers the track, or the staging drawer itself.  So, let’s say that I want to take the train that is currently on staging track 3 out to the layout.  The steps I would follow would be:

  1. Flip the switch to the “Drawer” position.  This would kill power to all the tracks on the drawer plus the approach tracks.
  2. Set the rotary dial to “3”.
  3. Use the In/Out rocker switch to move the drawer.  The drawer will stop automatically when track 3 is aligned with the approach tracks.
  4. I flip the switch back to “Track”.  This kills power to the drawer (so no accidental movements as the train is leaving) and supply track power to ONLY track 3 and the approach tracks.

Same idea when parking a train in staging.

To accomplish this, I used slot style photo-interrupter sensors. I have one of these for each track on the drawer.  There is a small styrene piece that is attached to the drawer which goes through these as the drawer moves.  The key here is that all the circuits are in parallel but only the track that is selected has current on it.  So when the styrene piece slides into place on that photo-interrupter, the sensor is triggered and the circuit is broken, stopping the linear actuator. 

In order to only power the selected track, I simply used a double deck rotary switch. 

Here’s the wiring diagram:

Staging Drawer - Automatic Indexing Wiring Diagram

Here’s how I connected everything together using a breadboard:

Staging Drawer - Breadboard Wiring Schematic

This took me a very long time to figure out, but probably because I’m so clueless when it comes to electronics.  I had to look up what a transistor is on Wikipedia.  It’s that bad.  Smile

A few key learnings:

  • The actuator was way too fast.  The power would cut off when the sensor was triggered but its momentum would keep it moving past the sensor.  I had to use a speed controller to slow down the actuator to about 1/3 of its regular speed which was 1/2” per second.  So you need something that moves about 0.15” per second.
  • It is very important to read the datasheets of the sensors you use.  These are delicate things and I fried about 7-8 of these while trying out various (incorrect) wiring scenarios.  They’re not very expensive, but it adds up and gets very frustrating.
  • Also, don’t try to use the sensors to drive the actuator.  That’s what I had tried initially.  It would’ve made for a simpler design, but the sensors just could not handle the current load required to move the actuator.  The whole thing works like a charm using relays though.
  • Don’t be afraid to experiment, and don’t give up. 

Finally, here’s a video of the entire thing in action.  Apologies for the shaky video and the slurred speech; it was very late when I finally got it to work and I was really excited. 

After this, it’s some cleanup work, and then laying down the TRACK!  YAAY!

Here are some resources I used for this project:

Thursday, November 17, 2011

Transfer Table Staging–Part II

Continued from: Transfer Table Staging

I plan to motorize the operation of my transfer table. There are many ways to do this. One option is to use a stepper motor to drive a screw and use a controller to set precise locations for each track index. This is a very advantageous approach as it provides great precision and you can control the speed, acceleration and deceleration of the drive mechanism. If you are interested in doing this, probably the simplest/cheapest option would be to use an Arduino board. They have examples for controlling a stepper motor and a full library for controlling stepper motors.

But, I didn’t want to deal with the complexity of electronics and controllers. So, I’m going to go with a network of switches and sensors. 

Let me first start with what I want the end result to look like.  I want to control the staging transfer table with a control panel that looks like this:

Transfer Table Control Panel Concept

You turn the power on, and then select a track using the rotary switch. Then you move the table using the rocker switch. The table moves until the selected track is aligned and then it stops. When a track is aligned, it receives power, all other tracks are dead. The track that receives power is indicated with a lit LED on the control panel.

To achieve this, I'm going to use on/on DPDT switches for each table location. The reason why I want to use DPDT is because I want to use the same sensor/switch for supplying and shutting off power to the tracks. One pole of the DPDT will be used for the drive mechanism running 12v DC, and the other pole will be used for controlling the DCC power to the tracks which is AC.

The rotary switch is going to be used to select only one route for power to the actuator. The way I'll wire the DPDT switches will be so that it'll act like a normally closed circuit, as in current will flow only if the table isn't currently on that index. For example, I'll set the rotary switch to track 1. That means the only power path for the actuator goes through the DPDT sensor switch at position track 1. Now, if the table isn't currently aligned with track 1, the current will flow and I'll be able to operate the actuator using the rocker switch. Once the table aligns with track 1, then the DPDT sensor switch will throw and current won't flow. The only way one can move the table again is by selecting a different track with the rotary selector switch.

The reason why I decided to use DPDT sensor switches is as I said I wanted to be able to use the same switch for controlling track power. I needed the track power to be only on when the track is aligned and the drive power to be only off when the track is aligned.

Here’s the complete wiring diagram:

Transfer Table Wiring Diagram_Full

The only option for a DPDT sensor switch I could find was this:
http://search.digikey.com/us/en/prod...1418-ND/483974

So, I started looking for alternatives. One possibility is to use regular SPDT switches for the sensors, for which there is a wide variety, and SPST relays to control track power.  I guess I have some tinkering to do.

 

Wednesday, March 23, 2011

Wiring Peco switch machines – Part 2

This is a long overdue follow-up to an earlier post I had on wiring Peco switch machines. In that post I covered how to wire Peco switch machines to a control panel using two green LEDs and a SPDT switch. In this post I’ll cover how to do the same thing using bicolor or bipolar LEDs.  Another difference is that in part 1, the switch machines were mounted under the table.  For this one, I mounted them directly on the turnout itself.

When you mount the switch machine directly to the turnout, you don’t have to do any alignment.  It is tightly attached to the turnout and it doesn’t wiggle. The machine works reliably 100% of the time when you do it this way.  Below are some pictures of a turnout prepared for installation with the PL-10 switch machine and the PL-13 accessory switch.  The yellow lines drive the PL-10 and they’ll be connected to the SPDT. The blue wires from the PL-13 will be connected to the LEDs.  The red wire is the common return.

DSC04140_covering holes - attempt 2

DSC04121_switch machine installation

DSC04118_switch machine wiring

DSC04122_switch machine installation

The only drawback is that you have to carve a huge hole on your layout to accommodate the switch machine. It is hard to conceal this hole.  I’ll cover the challenges on that in another post.  For now, let’s focus on the wiring.  Before I go any further though, I need to disclose the fact that I’m no electrical engineer.  It took me a while to wrap my mind around this stuff, so everything I’ll describe below will be in plain English.  So, if you’re an expert in electronics, take a moment to roll your eyes and go “aaaaarrrgghhh” to get it out of your system.  Smile

The wiring of the PL-10 itself doesn’t differ from my earlier post.  You still have each terminal go to the two leads on your SPDT switch.  But, let’s see how the bipolar LEDs fit in the picture. The bipolar LED is essentially a light emitting diode (LED) that emits green light when the current flows in one direction and red when it flows the other direction.  Each bipolar LED will have two connections, a long one and a short one (they’re commonly referred to as cathode and anodes).  We want one LED to be red while the other is green.  So you want to wire the cathode of one LED to the anode of the other LED in serial; that is, solder a jumper wire between the short leg of one LED and the long leg of the other LED.

When you power these LEDs with DC, you’ll need to reverse the polarity of the circuit to change the color of the LED. I happen to use an AC power supply for driving my switch machines and the control panel lights.  The difference between AC and DC can be summarized as this: with DC, current only flows in one direction, and with AC, current alternates directions incredibly fast.  So how’s the bipolar LED going to handle this situation?  We certainly don’t want these guys to blink red-green-red-green-red-green forever, or worse stay dark.  So, we need to find a way to dam the current in one direction when the turnout is thrown one way and in the other direction when the turnout is thrown the other way.  This is accomplished using a little device called a diode. A diode only lets current flow in one direction. So, by connecting one of the diodes to one terminal of the PL-13 and the other diode facing the opposite direction to the other terminal of PL-13, we can accomplish this.  Before I babble on any longer, let me take you through the wiring schematic:

BiColorLED - Single switch

First let’s go over the SPDT and the wiring of the PL-10 really quick.

  1. The power supply (PSU) directly connects to the capacitor discharge unit (CDU). This is optional, but if you want to drive more than one switch machine at the same time, you have to have this.
  2. The red lead from the CDU is connected to a shorted terminal (all terminals is wired together using jumper plates, shown here with the line through the terminal). A red lead from this terminal goes to the neutral input of the SPDT
  3. The two outputs of the SPDT, shown here with the green lines, go to each terminal of the PL-10. I’ve shown them here going through a terminal block as that’s what I have.  It’s not necessary; you can directly wire the SPDT to the PL-10. However, I found that the terminal block gives me a lot of flexibility and it is highly recommended.
  4. Then the PL-10’s common return goes back to the CDU (black wire).

Now let’s go over how the LEDs work in this scenario.

  1. A separate feed from the PSU (red wire) goes to a terminal strip that powers all the LEDs. You need to bypass the CDU for feeding the LEDs. This is because the CDU half-wave rectifies the output of the PSU. This means the LEDs will only light in one direction if you connect them to the feed from the CDU.
  2. You then take a feed from the red terminal strip and solder that to one of the legs of a bipolar LED.
  3. Then you solder the other leg of the first LED to the same leg of your second LED.  For example, the schematic shows the two LEDs connected through their shorter legs.
  4. You then need to solder a resistor (the squiggly line in the schematic) to the free leg of the second LED. If you connect the LED directly to the PSU, you can fry it.  You’ll need to use a resistor that is 680ohm.
  5. Now take a diode (the triangle with a line on its tip in the schematic), 1N4001 would work, and just solder it to the other end of the resistor. 
  6. Take a second diode and also solder it to the resistor, but make sure that its direction is opposite of the first diode. Most diodes have a small marker on them showing their direction.
  7. Now you connect the free ends of the two diodes to the two terminals of the PL-13.
  8. Finally connect the return of the PL-13 to the common return.

Wiring a crossover is not much difficult.  You need to add another LED and another PL-10.  You’ll need to use jumper cables to connect the two green wires coming from the second PL-10’s terminals to those from the first PL-10 so you can control both with the same SPDT switch.  Here’s what the schematic for that one looks like:

BiColorLED - Crossover

Ok, now that we covered all that, let’s go ahead and see what this looks like in the real world.  The pictures that follow show how I wired a crossover.

I first soldered the three LEDs in serial, alternating the anodes and cathodes (short and long legs). The yellow cable in the picture goes to the PSU.

DSC04383_bicolor LED wiring

Next up, I prepared the resistor and the diodes. I took the two diodes, each facing one direction (as you can tell by the silver loop line on one end of the diode) and soldered the two to the resistor.

DSC04384_bicolor LED wiring

Then I soldered one of the leads to the PL-13 (the blue wire below).

DSC04385_bicolor LED wiring

I wrapped that in electrical tape all the way to the diode before I soldered the other lead (the second blue wire).

DSC04386_bicolor LED wiring

Then I soldered a wire to the LEDs (the blue wire) to be connected to the resistor/diode assembly.

DSC04387_bicolor LED wiring

Then I soldered the two together.

DSC04388_bicolor LED wiring

Next up, I soldered the wires from the PL-10 to the SPDT switch. Here in the picture, the middle yellow wire goes to the CDU and the two yellow wires on the outside go to the PL-10.

DSC04389_bicolor LED wiring

DSC04390_bicolor LED wiring

I then mounted the LED assembly and the SPDT to my control panel.

DSC04391_bicolor LED wiring

I ran the wires to the terminal strips.  The longer strip on the left is where the PL-10 and PL-13 inputs are connected (in the schematic, the red terminal strip connected to the CDU and the green terminal strip), the longer strip on the right is the common returns (the black terminal strip), and the shorter strip is for the LEDs (the red terminal strip connected directly to the PSU).

DSC04392_swtich wiring

Here’s a close-up shot showing how I used jumper wires to connect the feeds to two PL-10s.

DSC04393_switch wiring - jumpers for crossover

And, here’s what the control panel looked like after the first crossover is fully wired:

DSC04394_bicolor LED wiring

Here’s a video of the control panel test:

This is what it looks like today, with all the switches wired:

DSC05505_control panel done

The entire LED-resistor-diode assembly can probably be made a lot cleaner and neater if one used a  PC board.  But, this was my first attempt and I didn’t really know what I was doing, so I went this way. Next layout, I probably will go with a circuit board.

Acknowledgements

I’d like to thank the members of nscale.net forums, especially TwinDad, for all their help with this project.  It is a fantastic community of people with a wealth of information who are always willing to help.

 

Thursday, May 27, 2010

Wiring Peco switch machines – Part 1

I am using Peco switch machines on my layout. They are extremely reliable and I have been very happy with them.  One of the things I have always wanted is to remote control the switches using a control panel. I have built this successfully on my medium layout. I am trying a different approach, hopefully a better one, on the small layout that I’m currently working on.  In this series, I’ll go through my experiences.  The first part covers my experience with the medium layout and part 2 will cover the route I took with the small layout.

On the control panel, I used green LEDs to indicate the direction the switch is thrown. So on the schematic, there is a LED on each trailing point and depending on which way the switch is thrown, one of them is on. Here is the image of my control panel with the first switch controller installed:12c - First switch functional in CP 

To accomplish this, I used the Peco accessory controller PL-13. The wiring schematic that I used is this:

image

The red is the feed from the PSU. The blue and yellow wires close the loop for one or the other LED depending on the direction of the PL-13. The green wires represent the two positions for the switch and go from the SPDT to the PL-10 switch machine.  Black wire represents the common return.

Below are two pictures of the real thing. This is a PL-10e switch machine connected to a mounting plate, with the PL-13 accessory controller glued to its bottom. In these pictures, the blue wires go to the LEDs, the yellow wires go to the SPDT that controls the switch and the red wire is the common return.

12b - First switch machine wired-2

12a - First switch machine wired

That was the easy part! I envisioned all of my switch machines to be mounted under the table, thus going for the PL-10e, which has the extended pin.  Mounting this puppy was a nightmare! I have a plywood base on the medium layout, and the track is on WS bed.  The mounting plate, plywood base and the roadbed add up to almost the exact length of the PL-10e pin!  It reached the switch just barely, with no need for trimming. 

Now getting the rod in the hole in the switch is one thing.  Getting it lined up so it actually throws the switch reliably is another. The pin has just enough give in it that the switch would throw in one direction but not the other.  After about half hour of trying to align this one thing with no success, I thought that maybe the switch was way too far down.  So I took out the chisel and started carving into the bottom of the plywood base.  Big mistake.  That added yet another 40 minutes of frustrating tinkering.  In the end, I just realized that the hole I had drilled for the pin just wasn’t wide enough.  I had drilled a hole just big enough for the pin’s movement, but you really need something that is at least 1/2” in diameter.

After about an hour and a half, two hours I finally was able to align the switch machine just right.  I forgot all the crazy stunts I pulled to get it right, but a picture is worth a thousand words. Here’s what the final contraption looks like under the table:

12e - Hackjob

This is downright embarrassing. But, it is working!  So, I’m not going to mess with it until it starts failing. Here’s a video of the control panel in action:

The end result is quite satisfying. However, all the issues I had with under-the-table mounting have been so frustrating that it has prevented me from attempting another installation.  I’m going to experiment with directly attaching the switch machine to the switch on the small layout. Depending on how that goes, I may revisit the medium layout.  That’s coming in part 2.