Relays & Ladder Diagrams for NOOBS

Thread Starter

strantor

Joined Oct 3, 2010
6,782
This attempt at an instructional thread is in response to several experiences I've had trying to convey relay circuits to people here on the forum. Not everybody is familiar with Relay Ladder Logic, as I've learned. That's a shame really, because Ladder diagrams are the most intuitive way to express relay circuits. They are much easier to read & understand than wiring diagrams. Please look at the following examples so you know what I mean:


Fish tank flusher ladder diagram Vs. Fish tank flusher wiring diagram
Automated press ladder diagram Vs. Automated press wiring diagram


Disclaimer: I'm probably not qualified to teach the following course ;)...

But seriously, I am not an engineer and I have never had any formal training in this area. All of what I know is what I've figured out by myself (a machine maintenance technician, and a rather green one at that), so some of it is bound to be wrong. Please kindly help me fix any errors you may find. Keep in mind, this is not meant to be all-inclusive; it is just scraping the tip of the iceberg, intended to give noobs a place to start.


Ladder diagrams are found mostly in industrial machine prints with relay control schemes. They have been in heavy use I think since probably shortly after the relay was invented, and they continue to be prevalent in industry today, as this is how PLCs are programmed. You can use regular wiring diagrams to marginally convey circuits with only a couple of relays, but once you get half a dozen or more (sometimes MANY more) relays and discrete controls in a circuit, it really is not feasible to express the circuit in any other form than ladder.


AAC e-book also has a section on ladder logic here. So why am I writing this if AAC e-book already has a chapter on it? Well, when I read through the AAC chapter, it's not from my perspective. I percieve it to be from the perspective of an electronics expert, and most people who come here asking for help with relay circuits are not electronics experts. They are noobs. So this is for noobs, by a guy who isn't too far removed from noobism to identify. And why does anybody bother to write something that's already been written? It would pretty boring if they didn't - only one book on each topic. That being said, the ebook section is still a great read, I highly recommend it if you have time. Speaking of time, let's get down to brass tacks:


Here's the 3 symbols you'll be dealing with the most:


1.jpg




You'll find at least 2 of these in every ladder diagram you ever see, or else it's not a ladder diagram.


Before we go any further, let me just explain a relay (just in case) - A relay is an electromechanical switch. It has a set of contacts, like your typical household light switch, PLUS a solenoid-type mechanism that operates the switch. So you house lights are switched by your hand, and a relay is switched by sending current through it's coil. There are a zillion types of relays, but this tutorial focuses mainly on the general purpose type, which have one coil, and at least one set of contactcs (common, normally open, normally closed).

Here's a few more symbols that you're likely to see:
2.jpg


You'll notice that almost everything is marked NO or NC.
NO = Normally Open. Open means that no current can flow through.
NC = Normally closed. Closed means that current CAN flow through.


NO and NC always apply when there is nothing acting on them. What I mean to say is...uhh... How about an example: You have probably noticed that when you open the door of your car, the dome light comes on. This is because of the little push switch in the door frame. You might say that this switch is normally open, because the light is not normally on; but you would be wrong. This is a normally closed switch, which is normally held open (by the closed door). We call this a limit switch, NC, held open, and there is a special symbol for that.
 

Attachments

Last edited:

Thread Starter

strantor

Joined Oct 3, 2010
6,782
So let's dive into a small example:

3.jpg


So, this could be a DC circuit or an AC circuit, it doen't really matter. The vertical line on the left represents incoming power (EX. +12VDC or 120VAC [L]) and the right side vertical line represents outgoing power (EX. 0VDC or 120VAC [N]). Let's follow this through; incoming power encounters an open pushbutton and an open relay contact. Nothing happens. You push the button (PB1) and current is permitted to flow through the pushbutton and through the relay coil. Once current flows through the relay coil, the NO contact closes, and current flows through the white pilot light. So in this circuit, you push the button, and the light comes on. You release the button, the light turns off.

You see how we named the relay CR1? This is the conventional relay naming scheme. CR stands for Control Relay. The name does not matter, so long as it is consistent. If we added another relay it would be called CR2, and the next CR3, and so on. Same for pushbuttons; PB1, PB2, so on. Limit switches; LS1, LS2, LS3, so on.


Let's take this example one step further:
4.jpg

So, what I've done here is run a wire from the bottom rung to the top rung. Where I phsyically connected the wire is not important. I could have connected the wire at the relay contact and the pushbutton, or I could have connected it at the relay coil and the light; either way, the effect on the circuit is the same. So, what effect did adding this wire have? Well, it changed our circuit into a latching circuit. How it works now, is that you push the button, the relay energizes, and lights the light just as before, but now the relay contact is not only feeding the pilot light, it is also feeding back to the relay's own coil. So, when you release the button, the relay will remain energized and the light will stay on. The only way to deenergize the relay is to remove power from the circuit.

So, let's add a function to be able to turn the light off:

5.jpg


You'll see I've added a second pushbutton, PB2 - Normally closed pushbutton. I've labeled the 2 pushbuttons "ON" & "OFF" respectively. Picking up where we left off with the last example, you push PB1, the relay latches its coil ON through its own contact. The only difference now is, that the relay latches its coil ON through its own contact, AND through NC PB2. When you push PB2, the connection between incoming power and CR1 coil is broken, so it deenergizes.


Now that you've had some examples forced down your throat, let's introduce a new concept:

In ladder diagrams, a relay's NO contact and NC contact do not necessarily have to be drawn together. in fact, most often they are not. Another illustration:

6.jpg

You see how ladder form gives us the freedom to place components where they make the most sense? Ladder diagrams are supposed to be drawn more or less in the order in which the sequence occurs. This way you can start at the top, and read through the diagram down to the bottom and get a quick idea how the circuit operates without poring over a spaghetti-bowl of wires like in a wiring diagram.

Some relays have multiple contacts. There are DPDT (2 sets of NO, NC, COM contacts) 4PDT (4 sets of NO, NC, COM contacts) etc. and these contacts can also be placed throughout the drawing wherever it is logical to place them.

Now, for a lesson in proper form:
In Ladder diagrams, RELAY COILS ALWAYS GO ON THE RIGHT, CONNECTED TO 0V OR NEUTRAL. Putting switches between a coil and ground violates convention, and is not a good idea to do it in real life because as the EM field in the relay coil collapses, it will arc across contacts. Placing the relay coil with one side terminated to outgoing power give the relay good place to dump this stored energy.


7.jpg


Now, this part of the convention does place limits on us that can be broken in real life. For example, it's totally possible to make an H-bridge out of relays, but if you tried to express the H-bridge in ladder form, it would break convention. You can't always have your cake and eat it too.
 
Last edited:

Thread Starter

strantor

Joined Oct 3, 2010
6,782
Timer relays:
There are several types of time delay relays. The 2 most common types are ON delay timers and OFF delay timers. An ON delay timer will not energize when power is applied to the coil; it will wait a prescribed amount of time (this can be adjustable or fixed, depending on the relay) and then it will energize. It will remain energized as long as power is applied to it. When you remove power, it will deenergize immediately. An OFF delay timer will energize instantly when power is applied to its coil, however when you remove power, it will stay energized for a prescribed amount of time (this can be adjustable or fixed, depending on the relay) and then it will deenergize.


The next diagram will provide some general familiarization with ladder logic and with Timer relays:

8.jpg

I made this diagram for a member who wanted an automatic system to replace the water in his fish tank. He had a programmable lamp timer, 2 pumps, and a float switch. I will explain it:

. Starting out, the lamp timer (TD1) is plugged in, waiting for the preset time.
. Preset time elapses, TD1 energizes for only a few seconds and then deenergizes.
. During the few seconds that TD1 is energized, CR1 is energized, which energizes the "Flush" relay.
. The flush relay latches it'self through it's own contact, and stays energized even after TD1 deenergizes and subsequently CR1 deenergizes.
. (skip down to the second rung from the bottom) The "Flush" relay is energized, which energizes the "flush" pump motor. The motor is now pumping water out of the fish tank.
. (go one rung up) The flush pump continues to run until the low limit float switch is tripped, at which time the "Fill" relay energizes.
. When the fill relay energizes, (3rd rung from the top) it breaks the Flush relay's latching circuit, and the flush pump starts.
. (bottom rung) While the fill relay is energized, the fill pump motor is running, pumping water back into the tank.
. This type of float switch will not change positions until the tank is full - it is a "snap action" adjustable float switch. Once the tank is full, the fill motor stops.
. The circuit now lies in waiting for the next time that the lamp timer elapses. If at any point between now and then, the water level goes low enough, the float switch will trigger and fill the tank again (safety measure)



One final thing - You CAN assemble a circuit from a ladder diagram. You DO NOT NEED A WIRING DIAGRAM. The sure fire way to make sure you get it right the first time is to employ wire numbers. Wire numbers apply to points that are electrically common. Wires on either side of a switch, or either side of a relay are not electrically common. I will demonstrate:

11.jpg

This circuit is CORRECT. There are potentially a dozen wires physically in the circuit but there are only 4 wire numbers, 1, 2, 3, & 4 - because several of the individual segments of wire are electrically common.

12.jpg

This circuit is INcorrect. Wire # 3 has been used on both sides of CR1.


13.jpg

This circuit is INcorrect. Wires 5,6, & 7 are all electrically common and should carry the same wire number.

Also you have to make sure when you wire a circuit per a ladder diagram, that you terminate the incoming power to the COMMON of the relay. For example, if you want to use a relay's NO contacts to switch a pump, it is possible to route incoming power to the NO contact, route the COMMON of the relay to the pump, and route the other side of the pump to ground. HOWEVER, you will run into problems if you later want to use that same relay's NC contact for another purpose. The proper way to do it is to route incoming power to the COMMON contact, route the NO of the relay to the pump, and route the other side of the pump to ground.


Well, that’s about as far as I take this and still have it fall under the title of "Relays & Ladder Logic for NOOBS". If I have energy at a later date I will go into more complex things. As it stands I think I have relieved myself of ever having to translate a ladder diagram into a wiring diagram; from now on, if people don't get it, I will direct them here.
 
Last edited:

Thread Starter

strantor

Joined Oct 3, 2010
6,782
oh yeah, and when working with DC circuits, it is important that you install flyback diodes like this (even though it may not always be indicated on the diagram):
14.jpg

Note: positive is always drawn on the left, and 0V (GND) is always drawn on the right, so this diode is reverse biased. don't install it the other way around or you'll let the smoke out.
 
Last edited:

#12

Joined Nov 30, 2010
18,224
Strantor,
This method is so foreign to me that I wouldn't dare to correct you.
I work with mechanical stuff, and it often has ladder diagrams, but I just re-draw it in the language that works for me, schematics. The ground symbol removes lots of mess from what would be called a wiring diagram. I can pull a power supply out of thin air by just writing a label next to a relay symbol. (When I actually need a wiring diagram, I draw one, complete with the messiness caused by all those lines.) I just never got good with ladder diagrams.

Whatever flavor you like your soup is OK with me. I simply prefer a different flavor.
 

BSomer

Joined Dec 28, 2011
434
I just now read through it and think that you did a good job explaining the basics of relay logic / ladder logic. I personally like this form as to me it is very easy to follow and I have a great interest in PLC's. Ladder logic is often the programming style used in PLC's, perhaps the most popular because electricians can readily relate to it.

The only thing that I would comment on is the way you showed to latch a relay. I could be wrong in my thinking, but isn't it generally drawn using a separate set of contacts on a relay for latching purposes? I understand that some people may not have a DPDT relay for their project and your method does work.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,782
The only thing that I would comment on is the way you showed to latch a relay. I could be wrong in my thinking, but isn't it generally drawn using a separate set of contacts on a relay for latching purposes? I understand that some people may not have a DPDT relay for their project and your method does work.
Thanks for the feedback.

By that, do you mean a dedicated contact for the latch? I.E. The contact that is feeding the coil should not be feeding any other load than the coil?
 

BSomer

Joined Dec 28, 2011
434
Thanks for the feedback.

By that, do you mean a dedicated contact for the latch? I.E. The contact that is feeding the coil should not be feeding any other load than the coil?
Yes, that is what I was referring to. This was just coming from my experiences working as an electrician and a little from the training I got on PLC programming.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,782
Yes, that is what I was referring to. This was just coming from my experiences working as an electrician and a little from the training I got on PLC programming.
I *think* that's just in PLCs. I've noticed that RSLogix won't let me do it, and it also won't let me route wires from other rungs to a relay coil. I figured it's just to keep things in an easy to understand (for computers) format. When you start routing multiple wires to relay coils (in real life) you can end up stuck in logical cul-de-sacs if you don't think it through. I attached a diagram from one of my extruders; it has an example (recent, 2010) of a latching contact feeding an additional load (pilot light). I could provide examples like this all day (especially in the older, 60's & 70's machines), though I can't find any or think of any examples where I saw a latching contact feeding anything more substantial, like a solenoid, a motor, or an alarm. Probably a good reason for that; I can conceive a scenario where the load draws too much current and "robs" the relay coil, causing it not to latch - especially if it were supposed to latch on a quick pulse. But then again, if that were true, I would expect that the relay coil could be "robbed" by just about any load, anywhere in any rung. So, I really don't know what the answer is. Maybe some salty engineer will school me on it soon...

I just now read through it and think that you did a good job explaining the basics of relay logic / ladder logic. I personally like this form as to me it is very easy to follow and I have a great interest in PLC's. Ladder logic is often the programming style used in PLC's, perhaps the most popular because electricians can readily relate to it.
Thanks BTW. Glad there's at least one person out there that likes it. It doesn't get a whole lot of love, and I don't know why. PLCs I predict will start to migrate away from ladder logic interfaces. I believe they will become more text-based. The higher level PLCs already are somewhat. I worked on a MicroLogix1500 for the first time last year and was surprised when I got in there and it was 75% programmed in text. Fortunately it was intuitive, and I have a little programming experience, so I was able to make the changes that I needed to make. I actually liked it better than ladder - it makes analog things much easier. Trying to program analog function constrained to ladder is a pain, and makes little sense (to me).
 

Attachments

#12

Joined Nov 30, 2010
18,224
One of the problems I have with ladder diagrams is that there is no visual "flow" from a coil to a contact. I have to go find the label for the contacts and I have to do that for every coil. In a schematic, there is a visual cue where the contacts are.

YOUR diagram has the contacts in the line after the coil that operates it but this is the first time I've noticed that. I wonder if it's been that way all the time and I didn't notice it or the people that make ladder diagrams for laundry appliances don't follow that rule.
 

Thread Starter

strantor

Joined Oct 3, 2010
6,782
One of the problems I have with ladder diagrams is that there is no visual "flow" from a coil to a contact. I have to go find the label for the contacts and I have to do that for every coil. In a schematic, there is a visual cue where the contacts are.

YOUR diagram has the contacts in the line after the coil that operates it but this is the first time I've noticed that. I wonder if it's been that way all the time and I didn't notice it or the people that make ladder diagrams for laundry appliances don't follow that rule.
No, you're right. Sometimes a drawing can be 100 pages long, and a relay's contact & coil might be seperated by 98 of them. But this is a couple of chapters in the future (which probably won't be written, by me anyways). When drawing a circuit large enough that this becomes a problem, a grid is established on every page of the drawing. Next to a relay's coil, you write the page#, and the grid square (EX. PG 12, B7) of where each contact of that relay is located. Also, by each contact, you'll find the page & grid square of it's coil. In a system this large though, a traditional schematic of it would be the size of a dinner table if all typed out in #6 font. I find the hunt & find of relay logic much prefereable than that. Once you get used to it, it makes a lot of sense. Fortunately, the newbies who will need this info, probably won't be dealing with anything that complicated, so they won't have to "get used to it".

relay control circuits of that magnitude are few and far between though these days, as anything requiring more than half a dozen relays usually gets a PLC thrown at it.
 

gerty

Joined Aug 30, 2007
1,305
Lookin' good, I'm into this stuff nearly every day with my students.
One thing I did notice, post #4 with the diode, you didn't show the polarity of the power supply rails. If you get that backwards, you'll have a dead short with the diode.
Keep up the good work..
 

Thread Starter

strantor

Joined Oct 3, 2010
6,782
Lookin' good, I'm into this stuff nearly every day with my students.
One thing I did notice, post #4 with the diode, you didn't show the polarity of the power supply rails. If you get that backwards, you'll have a dead short with the diode.
Keep up the good work..
Thanks.
Post #4 has been updated.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
personally for me, there's a difference in ladder, pictorials (or diagrams), and schematics. I had worked on several older Battenfield injection machines where the circuits where done in diagram, some 35-40 relays. Forget that.

For hardwired electrical, the schematic is king. A good schematic in my mind uses standard symbols, flows from left to right, groups functions.

For me, ladder is a logic schematic, nothing more.

The question of can ladder be used to describe an entire system? my response would be that ladder is a subset or an addendum if you will, to the overall schematics.

In the end, I suggest that you cover good schematic practice, although ladder is fun too. Don't get me wrong, covering ladder is good education, but it's not the tool to cover general electrical/electronic communication.
 
Last edited:

williamj

Joined Sep 3, 2009
180
Wiring diagrams and schematics differ from ladder diagrams in purpose. Meaning,wiring diagrams and schematics illustrate wire and conductor placement where ladder diagrams illustrate current flow. Any wire can be rerouted in any circuit without changing the current flow of that circuit. But in rerouting that one wire it completely changes any wiring diagram and or schematic of that circuit.

A ladder diagram is always drawn and then read from top to bottom and from left to right. In wiring diagrams and schematics there appears (to me) to be no set proceedure in how they are drawn or read. Also in ladder diagrams it is understood that, in all ladder diagrams, the circuit "as drawn" is in an electrical de-energized state. The may or may not be physical forces to be concidered but that is not taken into concideration by the ladder diagram itself.

just my two cents,
williamj
 
Top