Showing posts with label Stop. Show all posts
Showing posts with label Stop. Show all posts

Tuesday, 21 February 2017

Project of Long Delay Stop Switch Circuit Diagram


This is a Project of Long-Delay Stop Switch Circuit Diagram. This Long-Delay Stop Switch Circuit Diagram presettable times for train stops in stations are indispensable if you want to operate your model railway more or less realistically according to a timetable. This circuit shows how a 555 timer can be used with a relatively small timing capacitor to generate very long delay times as necessary by using a little trick (scarcely known among model railway electronic technicians): pulsed charging of the timing net-work. Such long delays can be used in hidden yards with through tracks, for instance.  As the timer is designed for half-wave operation, it requires only a single lead to the transformer and one to the switching track or reed contact when used with a Märklin AC system (H0 or H1). The other lead can be connected to any desired grounding point for the common ground of the track and lighting circuits.

Long-Delay Stop Switch-Circuit Diagram
Long-Delay Stop Switch Circuit Diagram

As seen from the outside, the timer acts as a monostable flip-flop. The output (pin 3) is low in the quiescent state. If a negative signal is applied to the trigger input (pin 2), the output goes high and C4 starts charging via R3 and R4. When the voltage on C4 reaches 2/3 of the supply voltage, it discharges via an internal transistor connected to pin 7 to 1/3 of the supply voltage and the output (pin 3) goes low. The two threshold values (1/3 and 2/3) are directly proportional to the supply voltage. The duration of the output signal is independent of the supply voltage: t= 1.1(R4 + R5) × C4 

if the potentiometer is connected directly to the supply line (A and B joined). The maximum delay time that can be generated using the component values shown in the schematic diagram is 4.8 minutes. How-ever, it can be increased by a factor of approximately 10 if the timing network is charged using positive half-waves of the AC supply voltage (reduced to the 10–16-V level) instead of a constant DC voltage. 

The positive half-waves of the AC voltage reach the timing network via D2, the transistor, and D3. Diode D3 prevents C4 from being discharged between the pulses. The total resistance of R4 and R5 should not be too high (no more than 10 MΩ if possible), since electrolytic capacitors (such as are needed for C4) have significant leakage currents. Incidentally, the leakage current of aluminium electrolytic capacitors can be consider-ably reduced by using a supply voltage well below the rated voltage. Capacitor C6 is intended to suppress noise. It forms a filter network in combination with an internal voltage-divider resistor.
If a vehicle happens to remain standing over the reed switch so the magnet holds the contacts constantly closed, the timer will automatically be retriggered when the preset delay times out. In this case the relay armature will not release and the locomotive will come to the ‘end of the line’ in violation of the timetable. This problem can be reliably eliminated using R6, R7 and C5. This trigger circuit ensures that only one trigger pulse is generated, regardless of how long the reed switch remains closed. RC network R8/C7 on the reset pin ensures that the timer behaves properly on switch-on (which is far from being something to be taken for granted with many versions of the 555 or 556 dual timer).
Reed switches have several special characteristics that must be kept in mind when fitting them. The contact blades, which are made from a ferromagnetic material, assume opposite magnetic polarities under the influence of a magnetic field and attract each other. Here the position and orientation of the magnet, the distance between the magnet and the reed switch, and the direction of motion of the magnet relative to the switch are important factors. The fragility of the glass hous-ing and the thermal stress from soldering (stay at least 3 mm away from the glass housing) require a heat sink to be used between the soldering point and the glass/metal seal. A suitable tweezers or flat-jawed pliers can be used for this pur-pose. If you need to bend the leads, use flat-jawed pliers to protect the glass/metal seal against mechanical stresses. 

Matching magnets in various sizes are available from toy merchants and electronics mail-order firms. They should preferably be fitted underneath the loco-motive or carriage. However, the magnet can also be fitted on the side of a vehicle with a plastic body. In this case the reed switch can be hidden in a mast, bridge column or similar structure or placed in a tunnel, since the distance must be kept to less than around 10 mm, even with a strong magnet. If fitting the circuit still presents problems (especially with Märklin Z-gauge Mini-Club), one remedy is to generate the trigger using a unipolar digital Hall switch, such as the Siemens TLE4905L or Allegro UGN3120. To avoid coupled-in interference, the stop timer should be fitted relatively close to the Hall sensor (use screened cable if necessary). Pay attention to the polarity of the magnet when fitting it to the bottom of the vehicle. With both types of sensors, the South pole must point toward the front face of the Hall IC (the face with the type marking). The North pole is sometimes marked by a dab of paint. Generally speaking, the polarity must be determined experimentally. 

Fitting the circuit is not a problem with Z-gauge and 1-gauge tracks, since the distance between the iron parts (rails) and the Hall switch is sufficiently large. In an HO system, some modifications must be made to the track bed of the Märklin metal track. Cut a suitably sized ‘window’ between one wheel rail and the centre rail in order to prevent secondary magnetic circuits from interfering with the operation of the sensor. Keep the distance between the magnet and the case of the Hall switch between 5 and 10 mm, depending on the strength of the magnet, to ensure reliable actuation.

Readmore → Project of Long Delay Stop Switch Circuit Diagram

Thursday, 9 February 2017

Why You Should Use Normally Closed For Stop Buttons


You may know the difference between normally open and normally closed contacts, but do you know where to use them? This article will teach you where to use normally open and where to use normally closed for inputs and in your PLC program. You will learn how to connect your PLC program with the physical PLC inputs.

I have been asked by many of you to explain the use of normally open and normally closed logic when working with PLC programming.
Recently, I wrote an article containing a collection of ladder logic examples, but one of the examples made some confusion. In the start/stop circuit made with ladder logic I used a normally closed contact in the ladder logic.
But, I realized that I’ve made a mistake.
Some of you noticed that in order to make this example follow good practice, I should use a normally open contact in the ladder logic, and a normally closed contact as input actuator. By doing so, the input will be not produce dangerous situations under failure.
To explain this further I will divide the PLC logic into two parts. At last I will show how you should merge the two:
  1. Hardware Logic
    Input actuators and wiring (what is actually connected to the input).
  2. Software Logic
    The logic of your PLC program (the logic you program into the PLC).

Hardware Logic

Let’s begin with some digital inputs and some actuators to connect to these.
All digital inputs, and therefore all the digital input actuators have two states:
  • OFF (0)
  • ON (1)

But the digital actuators can not only have two states. They can also have one of two functions:
  • Normally open
  • Normally closed

The difference between connecting normally open actuators and normally closed actuators to a digital input is when you activate the actuators.
Take these two rules and remember them. This is the difference between normally open and normally closed:

1. Normally Open Input Actuators

In the default state (inactivated) of a normally open actuator the input bit is 0.
When you activate a normally open actuator the input bit will switch to 1.

2. Normally Closed Input Actuators

In the default state (inactivated) of a normally closed actuator the input bit is 1.
When you activate a normally closed actuator, the input bit is 0.

This can also be illustrated in a table:
State of the actuatorInput bit
Normally OpenInactivated (0)0
Activated (1)1
Normally ClosedInactivated (0)1
Activated (1)0

Normally closed actuators has the opposite effect on the state of the inputs they’re connected to compared to normally open actuators.
Keep in mind that the state of the actuator affects the state of the input and thereby the input bit. Each time the PLC scan cycle reaches the step where it updates the input bit, these are the values that the input bits will be updated to.

Software Logic

When you are developing a PLC program you will also be using logic. But instead of hardware logic with actuators you will now have ladder logic contacts or boolean instructions.
This is often where some confusion occurs. Because this other type of logic looks very similar to the hardware logic. In fact, the PLC programming language ladder logic is made to look like electrical circuits.
Just like the input actuators you have both normally open and normally closed contacts available in PLC programming. Often they are referred to as examine if closed (XIC) and examine if open (XIO).
The ladder logic symbols look almost like the electrical symbols for normally open and normally closed contacts, and the function of these are the same. I can even plot the same table, but this time for the PLC logic:
Input bit
Result
Examine If Closed
0OFF (0)
1ON (1)
Examine If Open
0OFF (1)
1ON (0)

As you might notice, the columns have moved and changed. The result of the boolean instructions (XIC and XIO) is now dependent on the values of the input bits. Just like the state of the input bit is dependent on the state of the actuators.
State of actuator –> Input bit –> Result of boolean instruction

At last a column containing all the results of the boolean instructions. The result is what comes after the instruction in your ladder diagram. If you have a coil connected after the bit logic instruction, the result column will be equal to the state of that coil.

Merging Software Logic and Hardware

When you create a new boolean instruction in your PLC program you will give it a certain address. This is the address of a single bit (boolean is 0 or 1 and so is a single bit). Once you’ve given the instruction an address, the state of that particular bit will now be represented as the state of that instruction.
For example you can give an instruction the address of one of the PLC inputs. When doing so, the state of the instruction will now represent the state of the input. Because each PLC input has its own bit in the PLC memory. The state of each of these bits represents the state of the corresponding input.
PLC inputs changing bits in PLC memory
The state of each PLC input is represented by the value of a bit in PLC memory.

Let’s move back to the start/stop example, which is really just a latch of a coil with an instruction to break the latching.
Here’s an illustration of how the whole system would look like, including both hardware and software:
Normally open as input actuator for stop
Normally open as input actuator for stop signal.

Notice that I use a normally open contact as input actuator, even for the stop button. This is because I’ve already used normally closed logic in the software.
When the input actuator is activated, the input bit will turn ON or 1. But in my ladder logic I’ve used an examine if open instruction and given it the address of that input.
As you can see in the table above, the result of an examine if open instruction will be 0 if the input is 1.
This is good because in the ladder logic, the instruction has to break the connection and thereby the latching of the output.
But, since the state of the input has to be 1 to break the connection (result 0), the input actuator has to turn the input ON or 1 when activated.
In the table with input actuators above, you can see that a normally open contact will change the state of the input to 1 when activated. In that way, you can use the two tables to choose between normally open and normally closed logic.
But this is not good practice.

What Is The Difference Between Normally Closed And Normally Open Inputs?

Using normally open contacts as PLC inputs is good. But for stop functions it can be bad. This is because normally open contacts can create dangerous situations when they fail…
Let me explain that a little further.
How could a circuit like the one in the example with just 2 inputs fail?
What if one of the wires broke:
Wire-break after normally open input actuator.
Wire-break after normally open input actuator.

Now, the stop button (the normally open contact) will have no function when the system is failing (wire-break). The wire break is one fail, but that produces another fail: The stop button isn’t working. And since the stop button is a critical function, this is why this solution is not good practice.
How could this solution be good practice?
By using a normally closed contact as stop actuator. This is because the normally closed contact as an input actuator won’t create dangerous situations under failure. Meaning that when a fail occurs (the wire-break), the input will act as the normally closed contact has been activated. So, if the wire to the stop button breaks, the same will happen as if someone activated the stop button. The latch will break.
Normally closed input actuator as stop button
Normally closed input actuator as stop button.

When the input actuator is changed from normally open to normally closed, the state of the input is also changed. Before the input was always 1 or ON, when the actuator wasn’t activated. But now, the input is 0 or OFF when the actuator isn’t activated.
This means, that for the stop button to work as in the previous example, the boolean instruction should now be examine if closed instead of examine if open. If you, once again, look at the table you will see that.
Since, the input is always 1, an instruction with the result of 1 (when the input is 1) will do the job. The result of the examine if closed instruction is 1.
Normally closed for PLC stop function
Normally closed for PLC stop function is good practice.

Now, the stop button works together – hardware and software. You can see below, what happens when the stop button is activated:
Activated NC input actuator
Stop actuator activated. Input is 0 and so is the examine if closed.

At last you might wonder why I didn’t do the same thing with the start button. That input is also a normally open contact, but with examine if closed (normally open logic) in the software.
Just like that stop button, the start button will not work if the wire breaks.
Remember that wire-breaks and other failures shouldn’t produce dangerous situations. Well, even though the start button will not work under a wire-break, the start button is not a critical function.
Why is the start function not a critical function?
Because it is not dangerous if the machine, motor or another movable part cannot start.

Conclusion

To develop you PLC program with what’s known as good practice, you should always keep in mind what will happen when the system is failing. Your system can fail in many different ways, but often the critical one is wire-break.
Wire-break often occurs because wires are the weakest point in a typical PLC system. Wires often go along movable parts, and are therefore exposed to a risk of being cut or ripped apart.
Another very common fail, that behaves in almost the same way as a wire-break, is loose connections. All your inputs are connected with wires. The weak points here are the connections. From the input screw-terminal on the PLC to the terminals on the input actuators are all in risk of being loose and creating a bad connection. Sometimes even no connection, which is just like a wire-break.
Do you know about other common fails, that can cause risk in a PLC program?

Readmore → Why You Should Use Normally Closed For Stop Buttons