arduino 12v output


We can do that using relays relay is actually a switch which is electrically operated by an electromagnet. The electromagnet is activated with a low voltage, for example, 5 volts from a microcontroller, and it pulls a contact to make or break a high voltage circuit. As an example for this tutorial, I will use these two channel relay module HL 52s, which case 2 relays with rating of 10 amps at 210 and 50 and 125 volts ac and 10 amps at 30 and 28 volts DC. The high voltage output connector has three pins. The middle one is the common pin and, as we can see from the markings here, this pin is the one for normally open connection and the other one is for normally close connection on the other side of the module. We have these two sets of pins. The first one has four pins ground and VCC pin for powering the module and two input pins in one end into the second set of pins has twist pins with a jumper between the GD, VCC and VCC. Pin with a configuration like this, the electromagnet of the relay is directly powered from the Arduino board and if something goes wrong with the relay, the microcontroller could get damaged for better understanding. Let’S see the circuit schematic of the relay module in this configuration. So we can see that the 5 volts from our microcontroller, connected to the VCC pin for activating the relay through the opto coupler IC, are also connected to the GD VCC pin, which powers the electromagnet of the relay.

So in this is we got no isolation between the relay and microcontroller in order to isolate the microcontroller from the relay, we need to remove the jumper and connect separate power supply for the electromagnet to the GD, VCC and ground. Pin now, with this configuration, the microcontroller doesn’t have any physical connection with the relay, so it just uses the LED light of the opto coupler. I see to activate the relay. There is one more thing to be noticed from this circuit schematic the input pins of the module work inversely. As we can see, the relay will activate when the input pin will be low, because in that way the current will be able to flow from the VCC to the input pin which is low or ground and LED will light up and activate the relay. When the input pin will be high, there will be no current flow, so the LED will not light up and the relay will not be activated. Ok. Now, before we continue with this tutorial, I will warn you here that we will use high voltage, which, if incorrectly or improperly used, could result in serious injuries or debt, so be very cautious of what you are doing, because I take no responsibility for any of your Actions now I will proceed with this tutorial and explain how to use the relay module with the high voltage devices. First let’s take a look at the circuit diagram, as previously described.

I will use a 5 volt adapter as separate power supply for the electromagnet connected to the GD VCC and ground. Pin the Arduino is 5 volts pin will be connected to the VCC pin of the module and pin number 7. The in one input pin for controlling the relay now for the high voltage part. We need a power plug a socket and a cable with two wires. One of the two wires will be cut and connected to the common and normally open, pin of the mode output. Connector, so with this configuration when we will activate the relay, we will get the high voltage circuit closed and working here is how I made the cable. So I bought a plug, a socket and a cable like this. Then I carefully cut the cable and cut one of the wires like this and connected them to the normally open connection piece of the relay module. Also, I connected the ends of the cable to the plug and socket like this and here’s. The final appearance of my cable ready for use, however, before you use your cable, make sure it’s working properly, you can check it using multimeter or test it with a low voltage first. Okay, now what’s left for this tutorial is to make a simple, coat and taste the relay module, how it will work here’s, the simple code. We will just use the pin number seven for controlling the relay, so we will define it as output and make a program that will just activate and deactivate the relay each three seconds.

I will mention once again here that the input of the module works inversely. So a logic low at the input will actually activate the relay and vice versa, here’s. The demonstration of this example I tested three devices on it. First, a hundred watt light bulb, then a desk lamp and a fan heater. All of these devices work on 220 volts. So that’s how we can control any high voltage device using Arduino or actually any other microcontroller and, of course the possibilities are now unless, for example, we can control the devices using the TV, remote, Bluetooth, SMS internet and so on.


arduino 12v output Video







arduino 12v output news








arduino 12v output Social






👋 Want to bring Tony Stark-like gesture control to your projects? Learn how with the BLE-enabled MKR WiFi 1010 and Nano 33 BLE Sense boards using the ArduinoBLE library.
safe image.php?d=AQDyi1ELcW4VGzhx&w=720&h=720& dChOhNMmeF - arduino 12v output

Arduin-yo ho ho! A fairground favorite, the pirate ship is a fun way to explore the oscillation of a pendulum. How much fun, you ask? Access our Science Kit Physics Lab preview and see for yourself:

🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today:

70537898 550174072395145 8798850142103928832 n.jpg? nc cat=102& nc oc=AQmCfMPwMf1oPpYqFhzbxfnGdbrmsjZXrEEBy1ox5Z8EJtiYMADoFNZ5mnSNRgCCY74& nc ht=scontent - arduino 12v output



Originally posted 2017-07-07 12:46:33.

(Visited 69 times, 1 visits today)

About The Author

You might be interested in

Comment (23)

  1. For me i don’t Know what is the purpose behind Low trigger Relay but it is simple to inverts them by connecting the IN1 to GND and the VCC off the relay module to a digital pin of an Arduino , the JDvcc to a 5V power

  2. Am I missing something. Should you also connect the Ground (GND) of the Arduino (next to the 5V) to the GND of the relay board?

  3. kondenzo says “dont run a hot ground!”
    my ground is black in the US, so it wont be confused with the red.
    even if it is, that might be FUN!!!!!

  4. All these people complaining about him using ground cable… Afaik, ground cable doesn’t even have any insulation.

    Probably just a matter of electrical standards. Here the live wire is black and neutral is white.

  5. I’d like to add that, if you did this and your Arduino resets sometimes when switching off your load, I’d bet that your load is inductive (motor, big relay, solenoid valve, any other electromagnetic device). You need to add a RC Snubber between the relay contacts (not the relay coil), in other words, in parallel with your load. It took me a lot of time to find this out so I hope this helps others. A 0.1uF capacitor in series with a 100ohms resistor rated for at least 1W should be enough.

    1. yes instead of 230 connect the 12 wire to the high voltage , the low voltage only actuate the coil never get close to 230 that the beauty of relays

  6. It was an informative video. But, I don’t have a ground right next to the JD-Vcc pin in my relay, can I connect the ground of the 5V power source to the other ground pin which is along with IN1, IN2 pins? Kindly clarify. Thanks

  7. You must NEVER connect the yellow-green wire directly to power line!!! Yellow-green is ALWAYS the ground!!! Obviously you have some knowledge in programming and electronics but you don’t know the basics.

  8. So removing yellow jumper allows you to use adapter to provide 5v to relay and protect your arduino board from frying?

  9. this aruino does not have IR reveiver nor relay how you switching them ? what this code mean Grrrr WHY +YOU MAKING THIS SO COMPLICATED !!!

  10. I had a question, I have had a touch time finding relays that can work uptill 30A DC, but at a lower voltage of 12V. Would these work for my case?

  11. I would like to control the direction of 220 V rated 0.12 Amp DC motors using raspberry pi . I have tested it on RPI using relay to switch ON and OFF and it works fine . but to reverse the direction of this large motor ,I should have use motor drivers . I have L298 in my hand . can I use L298 for this purpose?? how do i use both the relay and the L298 together??

  12. sir for a single channel relay , there is no JDVcc . There are only three pins for vcc , In, and gnd . What should I do now. Please reply.


Your email address will not be published. Required fields are marked *