Control AC Devices with Arduino SAFELY - Relays & Solid State Switches

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today in the workshop we're using an arduino to control ac devices we'll learn how to safely work with alternating current and how to control ac with relays and solid-state switches i'll also show you a simple and safe method of controlling any ac appliance with any microcontroller we're in an alternating universe today so welcome to the workshop [Music] well hello and welcome to the workshop and today we're going to be working with the arduino and as the arduino is a microcontroller we're going to be using it to control things now the things we're going to control today are things that work on alternating current or ac now we've already used our arduino to control dc devices we've used bipolar junction transistors bjts and mosfets to control dc devices that required more current or voltage than the arduino is capable of delivering on its i o ports well we're going to be doing the same thing today with ac devices and ac devices require different techniques than dc devices now before we get started there are a couple of things i want to make pretty clear first of all when you're thinking of ac devices i'm sure you're thinking of line operated devices or mains operated devices things that work on your household voltage which can range anywhere from 110 to 240 volts depending where you are in the world and i can see why you'd want to do that it is much more interesting to turn on and off a lamp or a heater with an arduino than it is to turn on and off an led however before you get excited about connecting things to the mains or line voltage you need to keep safety first and foremost in mind never ever experiment with mains or line voltage on your workbench never connect it to a sawdust breadboard i am going to be showing you a safe way of working with ac on your workbench if you choose to do it you can also take a look at these lessons as is something theoretical because at the end of this video i'm going to be showing you a device that you can use to control ac devices using an arduino and it is simple to use as a power bar it is completely safe it is fully certified which is another consideration you need to make if you're constructing devices that attach to the ac line so that's something that i really want to emphasize is that safety first my friends and the second thing is when i say controlling ac devices all we are doing today is we are turning them on and off we are not going to make any attempt to dim the level of lamp or reduce the level of a heater for example that is something for a different lesson so with all of that said let's go and take a look at what's required to work with ac devices and a microcontroller like the arduino controlling ac current can be a challenge using semiconductors the reason is that many semiconductors only pass current in one direction and for alternating current we need to go in both directions for this reason some solutions require multiple semiconductors one should not overlook electromechanical solutions like relays these are still very much in use with any solution isolation between the input and output is critical for all high voltage applications one common method of controlling alternating current is the silicon controlled rectifier or scr this is a four layer semiconductor it is sometimes called a thrister although some people would say that an scr is a member of the thrivesister family an scr is very much like a diode that has a gate that can control the current flow one problem using an scr with ac is that it only conducts half of the ac waveform this problem can be illustrated here where you can see us passing a full ac waveform into the anode of the scr at the cathode you'll see that we only get the top half of the waveform this is because only half the current can be passed through the scr a solution for this problem is to use two scrs connected back to back in opposite polarity the gates of the two scrs are tied together allowing us to control the full ac waveform a device that functions exactly like this is a triode ac switch commonly called a triac this is a bi-directional switching device like the scr a voltage applied to the gate of the triac controls its output the triac is a very common ac control device chances are you have them in your home if you have lamp dimmers a solid-state switch is also known as a solid-state relay or ssr this is a device that has a triac on the output the input on the solid state switch is opto-isolated meaning there is absolutely no electrical connection from the input to the output electrically a solid-state switch is similar to an led making interfacing it very easy because it uses a triac in the output there'll be a slight distortion of the ac waveform but for most applications this is not even notable many solid-state switches specify a minimum output ac voltage and therefore cannot be used with very low voltage ac relay is an electromagnetic switch when current is passed through the relay's coil the magnetic field it creates attracts the armature and essentially flips the switch in this diagram i've shown a single pole double throw switch but double pole double throw switches are also very common and you can also get other pole configurations because a relay is essentially a switch there's absolutely no distortion of the ac waveform there's also no minimum voltage requirement on the ac side you cannot however drive a relay directly from a microcontroller in most applications you'll use a transistor in order to drive the relay you'll also need to place a diode across the relay coil in order to block the back emf which is created when the magnetic field in the coil collapses this voltage of the opposite polarity can interfere with your circuitry otherwise an easier way of using a relay with a microcontroller is to use a relay module which has all of the four mentioned circuitry as well as an optical isolator on the input completely isolating the microcontroller side from the relay side you can also choose to share the voltage for the relay coil with the microcontroller or to use an independent supply voltage relay modules are available in many shapes and sizes with one or more relays on board for our experiments we will be using both relay modules and solid-state switches they are much safer methods of working with alternating current using a microcontroller when working with alternating current we have to observe a number of safety precautions your household electricity ranges from 110 to 240 volts ac depending upon where you live this level of voltage can hurt or kill you do not take this warning lightly never work directly with high voltage never apply high voltage to a solderless breadboard do not connect high voltage directly to an i o pin on a microcontroller do not assume that a wire does not have voltage on it always test the voltage levels before touching wires when wiring for high voltage double check all of your wiring with a multimeter before applying power never expose high voltage leads to the outside world where someone could touch them remember safety is the most important thing in your workshop and with that in mind let's see how we can work safely with alternating current now as i said at the beginning of the video the emphasis today is on safety and so i want to show you how i can safely work with alternating current on my workbench so let's go and take a look at this test setup that we're going to be using today and i want you to pay particular attention to two pieces of equipment that will allow me to safely work with ac voltages now here's the test setup that we're going to be working with today on the workbench and the key with our test setup is we are not going to be using the full ac line voltage which in my case is 120 volts instead we're going to use a step down version of ac and for that i purchased this transformer now this is supposed to be a 28 volt center tap transformer although as i found out it actually gives out a little bit more voltage than 28 volts but it actually has two primaries it can be strapped for either 120 or 240 volts so naturally i wired mine for 120 and it's wired off over here and it's also brought out to a couple of binding posts where i have the output of the supply plus its center tap over here and it's actually powered up right now so if i power this you can see that i've powered up my load and what my load is is it's two little incandescent light bulbs and these are rated at 28 volts although as i said this is giving out a little bit more than 28 volts it's actually giving out about 35 volts or so i think yeah 34.4 volts is what i'm getting from it but it doesn't seem to bother the light bulbs i've had them running for a few hours and they're fine of course they get hot because they're incandescent bulbs but otherwise they seem to be withstanding a little bit of extra voltage and as you can see from here i'm almost pulling a hundred milliamperes i've got my two light bulbs in parallel over here now you'll notice there's another device on my workbench and that's the other thing i wanted to draw to your attention not only have i got this step down the ac i've also isolated this and what this is is what's called an isolation transformer now this is a transformer that has the same number of coil windings on both its primary and secondary so i've got an input of 120 volts and an output of 120 volts and you see they actually have an outlet over here i'll just unplug this you can see there's an outlet on this transformer to plug into and so this actually isolates me from my own electrical line i'm not actually directly connected a multimeter from my electrical line to the output of this would show that it's completely open and they use isolation transformers for medical purposes you probably have one in your home if you've got an outlet in your bathroom because generally most electrical codes require you to have an isolation transformer in there so they're also a very handy thing on the workbench and they add just one little extra layer of protection but the key takeaway over here is that i'm using a lower voltage of ac not the full voltage now i've chosen this voltage as opposed to going down to about 12 volts because my solid state relays need a minimum of 24 volts to activate so this gives enough voltage so that i can play with the solid state relays while at the same time remaining safe on the workbench now probably the oldest method of controlling ac voltage or indeed any kind of voltage is to use a relay a relay is an electromechanical device that has been around for over a hundred years but is still very much in use today and it is a good choice for a lot of designs you can control virtually any amount of current with the proper relay now i've got a number of relays here on my workbench that we're going to take a look at we'll demonstrate the operation of the relay and then we'll connect the relay up to our arduino and see how we can use that to control it now here are a few relays and relay modules uh first the individual relays these all look alike although these three over here actually have a 12 volt coil voltage and these have a 5 volt coil voltage otherwise they're identical they're double pulled double throw and they're actually made to work on printed circuit boards so they're spaced correctly you can put them onto printed circuit boards they will also work on solderless breadboards so they're very handy to experiment with when you want to experiment with just a relay but these are relay modules over here and as i was saying earlier we are going to be using relay modules and not just relays because they already have the driver transistor and they've got the emf blocking diode and these modules over here you can see this little black thing here these are the opto isolators so you're completely isolated from the input side to the output side for an additional measure of safety and protection for your microcontroller the other thing about these modules that i like is that they've got screw terminals over here so you can connect your ac load directly to screw terminals as opposed to having to wire it it's just one additional means of safety especially if you are going to be controlling line voltage although for our experiments we're just going to be controlling the lower voltage from my transformer and we're going to use one of these modules in our experiments and so you can find a variety of these things with the different number of relays on them they even come with 24 relays on some of these and so really for any application you have for relays these are the way to go and so here's a very elementary demonstration on the operation of a relay now this relay has a 5 volt coil so i'm using the 5 volt power supply from my work bench and i'm bringing it in over here i've got it connected through a push button so that can turn on and off the current to the coil now this is a dpdt relay which means double pull double throw so the output is connected identically to a dpdt switch and i've got my output connected across a couple of contacts on one side of this relay that are normally open and this would sometimes be listed as n o or normally open when the relay is activated these contacts will be closed and my load of course is my light bulb over here or my two light bulbs rather that 28 volt bulbs and i've got my power supply back over here so if i press the button miraculously we can see the light bulb lights up now this is wired right now to the normally open contacts if i move this over i can go to the normally closed one so let's just do that and as you can see it's lit right now because these are closed without the relay being activated when i press the button it will open the contacts so you can wire the output two different ways so it's a very elementary usage of a relay but we are going to be using relay modules when we work with the arduino which is what we are going to be doing next now for our first demonstration we're going to require an arduino uno and we'll need a relay module now although i'm showing your relay module here with one relay you could certainly use a multiple relay module and just use one of the relays one thing to note is there'll be a jumper between vcc and jd vcc that jumper needs to be into place you'll also need an ac power supply and i'm using my 28 volt transformer and you'll need an ac load and i'm using a 28 volt incandescent light bulb you'll need a light dependent resistor or ldr and these are fairly commonly available and just about any one will work and you'll also need another resistor for the ldr circuit i'm using a 10k resistor but this value isn't that critical and you could even go as high as 100k if you wish if you're having problems with the circuit you might want to experiment with the resistor value now we'll begin by wiring the 5 volt output of the arduino to the vcc input on the relay module we'll connect the arduino's ground to the relay module ground and pin 8 of the arduino will be connected to the input pin on our relay module we'll connect one side of our ldr to the 5 volt supply we'll connect the other side to one side of our resistor and also make that connection to the a0 analog 0 input on the arduino we'll connect the other side of the resistor to ground we'll connect one connection from our power supply to one side of the normally open connection on our relay module we'll connect the other side of the power supply to one side of the incandescent light bulb or whatever load you happen to be using and we'll connect the other side of that load to the other connection on the relay and this completes the wiring of our relay module test now here's the sketch that we're going to use for the demonstration with the light dependent resistor and the relay and it's a pretty simple sketch we'll start off by defining some integers for the ldr input which is on analog pin a0 and also an integer that represents the value that we get from the analog to digital converter on that pin and this will be the ldr value and we'll initialize that at the value of 0. now we need an integer for the pin we've attached the relay to and i've attached the pin 8 so the relay out variable is set to eight we also need an integer for the threshold point now this is the reading point of the ldr value at which we're going to switch the relay on so this basically when it falls below this value we will turn the relay on and you may need to experiment with that value but i found 700 was a good value for my particular ldr setup now we're going to set the relay up as an output so we just use a pin mode command to do that i've also attached a serial monitor to this and this is just so you can monitor it and if it isn't working you can go back and change that threshold value but otherwise a serial monitor is not really needed for this particular application now we go into the loop and the loop's pretty simple we're going to go and we're going to get the value from the ldr pin that's a0 and assign it to ldr value so this will be the value that we get from the ldr and resistor combination i'm going to print that out to the serial monitor and as i said that's just so that you can examine this value and adjust the threshold if required and we're going to see if the value is below the threshold now the value is below 700 then we're going to do a digital write and we're going to send a low out there now that may seem counterintuitive but these relay modules are active low and so you need to send them a low to turn them on and a high to turn them off and so if the value is not below 700 then we're going to turn the module off we're going to keep it high we're going to put a short delay onto it and then just go back through the loop so it's a very simple sketch let's go and hook it up and put it on to our arduino and see how it works all right here's my photo electric switch with a relay all wired up and ready to go now i've used a dual relay module just because the dual relay module i had had the opto isolators and i kind of like that and so only one of these relays is being used and of course i have the strap on over here and this is a strap that straps the jd vcc to the vcc and what that does it is allowing the five volt power from the arduino to also power the relay coils now if you were doing multiple ones of these you would not use that strap you would apply a separate bit of power to the jd vcc terminal over here and that would power the relay coils separately but since i'm only using one coil it's safe enough to do that the arduino's voltage regulator can handle that amount of current now here is my load my leds and the arduino of course and i've got my resistor and my ldr on this little solderless breadboard now let's cover the ldr to block the light and as you can see it is working it is turning on the light now i'm not showing the serial monitor now but if you're having trouble with it what you can do is you can start adjusting that trigger point i use 700 but you might need to go lower or higher for yours now i'm going to also turn the lights off in the room over here and we'll see what effect that has so i'm turning the lights down and there you go the lights come on so this is actually a practical circuit if you think about it you could use it to turn on a light automatically when the light level goes down to a certain point and of course there are scads of different circuits like that that you can already get but with an arduino you could amplify that effect you could put other conditions in to turn on the light and keep in mind too that if you want to do the opposite thing keep the light on and then switch it off when the light gets to below a certain level you could just simply wire it to the other contacts on the relay to accomplish that so it's a very simple but also pretty versatile little circuit that you can build with a relay and an arduino now a relay is a great way of controlling ac devices indeed all sorts of devices however a relay does have some limitations if you want to switch devices on and off rapidly a relay isn't a very good choice because it's an electromechanical device the relay contacts can also wear so over time you may need to replace your relay even worse the contacts can arc which would produce a spark and that spark can be dangerous if you're operating your device in an environment that might contain explosive gases relays can also be noisy and their coils can consume a fair amount of current now a solid state switch has a number of advantages over a relay it can't be used to replace a relay in every purpose for example solid-state switches don't really work very well with very low voltage ac but for line voltage ac solid state switches are an ideal replacement for a relay they won't wear down that can be switched on and off very rapidly and although they're a little more expensive than relays they're not that expensive so i've got a number of solid state switches here on the workbench i want to show you we'll take a look at the operation of one of them and then we'll hook one up to an arduino in place of a relay and see how it operates controlling ac voltages now here are some of the solid state switches or solid-state relays that we will be using in our experiments and i've really got two different styles these are both the same as each other this is a very common style of solid state relay and it can handle a lot of current this is rated to up to 40 amperes and the thing about these relays is they've got a metal back plate on them they can be mounted on heat sink so if you're going to be consuming the full 40 amperes you really ought to heat sink this by mounting it onto a heat sink or at least mounting it onto a metal chassis but otherwise they're quite easy to use they've got the inputs over here so this is the dc input that is 4 to 32 volts dc and there's a little led on here as well so when you activate the input and the input of course is polarized this is the negative here and the positive over here you'll see the led come on and the switch will be activated and the output is over here it's just a single output either on or off that you connect to these terminals here now this is a module that is very similar to the relay modules we used except this is using solid-state switches or state relays and it's the same kind of a deal they've got screw terminals over here for the output of the modules and they've got screw terminals and dupont for the input these are just basically duplicated so that's kind of nice and there's a led on board to let you know when the module's been activated and otherwise you can use these in a very similar fashion to the way that you did with the solid state excuse me than you did with the relay modules the only difference being the power you can safely power these from your microcontroller because they don't consume anywhere the current that relay coils would need and so we're also going to be using this one as well in some of our experiments today and you can get a variety of solid-state switches or solid-state relays either as modules or as individual devices with various current ratings pretty well for controlling any type of ac device so here's a basic demonstration of the use of a solid state switch or solid state relay and this is wired up in a similar fashion to the relay demonstration i did earlier again i'm using the 5 volts from my bench power supply and i'm sending it through the push button switch which is going to go to the input of this solid state switch now this has a minus input and a positive input and it takes anywhere from 4 to 32 volts dc so my 5 volts over here will work fine with this note that this starts off at 4 volts so this particular solid state switch would not be particularly good for use with 3.3 volt logic now the output here is rated at anything from 24 to 480 volts ac at up to 40 amperes i'm certainly not drawing 40 amperes and i've made the minimum of voltage requirement this is my 28 volt transformer which as we saw earlier is really more like a 35 volt transformer and my load over here again are my two 28 volt incandescent light bulbs and so pressing the push button as you might expect activates the solid state switch if you can see on the switch there's a little led over here that activates whenever it's pressed and of course it's uh driving current through ac current through to my light bulb so it's working just like the relay it's quieter than the relay because there's no clicking sound from the solid state switch unlike the relay it only has normally open outputs on this particular model so there are no normally closed outputs that i could use but otherwise as you can see it's a very basic thing really when you're using one of these with a logic circuit you just treat this input as you would an led with a built-in dropping resistor and you can pretty well wire anything you want to it and so with that in mind let's go and take a look at another solid state switch a solid state switch module that we're going to hook up to an arduino now for our solid state switch or solid state relay demo we're going to need an arduino uno and a four element solid-state relayer solid-state switch we'll need an ac power supply again i'm using my 28 volt ac power transformer and we'll also need four incandescent light bulbs at minimum now in actual fact i'm using eight i just got mine in parallel but i'm only showing four here on the circuit for simplicity you'll need a potentiometer the value isn't critical but i'd recommend something around 10k now we'll begin by taking the 5 volt output of the arduino and connecting it to the positive or vcc input on the solid state relay we'll connect the arduino's ground to the negative input on the solid state relay pin 11 of the arduino will go to input 1 on the relay pin 10 goes to input 2 pin 9 to input 3 and pin 8 to input number 4. we'll connect one side of the potentiometer to the 5 volt output of the arduino the opposite side of the pot will be connected to the arduino's ground and the wiper of the pot will be connected to the analog a0 input and now for the ac side we'll connect one side of our ac power supply to one side of each of the outputs of the solid state relay the other side of the power supply will be connected to all four of the incandescent bulb loads and then the other side of those bulbs will be connected to the outputs of the solid state relay and this completes the wiring of our circuit now let's go and take a look at the code we'll need in order to make our chaser work all right now here's a sketch that we're going to be using to build our chaser that drives a solid-state relays and in turn drives a number of light bulbs now it's a pretty simple sketch although i think you'll find it interesting in the way that i've defined everything in the setup and i'll show you that in a moment now we are using four outputs right now and the first variable we are going to define is the number of outputs that we are using now if you want to increase or perhaps decrease this you can just do this accordingly so this output pins variable represents the number of pins that we're using then i'm setting up an array with all of the pin numbers now that's an interesting technique because instead of defining each one of the pins individually i'm setting up an array over here and then i'm going to set up a couple of integers one for the speed control input on a0 and the other one for the value of that input now here's what i mean in the setup remember i've defined everything as an array so what i'm going to do is i'm going to step through this array with this for loop i'm going to step through it starting at 0 and starting up to just below the output pins number which in my case is 4 but again you could have changed that and i'll increment it every time and as i go up i'm going to set the output pin of the first element in the array which in this case is 11 to an output and then i'm going to set it high and i'm going to use a digital write on that pin and set it high then we'll step through and it'll go through the next one number ten nine and eight and you can continue to use this technique to define more pins and as you can see it's pretty efficient it saves creating a separate statement for both setting it as an output and setting it high for each one of them i would need eight statements here otherwise rather than this for loop so that's pretty versatile and that technique as you'll see is being used again within the loop over here now first i need to get the value of the potentiometer so i'm doing this all in one statement in the statement i'm doing an analog read of the speed control which gives me the value and i'm using that with a map command and the map command of course allows me to map a range and so i'm taking the range of 0 to 1023 which is the range that the 10 bit a d converter on the arduino is going to produce and i'm setting that to a range between 40 at the low end and 400 at the high end now you can adjust this as required and there's a couple of adjustments you can make the low number over here will indicate how fast this can go because this is determining a time delay in milliseconds so you can decrease this to make the chaser go even faster the high number is how slow it can go now also the way i've got it wired up right now the potentiometer as you turn it to the right it slows down now you may find that counter-intuitive and you could either wire the power and ground on the pot backwards or simply reverse these two last values on the map command so it's pretty versatile there and that is all assigned to the speed value and then we're just going to cycle through everything so we do another for loop and we're going to go through the for loop and for each one of the elements and you remember again we're going over to 11 10 9 and eight so we'll start off with pin 11 and we'll set the output low because just like our relay module the ssr modules are active low so a low turns them on then we'll go through the delay period and then we'll set the output high to turn it off and by the way that's why i set everything high at the beginning here so it'll all start off as off and then it'll go through the cycle through the other elements of the array and do the same thing and the effect will be that the lights will appear to chase and so there's our sketch as you can see it's pretty simple let's go and hook it all up and take a look at it working and so here we are the marquee on the dronebot theater is working quite well as you can see the incandescent lights are scanning now you'll notice on mine i have eight incandescent lights instead of four what i've done is i've just placed each lamp in parallel and you can do that to extend the chaser to more than four lights you could put eight lights on there you could probably even put 12 lights on there just remember that that will increase the current draw and so make certain that both your power supply and the solid-state switch modules you're using are capable of it although these modules are certainly capable of much more than what i'm using over here now i don't know if you can see that but there is a red led for each one of the solid state switches and it is also dancing back and forth it's a little hard to capture on the camera so i'm not sure if you're getting it now here's the potentiometer i'm using for speed and if i bring it down more toward over here you can see that i've got quite a bit of speed and that's about the top speed for the marquee now we'll bring it up and this is about the lowest speed for it which is actually pretty low one thing you will notice when you're adjusting the speed is that there's a slight delay between the adjustment and when it takes effect like if i move it back to full speed over here it did take a small delay and the reason for that you can see when you look at the code it's measuring the value of the potentiometer voltage at the beginning and then it's going through the cycle and so it doesn't go back and measure that voltage until it's finished its cycle and that's the reason for the slight delay but inside from that it seems to be working pretty well and you could expand upon this of course to add more led excuse me incandescent legs on it you could expand on it as i said by paralleling these and actually make a proper marquee with real full-size light bulbs so solid-state switches and relays are ideal ways of controlling ac devices with a microcontroller like an arduino however this still involves getting you to wire things onto your ac line and as i've been pointing out throughout this video that is not very safe unless you know exactly what you're doing and take all the proper precautions even if you do that you still end up with a device that has not been certified by your local authorities to run on your ac line and that can be a serious situation if that device causes a problem and causes some damage in your home you may find that not only are you not insured for that damage you could even be sued for liability if you damage something else so these are the kind of things we like to try to avoid and an easy way of avoiding it is by using a device like what i'm about to show you this is a device called an iot control relay and essentially is a relay in a box assembled with all of the circuitry that is required to interface it to an arduino or any logic level device it's a sealed box that has been assembled in the united states and certified for use in both the us and canada and there are equivalent boxes for uses in different areas of the world so let's go and take a look at the iot control relay and how it can simplify all of our designs for controlling ac with an arduino now this is the iot relay and as you can see it's a small box with four outlets on and it sort of looks like a very small power bar and it comes with a very small power cord which plugs into the side over here on the side over here is what's interesting about this this is a connector that you can pull out if you really work at it and it's got screw terminals so you can attach a couple of wires to it and this is the input the trigger for this device and it works uh with both dc and ac voltage it works from 3.3 to 60 volts dc so you can use 3.3 or 5 volt logic or a number of other things that trigger this but you can also use 12 to 120 volts ac to trigger this so it's quite versatile in that respect it's got a power light it's got a switch which is also a circuit breaker and as i said four outlets and the way the outlets are wired are these two are normally off so they will be switched on whenever it's triggered by the input signal over here and this one is normally on so this will be switched off whenever the input signal comes in and that makes sense because inside this box is just a relay and this outlet is always on and so you could use that to power up the device that you're triggering with such as an arduino or something so it's a very versatile little box it's got some mounting screws over here in case you want to bolt it down to something and i think this would be a great way to control things with an arduino or any microcontroller or microcomputer without having to worry about dealing with high voltage now this is a model made for 120 volts ac but you can also get models that are made for the 240 volt market with the different outlets that you would use in different countries and so it's a great way to attack things without having to worry about working with high voltages okay now here's a quick demonstration of the iot switch i've got an arduino hooked up to the switch and i've also got a very ugly lamp over here attached to it now the switch is off right now but i'll turn it on and as you can see i'm controlling the very ugly lamp with the arduino now i haven't shown you a sketch for this but let me give you a clue i've attached the input here one side to ground the negative side and the positive side of attack to pin 13. so can you guess what sketch i'm running if you said the blink sketch you are correct this is just simply the blink sketch running onto this iot switch and controlling this load over here in this case the rather ugly lamp and this is a very versatile device that you could use and of course you don't have to worry at all about working with high voltages and i think that is the beauty of such an arrangement and there are several different models of this from this company from other companies you can also get these switches that have built-in wi-fi so you can get them remotely activated etc and so these are really great for iot projects and just basically automating anything around your home and so there you go the blink sketch on steroids so as you can see controlling ac devices with an arduino is actually fairly simple especially when using things like relays and solid state switches again i want to emphasize that if you do decide to work with these devices do it safely have a set up on your workbench where you can reduce the ac voltage down to a safe level before you work with it or just eliminate all of the workbench experimentation altogether and purchase something like an iot control relay for your arduino experiments with ac now if you'd like some more information about what we talked about today you'll find an article that accompanies this video on the dronebotworkshop.com website and there's a link right below the video to that article while you're on the website you might want to consider signing up for the newsletter it's not a sales letter it's just a newsletter that i send out every now and then to let you know what's going on in the workshop and keep you up to date with things that are happening over here if you want to stay up to date with electronics or to discuss electronics with like-minded individuals the very best place to go is the dronebot workshop forums and you will find a link to the forum below this video as well and if you have not subscribed to the youtube channel well please do that i would be very honored if you would i do a number of videos about working with diy electronics arduinos esp32s raspberry pi's iot and a number of other subjects and i would love to have you as a subscriber just click on the subscribe button that you see below the video and after you do that also please click on the bell notification and that will let you know whenever i make new videos so until i do make a new video please take care of yourselves and i hope to see you again very soon here in the dronebot workshop goodbye for now [Music] you
Info
Channel: DroneBot Workshop
Views: 79,140
Rating: 4.9468637 out of 5
Keywords:
Id: H8FrL37Z7xE
Channel Id: undefined
Length: 43min 45sec (2625 seconds)
Published: Sun Oct 18 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.