Sunday, September 16, 2012

Bluetooth Power Strip

                                                      SUMMARY
OK, I have being working with RN-42 to do a Bluetooth Power Strip. I have seeing online that people have done it and it is not that difficult of course if using a Bluetooth Module like the RN-42. All you need is a Microcontroller and a Bluetooth chip. I will also include a timer. This timer will be base on microcontroller timer to turn the output of the power strip ON/OFF, which of course is just a relay. So I just have to work on making a timer with the microcontroller and then I will have to write code on the phone to pass the timer that I want to put to a specific output.

                                                       DETAIL
PHONE PART: I will be writing code for Android to send signal to the RN-42. I will also make the phone interface send a value of 1, 2, 3, etc... So I will use this for the timer, so if I send a 1, then it will do a 1 hour timer. If I send a 2 over it will do a 2 hour timer, which will turn off the output socket that you have pick.


RN-42 and PIC16F1823: The RN-42 does all the Bluetooth Communication for you and the Microcontroller will just receive the 1, 2, 3 from the RN-42. So I will do a timer for the PIC16F1823. Another option that I will do is add a separate timer chip so I get accurate timing, because If I use the timer from the PIC itself, it will not be that reliable.

Output Socket: Well, here it is just using a relay to pass the AC voltage coming in to the specific socket. Just make sure the rating for the relay is acceptable for what you will put there.


2 comments:

  1. This is really a neat design. I am also planning to develop something similar with little bit of variant.

    It will be really great if you can advise me on couple of questions? like RN-42 and micro controller comes with such default functionality or we need to program it our self for 1,2,3,.. commands?

    It will be great if you can share your email address.

    Thanks!
    Jaydeep

    ReplyDelete
  2. My E-mail: jerezwilliam@aol.com

    I will not work on this project too much because my wife gave birth to our first baby (girl)and we do not get much sleep and with work I am all book until she grow at least sleeps through the night in hopefully 5months from now.

    But to answear your question.
    (1) You DO NOT HAVE TO PROGRAM THE RN-42, it does all the pairing and TX/RX for you just look at this link how you can send data without a microcontroller.
    http://www.circuitsathome.com/diy-2/testing-rn-42-bluetooth-module-using-android-phone

    (2) You WILL HAVE TO PROGRAM THE MICROCONTROLLER, you can use anyone you like, the only thing you have to program your microcontroller is to listen for data coming into the RX pin of the microcontroller on a while loop or interrupt and then do if statements to then turn on the relay ON/OFF.

    (3) The timing could be done either in the cellphone (but it means that the cellphone has to stay close by with BT enable to send a off signal after 1hour), *** Not a good method.

    ****BEST METHOD, just do a timing loop in your microcontroller so after 1hours it turns off the relay.

    ReplyDelete