Arduino Relay Control Tutorial




LED Blinking is a very common and almost first program for every embedded learner or beginner. In which we blink an LED with having some delay. So today we are here with the same project but here we will use an AC bulb instead of normal LED and will blink an AC bulb.

Arduino Relay Control Tutorial

Whenever we need to connect any AC Appliance in our embedded circuits, we use a Relay. So in this arduino relay control tutorial we will simply learn How to interface a Relay with Arduino. Here we are not using any Relay Driver IC like ULN2003 and will only use an NPN transistor to control relay.

Components Required:

  1. Arduino
  2. 5v or 6v relay
  3. AC appliance or Bulb
  4. BC547 transistor
  5. 1k resistor
  6. Breadboard or PCB
  7. Connecting jumper wire
  8. Power supply
  9. 1n4007 diode
  10. Screw terminal or terminal block

Relay:

Relay is an electromagnetic switch, which is controlled by small current, and used to switch ON and OFF relatively much larger current. Means by applying small current we can switch ON the relay which allows much larger current to flow. A relay is a good example of controlling the AC (alternate current) devices, using a much smaller DC current.  Commonly used Relay is Single Pole Double Throw (SPDT) Relay.

When there is no voltage applied to the coil, COM (common) is connected to NC (normally closed contact). When there is some voltage applied to the coil, the electromagnetic field produced, which attracts the Armature (lever connected to spring), and COM and NO (normally open contact) gets connected, which allow a larger current to flow. Relays are available in many ratings, here we used 6V operating voltage relay, which allows 7A-250VAC current to flow.

READ  BLINKING AN LED USING AN ARDUINO UNO (EXPLAINED)

The relay is always configured by using a small Driver circuit which consists a Transistor, Diode and a resistor. Transistor is used to amplify the current so that full current (from the DC source – 9v battery) can flow through a coil to fully energies it. The resistor is used to provide biasing to the transistor. And Diode is used to prevent reverse current flow, when the transistor is switched OFF. Every Inductor coil produces equal and opposite EMF when switched OFF suddenly, this may cause permanent damage to components, so Diode must be used to prevent reverse current. A Relay module is easily available in the market with all its Driver circuit on the board or you can create it on perf board or PCB like below. Here we have used 6V Relay module.

Here to turn on the Relay with Arduino we just need to make that Arduino Pin High (A0 in our case) where Relay module is connected. Below given is Relay Driver Circuit to build your own Relay module.

Arduino Relay Control Tutorial Schematic

Read More: Arduino Relay Control Tutorial

 




Leave a Comment

*
= 5 + 3

(Spamcheck Enabled)

Read previous post:
Arduino Voltmeter Prototype

In this instructable, I'll show you how to make a simple arduino voltmeter. It can measure voltages in excess of...

Close
Scroll to top