Bluetooth Controlled Relay

Bt Relay Banner
A relay is an isolated switch, there is no connection between the switching device and the connection. Relay is often used when controlling high voltage devices so that the intricate low voltage devices will not be damaged.

There are many types of relays but the most commonly used ones are electromechanical relays. They are cheap, simple and provide very good isolation between the control circuitry and the connection.

The diagram below shows the inner workings of a typical electromechanical relay.

relay-pump-circuit-diagram[1]

The control circuitry is connected to a coil in the relay, and when the relay is energized, it will create a temporary magnetic field that will cause the relay contact to close and complete the circuit on the other side of the relay (usually a high voltage circuit).

Relays usually come in a box shape, like the ones I got below.

IMG_1005

On the left is a 5V relay and on the right is a 24V relay. What this means is that the relay on the left requires just 5V to energize the relay coil while the one on the right requires 24V. Depending on the application, a 24V relay may be used if lets say a microcontroller wants to detect whether there is a 24V input.

IMG_1006

These relays are rated to conduct up to 240V AC @ 10A or 30V DC @ 10A.

Below is a schematic diagram on how to connect a relay, I used an LED to display whether the relay is turned on or off.

relay_sch

Since this is a very simple circuit, I built it on a donut board.

IMG_0998

IMG_1000

The relay requires 3 connections, 5V, Ground and an Output pin from a microcontroller. The two connections on the screw terminal block will be shorted when the relay is turned on.

I plan on using Bluetooth to control the relay, so I used a bluetooth module highlighted in my previous post.

IMG_0769

I programmed the Arduino to turn the relay on or off upon receiving an ‘o’ input. It will also print out the status of the relay. You can download this code at the end of the article.

bt_relay_code

IMG_1002

Here is a video demonstration :

Download Code

  1. Luciano12-05-2015

    hi
    how make this project with relay 12v ?
    I can use the same trasistor ?

    tnks

  2. Johnathan12-02-2015

    What’s up mates, how is all, and what you want to say on the topic of this
    article, in my view its in fact remarkable in support of me.

  3. Jp Villanueva06-05-2015

    it is applicable to use a 12V DC input relay? and add some functions, for out off range.

  4. Jp Villanueava06-05-2015

    im going to use your project sir for my dissertation, but i will put it into a motorcycle for safety purpose. but anyway sir, what if the Bluetooth reach its limitation specially in range? it will automatically turned off?

  5. Great post. I am dealing with some of these issues as well..

  6. Deneen05-28-2014

    I’m not sure why but this blog is loading incredibly slow for me.

    Is anyone else having this issue or is it a problem on my end?
    I’ll check back later and see if the problem still exists.

  7. Thhank you for another informative website.

    Where else mayy just I am getting that tyype of info writtenn in such an ideal means?
    I havve a challenge that I’m just now working on, and I have been on tthe glance out
    for sudh information.

  8. If you wish for to increase your familiarity simply keep visiting this web
    site and be updated with the hottest gossip posted here.

  9. I don’t even know how I stopped up here, but I assumed this post was great.
    I don’t recognize who you might be however definitely you’re going to
    a well-known blogger if you happen to are not already.
    Cheers!

  10. instagram05-20-2014

    Hi Dear, are you truly visiting this web page daily, if so afterward you will definitely get nice know-how.
    instagram is always good for your instagram marketing
    instagram
    instagram Simply no Security password in addition to With no
    Next.

  11. Charolette04-29-2014

    Wow, that’s what I was exploring for, what a material!

    existing here at this blog, thanks admin of this website.

  12. I loved as much as you’ll receive carried out riggt here.
    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you commannd gget bought an shakiness ovfer
    thawt you wish be delivering the following. unweell unquestionably come more formwrly again ass exactly the same nearly very offten
    inside case you shield this increase.

  13. Jeff11-18-2013

    I like the project. I am looking to do something similar. A small form factor and cost (<$15.00) is critical and also would need to be used on Apple and Android devices. Basically I need to control a relay or FET through a bluetooth signal and do not need the other features of hte Arduino. Would you be interested in assisting?

    • Wai Hung11-19-2013

      Hi. The bluetooth protocol that I’m relying on here is called the Serial Port Profile – SPP.
      Unfortunately it is not supported by iOS devices so programming a bluetooth app would be a lil harder. An alternative would be to jail break or use BT 4.0 BLE.

      The schematics for FET would be very similar to the relay I’ve shown here.

      I would glad to assist in any way I can.

      Thanks for dropping by.

  14. We have been a small grouping of volunteers along with commencing the latest scheme inside our group. Your internet site supplied you along with worthwhile info to figure in. You have carried out an outstanding task and our own full local community may be grateful back.

  15. vick06-22-2013

    Do you connect the COM ? Or I just need to connect the 2 coil only ?

    • Wai Hung06-23-2013

      The 2 connection for the coil is just to activate the relay.
      You see the two pin screw terminal block? They are connected to COM and NO. I didn’t connect anything to them in this example though.
      But if you want to switch a higher voltage device on, you connect them to the COM and NO.

  16. Maharaj04-29-2013

    hi, this is maharaj, Im doing a project with arduino for locking a car from mobile
    the car actuator is actually controlled with 12v DC car lock actuator, can i control it with this relay.
    i mean actually can i have the same project above byt connecting the lock system connected with the relay terminal.

    and one more thing in the program u made ‘o’ for initiation can i make a ‘nested if’ to have a multiple operation with the single board

    • Wai Hung04-29-2013

      This relay supports up to 30V, so no problem with 12V.

      About the nested if, you should be able to perform few different tasks.

Leave a Reply to Deneen Click here to cancel reply.