Interfacing Relay To Microcontroller

Relays are devices which allow low power circuits to switch a relatively high Current/Voltage ON/OFF. For a relay to operate a suitable pull-in & holding current should be passed through its coil. Generally relay coils are designed to operate from a particular voltage often its 5V or 12V. The function of relay driver circuit is to provide the necessary current (typically 25 to 70ma) to energize the relay coil.
Interfacing Relay To Microcontroller - schematic

Figure 1 shows the basic relay driver circuit. As you can see an NPN transistor BC547 is being used to control the relay. The transistor is driven into saturation (turned ON) when a LOGIC 1 is written on the PORT PIN thus turning ON the relay. The relay

Recommended videos

  • Tutorial: How to design a transistor circuit that controls low-power devices
    Duration: 21:41.
  • How To Make A Simple Relay Circuit
    Duration: 7:40.
  • Microcontroller interface to Relays by ULN 2003
    Duration: 9:57.


  • Predict and measure performance (MAGAZINE)
    LEDs Magazine
    LEDs Magazine The upshot of this is that HB LEDs need to be attached to a type of circuit board that is specially engineered to transport heat by conduction through to a heat sink. The board types are known by names including insulated metal
     21 November 2016
  • Elektor (blog)
    Elektor (blog) This is ideal for products in which boards are mounted at different angles to each other and there is no requirement for ongoing flexibility. The circuit board only needs to be bent into the desired shape once, during assembly
     28 July 2016
  • In practice, resistor non-idealities can affect parameters such as common mode rejection ratio (CMRR), harmonic distortion and stability. For instance, as shown in Figure 1, a single-ended amplifier configured to level-shift a ground
     3 October 2013