Beginner Electronics - Beginner Electronics – 21 – Relays

Beginner Electronics

29 Lessons

Beginner Electronics – 21 – Relays

what is going on everyone my name is Kota Moore and welcome to electronics episode number 21 and today we will be learning all about relays we likely will

not be using relays too too much throughout this series however knowing how they work will help us learn how transistors and logic gates work in future episodes also relays we used

quite a bit years ago for many different applications from telegraph machines to computers to elevators and of course there are still many uses today for relays it really is essentially an

electronically operated switch and as with many of the different electronics components relays come in many different forms that differ slightly in their function and there are also a couple of

different ways to draw a schematic symbol for a relay but we're just going to be talking about relays in general of course there are many different types of them so let's first talk about the most

basic form of relay the single pole single throw relay which I have the schematic symbol for right here and as you can tell that sounds very familiar to a single pole single throw switch and

if we remember that that schematic symbol looked just like this it's either a switch that's open or closed and as you will soon see a single pole single throw relay does almost the same thing

now there are four connection points on this relay here there's one here one here and then two right over here now this part of the schematic symbol is your switch part as you can tell this is

an open switch because the green bit right here is not touching each other there is no connection so it's an open switch electricity won't be flowing from this terminal to this terminal so this

is when the relay is off now in order to operate this switch instead of having a human actually flip the switch and get this green part here to connect that way we can have some connection run through

here instead of a human doing that will actually happen easily have electricity from a different source do that so if we actually run electricity through these wires right here it will cause this

switch to connect and make a connection therefore we would have a closed switch between those two terminals there and the way that works is actually this part right here this squiggly line is an

electromagnet inside of the relay your relay actually has a little mat inside of it so whenever we do not run electricity through this coil right here through this magnet the magnet is off

and it's not going to attract any metal pieces so the switch here stays apart it stays open therefore we don't get a connection between these two terminals right here but once we run electricity

through this electromagnet right here the magnet powers on and it pulls these two little green bits together just like a switch being closed and it will then make a connection so that is the most

basic form of relay we have our circuit hooked up here that is a switch part and to operate the switch we just have to use electricity through this part instead of our hands and like switches

there are different types of relays so let's draw a quick other schematic symbol here so we have our electromagnet coil right there we have this line and then this time let's go ahead and draw a

different relay so we're going to have switch there another terminal here and a little switch right here and these are going to be three connection points instead of just 2 now and we still have

these two connection points right here now this one is going to be a single-pole double-throw relay just like a single-pole double-throw switch so when we aren't running electricity

through the electromagnet when the magnet is not being powered then these two terminals right here and here are of course connected and will allow electricity to flow but once we activate

this electromagnet by running electricity through these two terminals magnet turns on and this will actually switch over to this terminal so now these two terminals will be connected by

the switch and electricity can run through them like there it acts just like a single-pole double-throw switch and hopefully you guys remember that from our switching episode a while back

the magnet essentially just toggles this little middle piece to switch between two other terminals and we can make this a double pole double throw switch so let's make this a double pole double

throw relay rather and we can do that by just adding another set of these terminals right here so so if we draw an identical set right below them like so this just becomes a

double pole double throw relay so when we activate the magnet these two terminals become connected and these two terminals become connected and when electricity isn't running through this

electromagnet right here then these two and these two terminals are connected so that's pretty simple they're essentially an electronically operated switch so let's go ahead and design a quick little

circuit with relays now I'm not going to design anything too complicated here we're just going to have a battery and from the negative side of the battery we're just going to go down and we will

connect it to a relay like so we'll make it a single pole single throw relay how is that so we'll have our two terminals right here and relays are always drawn in their off position whenever the

electromagnet isn't on that's how the schematic symbol is drawn so in this case the connection is open or it's not making a connection when the electromagnet is off let me actually

draw in that electromagnet before I forget there we are so coming out of the other terminal of the relay here we're just going to do something really simple we will go ahead and put in a led so

that we can get some light there we go make sure that's pointing in the right direction towards the negative terminal of our battery and whenever we have an LED we are going to want a resistor in

our circuit like so and I'm just going to hook this directly on up to the positive power source of our battery now if we were to build this circuit right now obviously it wouldn't work because

we have an open switch here there's no electricity that will be traveling through so to get that to work and I know this is kind of a pointless example there's no real use for this but it's

just to get one working in a circuit all we would have to do is pass some electricity through this electromagnet here so we'd hook one end up to the negative terminals battery hook the

other end up to the positive terminal that would activate this little electromagnet and it would make the connection between this switch there for electricity can flow through the LED and

the LED should light up but the second we stopped applying power to this electromagnet the switch opens up again and connection is broken and it will not

light up now of course I rely probably wouldn't just be used this way this is just an example but once we get into building logic gates we will quickly see how these relays used to be used in

computers and different applications like that so let's go ahead and just build this quick circuit on a breadboard now as you can tell already relays come in many different sizes shapes and

colors here are two right here this blue one is a single-pole double-throw relay and there's a little diagram on the bottom of it let me actually focus this here there's a little diagram on the

bottom that tells me what pins go to what these two pins go to the electromagnet well this center pin in these two pins over here go to the actual switching

part now for this circuit I'm just going to go ahead and use a double pole double throw relay just because it fits in my breadboard easier and we can make it work just like a single pole single

throw switch easily so here I can tell from the little diagram on the bottom and again I'm sorry it's hard to see on the camera here but these two pins on the right and actually let me just do a

freeze-frame once I get this focused these two pins on the right here are for the electromagnet so when we run electricity through them it activates the electromagnet and it will activate

the switching mechanism within now from reading the little diagram on the bottom of this relay here I can tell that these two pins are connected by default when there's no electricity running through

the electromagnet and when we do run electricity through the electromagnet that becomes disconnected and these two pins connect instead and it's the same for the bottom row of three pins as well

because it's a double throw relay so for this circuit because I only need two of the switching pins I'm just going to go ahead and use this pin right here and this pin right here because they are

disconnected to begin with and when we run electricity through the electromagnet here they become connected this pin and this can become connected so it will make a connection so let me

go ahead and plot this into my breadboard here first things first I have a button that is going to be hooked up to one of the terminals of the electromagnet and I'm just going to go

ahead and hook up the ground or the negative terminal of my battery to the switch here and then I'm going to hook up the positive terminal of my battery to the other

little pin for the electromagnet as well that way if we press this button it should activate the relay and run electricity through the electromagnet and actually if I press it right now

there is a little click that you can hear and there's a click when I release it as well and that is actually the electromagnet moving inside of the relay and getting those connections to happen

sorry if you couldn't hear that on the camera too well but there is a little clicking sound being made by the relay that means the electromagnet is working so let's actually hook up a circuit to

this firstly I'm going to take the ground the negative portion of my power rail and connect it to that far pin on my relay there we are and then to the other pin on my relay and I'm going to

just take that out of the way for a second I'm going to put in my resistor and I'll just run that over to one of the empty rows on the breadboard like so and from there I'm going to put the

shorter leg of my LED attached to the resistor and the longer leg into the positive power rail of my breadboard here and let me just put that relay back in the same exact position there we are

so as you can see the LED is not being lit up because the connection is broken but if I press this button it will run electricity through the electromagnet which should operate the switching

mechanism within the relay so if I press the button as you can tell the LED lights up if I release the button it turns off so there we go we activate the coil inside the electromagnet it

switches the connections and makes the LED light up we release it in the connection breaks and the LED goes off now of course all relays have limits to them so you want to take a look at the

datasheet make sure that you're not going to blow up your relay or anything and relays also have a very slow switching speed so we can't activate and deactivate the electromagnet too too

fast or else it will not work properly and that slide different things like transistors were created or at least part of the reason why and we

will be talking about those transistors in the next video thank you so much for watching everyone and I'll see you guys in the next video

In this video we talk about how non-latching relays work!

See my website: https://codenmore.github.io/