Interfacing Relay with evive

About This Tutorial
This tutorial explains interfacing of a relay module with evive for controlling high power circuits like AC bulb with help of evive.
Tutorial Info

Components Required

ImageComponentQuantityAvailable in Kit
evive1
USB A-B Cable1
5V Relay module1
    Bulb1
    • None
    Bulb Holder1
    • None

    Introduction

    In this tutorial, you will learn about the functioning of the relay and how to interface it with evive.

    A relay is a switch that is operated through an electrical signal. There are different types of relays available some of them include electromagnetic relays, reed relays, contactor, solid state relays etc. They are mainly used in controlling high power circuit with a low power signal. For example, with the help of a relay, you can control an AC bulb with evive. You can control high power AC as well as DC circuits with the relay. Relays have a wide range of application in industries as well as in a large number of robotics related projects. 

    Working of electromagnetic relays

     

    Relay Working

    A relay consists of an electromagnetic coil and a Single pole double throw switch (SPDT). An SPDT switch has one input and two outputs. As seen in the image there is a part in the symbol with marking NO, NC, and COM on it, that is an SPDT switch.

    In this COM is the input of the switch, NC means normally closed and NO means normally open. Both NC and NO are outputs of SPDT switch. The contact that connects the output to input in SPDT is called pole. The spring-like structure symbolizes an electromagnetic coil.

    When the coil is not energized NC and COM remains connected in SPDT. As soon as the coil is energized  NO and COM gets connected. Actually, when the coil is energized magnetic field is generated around it, the pole gets attracted towards this field and it shifts itself from NC to NO. Hence NO and COM get connected. As soon as coil gets de-energized coil losses its magnetic field and pole moves back to original position and NC and COM gets connected again. 

    evive Notes Icon
    Note: Whenever pole shifts from NO to NC or vice versa a sound of switching comes from relay. 

    The coil is energized by supplying an electrical signal to it. Depending upon types of signaling you can have relays like 5 V dc relay, 12 V  dc relay etc.  You can use both 5V and 12V type relay with evive. 5V relay can be controlled by any digital pin and 12V relay can be control by motor terminals of evive. Through digital pin coil of the relay is given 5V that energizes it.

    In this example, you will be controlling a 230V AC bulb with evive with help of a 5V relay. The relay will be controlled by slide switch 1 on evive.

    Specifications of relay

    • 5V  TTL control signal
    • Maximum AC current and voltage: 10A 250VAC
    • Maximum DC current and voltage: 10A 30VDC
    • 5V relay used in this example has 3 pins that are to be connected with evive. These pins are GND, VCC and Signal. 
    • The module also has an on board LED that glows whenever NO and COM gets connected.

    Circuit diagram

    Image below shows the circuit diagram of the relay with evive for controlling an electrical bulb. Here VCC and GND of the relay are connected to 5V and GND of evive respectively and Signal pin is connected to digital pin 2 on evive.

    You can use the AC supply plug available n your home for power the bulb. Out of the two wires plugged in an plug connect one to COM of the relay and one directly to bulb holder.

    evive Alert
    Be careful while using the AC supply in this project. It is advisable to work under the supervision of someone who has decent knowledge of AC supplies.

    PictoBlox Program

    Follow the steps:

    1. Open PictoBlox.
    2. Select the board as evive:
      Selecting Board
    3. Connect the evive.
      Select Port
    4. Create the following script using when evive starts up block:
      Interfacing Relay with evive
    5. Upload the code onto evive:
      Upload Code

    You can download the PictoBlox program from here: Interfacing Relay with evive

    Output

    Share this Tutorial
    Share on facebook
    Facebook
    Share on twitter
    Twitter
    Share on google
    Google+
    Share on pinterest
    Pinterest
    Share on reddit
    Reddit
    Share on print
    Print
    Related Projects & Tutorials
    Interfacing GY-521 module with evive
    In this tutorial we will interface the GY-521 module with evive. The GY-521 module contains a 3-axis accelerometer, a 3-axis gyroscope, a temperature sensor, and a digital motion processor. We will display the value of each sensor on the serial monitor.
    All articles loaded
    No more articles to load
    Featured Projects
    DIY Mini Safe Locker Using Servo
    DIY Mini Safe Locker Using Servo

    Make your own DIY mini-safe locker using components from the evive Starter Kit and control it using evive’s slide switch!

    All articles loaded
    No more articles to load

    Leave a Reply

    Close Menu
    ×

    Cart