arduino 4 relay shield
This video, we are going to see how we can use this for channel relay without davina to control, AC load or AC bulb like that. So we can control four separate AC load. That load can be bald. It can be a heater, it could be a fan, anything that you want. You can get the quote for this project by clicking at the link at the description which will take you to Robo jog that console ashland, slash ORD. We know a word of warning if, when you’re working with ez that’s now connected to AC power, make sure you do not touch this area or underneath and make sure that this module is on insulated surface like what plastic something like that, if you’re working you want To adjust something or change, something make sure to disconnect the power from the outlet. This is the relay module and we have four relay that’s why this is called for channel or for relay module the relays. At this point, we have three terminals for each relay, so these two this and this terminal as drawing shows they are normally connected without power or anything. If I connect a power here, a light or a load, it will be connected I’m using my multimeter as a continuity to start here you see the sign and when I connect these two probes, just buzzes I’m, going to show you that this terminal these two folded, This really these two terminals are normally connected without any power or anything, and these two are normally open same thing for this one and the other.
This is normally connected without any signal. When the signal comes here, then this and this plane will be connected when you connect and use it. You always put one of the wire at the metal and the other wire, depending on your application. If you wanted the power to come, when the signal comes to be disconnected, you just put it here, because it’s normally connected and if you wanted the other way do not change anything about the metal. One just switch your wire there and then here we have four terminals, we have sex input. This is ground. G and D will be connected to ground and this VC C will be connected to five volts, and then we have n 1 n, 2 and 3 and n 4. So this has input 1 input, 2, 3 and 4 for these four relays. So this is really one really to retrieve 3 4 and the same way we have four LEDs here to show the status of these relays when they are activated at this on this corner, we have a jumper okay, so let me just put it through the jumper: You can either connect it. You, the jumper, could be either connected or removed. When the jumper is connected, these relays will take the power from the five volts that you connect to this VCC, either Arduino or whatever, so the power will come and will be connected. But if you want to totally isolate this from Arduino, because sometimes because, due to high current and other reasons of connecting expensive equipment, if you want to isolate it, you can do that by removing this jumper.
But you have to supply 5 volts separately by an adapter for this, so you see the bus and now let’s put it. So this understand are connected so remember that the module length is very 5.1 millimeter. Fifty five point: two millimeters, the adaptive eighteen point: eight millimeter! This relay is low regard, meaning that with the value of low or zero volt, the relay will turn on at the input and the value of five or high the relay will turn off so with the low it will be triggered or turned on. So let me connect and show it to you. This is now the ground pen, I’m gon na put it on the ground here and this Arduino, and this is the five volts I’m gon na put it as five volts now. This has the power, but does not have any signal to control so I’m, going to put this on an input one so now I’m going to connect this to five volts. As you can see here, nothing happens really one supposed to turn on now. If I’ve connected to the ground, release or now so that is the meaning of load trigger with low it will trigger and turn on and with the high it will not trigger so it’s possible that you can get or by high trigger, but does not matter. You can just adjust the code and play with us and make it work with any way. You wish think that you remember for the relay.
Each really has a rating, as you can see here, that says: 10 amperes, 250, volts, 50 number, 125, volts and 10 ampere 250, so it’s 10 or 15 ampere for a lower voltage in North America. It will be 15 ampere and for the higher voltage in Europe and Asia it will be 10 ampere, with voltage rating on the region, calculate the rating of the power for the region. That say, you have 240 volts and then times 10. You can correct up to 200 2400 watt or 2.4 kilowatts in each relay, so each are independent, so 2400 watt and that’s 1 2400 watt and this one. But if you are in North America, then 120 volts time 15. So you can correct up to 1800 watt 1.8 kilowatt of node into this. So if you do not follow the rating of this relay, the relay will melt down. It will be very dangerous, so make sure that that is the maximum it doesn’t mean that it continuously can handle so make sure always leave some room for overheating. Let me explain now the code for the beginning. We said number of channels death, a program that I wrote can work with any number of channel 16 channel 20. As long as yours, you have the right type of module. If you have Arduino Uno, you can go up to 12 channels and if you ever do in Omega, then you can go higher, so this 4 determines how many eerily you have and then beside that in the relay array.
Here this is an array that holds the pen number for each relay, so this is the first relay that’s, the second relay that’s, the third and fourth. So it starts from left to right, and these are the pen. This has been two and three and four and five, and then you put comma and then type other one if you have something like eight or whatever, wherever you want to connect it. So for this case we are just going because I have four, then I have four pen here defined after that. This is the wait time 2000. Second, two thousand millisecond, which I’m gon na explain next and then the eye is needed for counting death to make it automated, because we don’t want to write multiple code manually. We want to make it automated after that inside the setup which starts from here and in here these are the important steps. First, we said the serial monitor to print this text. For us and remember, this 9600 is the number that is on this corner and they must match, and then we have a for loop, which starts with I equals 0. I already have been defined, so you don’t, I don’t have to so. I don’t have to define it here and then we say I is smaller, that channel or CH which we have here it. This is SSI if I type 4, so I see less than 4, which means it goes from 0, 1, 2 amp, 3, and then I increments.
So when loop starts, the spy is compared with the CH. I is now 0 compared with CH, which is 4. This is true, now is smaller than 4 and then, after that, it comes here and says really: zero. Zero means the first value, and this is the one that’s, the two that’s the tree, so zero one, two three. So this is zero, so the zero mean so pen two will be output and then we’ll go span trip and whatever for whatever value you have here, it will be set as output and then we are also setting it as high because the relation turned off – and This is low, trigger and high mean off, so we are setting it the same way as off and after that we just put in this text which will be here. You will see it. This text is that so this is the text being printed by death, and then we have a main loop which starts from here and ends here inside the loop. I have two for one here to turn the release on and then one here to turn them off. Now to turn them on again I become 0, 1, 2 and then 3. So the value of I changes so here this line just prints. This text really fool off and remember here, because the value is 0. I have added 1 because we don’t have really 0. So 0 plus 1 is 1 really 1 and then really 2 is actually.
This is 1, so we are adding one more to reflect human readable value, not 0, 1 2, and then this the same way as here it turns the relay on which means it says it low and then waits for the amount of time that we said 2 Seconds so, as you can hear the clicks, each weight is 2 seconds. It turns on and then waits for two seconds and turns the reading and the second relay on and then the third really and then the fourth really after that. Just does the same thing as the above this time we are turning them off here, they’re low, which means on and then high, which means low. So we are doing the full release of this is just 4 general illustration of how to use this, and because I wanted to use all four of them. I use this to show activity of four relay, but in your case, if you want to use it differently, for example, if you want to use it Manimal. So if you don’t want this – and you want to understand it, if you have trouble with the relay array I’m, just removing this so remove it and put this – you can see that we have to put so many lines to do the same thing. So this is turning when you put relate zero, it turns the zero means, death and one two, three and so forth, so it says the output and set it as high and this one ancestor that’s high and then really one.
So this is for really – and this is for really three – and this is for really four – so I’m gon na stay with this and the same thing here. So if you want to turn any relay on or off so do this inside the loop just type here. One that is that relate to, if you type so, if you type this will be really three and then, if you type one it would be really two and so forth. So these are the relays that will be turned on and off. So you can control. So you can control turn on the relay by setting this low and turn it off by setting this as high, and you considered under certain conditions. For example, if something is pressed or some viable, some value of temperature is equal. Sixty five, then you can say really. Yes, really, yes, really number three should be high or turned on else. If the temperature is not that, then turn it off, so you can do. Whichever way you prefer that temperature is larger than 65 smaller than 65 well. This is just an example or any other value of button is pressed or something so this should happen now. Let’S, look at the demonstration of this code. I’Ve connected this AC bulb to the relay number two, so this is really one not really. Two is now often really three is off and really for it off and then really one will be on and then two will be on.
If you can see the light is on and three and four so all of these will be on. So there is a problem, however, that this now totally they can see what about 250 milli ampere, which which is okay for this Ord winner to supply. But if you want this one to be totally isolated, then we can. We have to connect here, external five volts for the relay and this opto coupler or opto isolator, or completely isolated, isolating the Arduino from the circuit so I’m going to show you now. So I have five volts here now to connect it with 5 volts. First, remove this and once removed it I’m, putting there 5 volts connecting it here, and this is a pen, the 5 volts, so the 5 volts I’m connecting it the pen on this side that this side already have the 5 volt which is connected to this wire. The VCC so I’m putting it as you can see, the release of the signal is coming, but the relay is not working. You don’t hear the clicks because they need 5 volts still when I connect this. This will not work because I have to share also their ground with their circuit so I’m connecting this ground and then plug it somewhere on earth. Do you know? I have another ground here: extra ground, so now I’ve connected it and it’s working, and at this time I have completely isolated the relay from the Arduino because of 5 voltage camp coming separately here and 209 pair is a lot, so you can supply it from another Source and imagine if you have 16 relay, it will be and the raw circumstance or the unica supply the current for all of these, because if there is only one relay you have 70 milliampere each relay would consume 70 million people.
Thank you for watching their fourth introduction on how to use this for channel or higher relay using Arduino with AC boot. So the skirt can work with any number of relays just make sure that if you are using a lot of relays – and you want to isolate it – just make sure that connected here. So please subscribe. So you can give up this of my upcoming videos and also, if you have any question, please posted at the description below I’ll try to answer it.
arduino 4 relay shield Video
arduino 4 relay shield news
Posted on Tuesday June 25, 2019PiRelay, a Raspberry Pi relay shield with a mobile app that costs just US$17.06 Notebookcheck.netRaspberry Pi Relay HATs are two a penny, but few come with a dedicated mobile app. Meet the PiRelay, a HAT that can manage up to 240 VAC/7 A or 125 … … Continue Reading »
Posted on Friday March 08, 201910 Shields That Get the Most Out of the Arduino EE TimesArduino is an excellent tool for any project, but pairing it with a Shield expands its capabilities and raises the platform to a new level. Let’s take a look at some of … … Continue Reading »
Posted on Tuesday May 28, 2019Best Arduino Stepper Motors in 2019 All 3DPSo you need an Arduino stepper motor for your next project? Check the best available stepper motors fitting Arduino shields and drivers, plus a list of available … … Continue Reading »
arduino 4 relay shield Social