..Where art and science come together!

DIY Home Automation with Android

Image

This tutorial will show you how to add a 5V relay to any 120V home circuit. Please refer to the tutorial “Using Android to control Arduino via Bluetooth” to interface the HC05/06 Bluetooth Module.

WARNING: If you are unsure of anything, do not energize the cct. until you have a clear understanding of how a relay works.

For this project, i used a single Keyes_SR1y relay module. You can find these…

View On WordPress

Reblogged from factormagazine  5,382 notes
thebiopsy:

What if your heart could beat perfectly until your last days? Theoretically, that’s now possible.Scientists at Washington University and University of Illinois have combined electrical engineering, 3D printing, and biology to create a custom thin mesh of electrodes that lays over the heart to correct improper cardiac impulses, ensuring the heart beats the right way every time. This has huge implications for patients who suffer from myocardial infarctions, arrhythmias, and more. Click here to read more. Science is pretty cool.

thebiopsy:

What if your heart could beat perfectly until your last days? Theoretically, that’s now possible.

Scientists at Washington University and University of Illinois have combined electrical engineering, 3D printing, and biology to create a custom thin mesh of electrodes that lays over the heart to correct improper cardiac impulses, ensuring the heart beats the right way every time. 

This has huge implications for patients who suffer from myocardial infarctions, arrhythmias, and more. Click here to read more

Science is pretty cool.

Android—Arduino control via Bluetooth

Recently, I’ve noticed many projects incorporating Android-Arduino communication. One of the easiest (and cheapest) ways of achieving this is to use a HC-05/06 Bluetooth module. You can pick one up from amazon.ca for ~$15.

For this project, i used a Galaxy S3 to independently control 4 LED’s. You will need to download the app ‘Arduino Bluetooth Terminal’, which is available for free on the Play Store.

To hookup the bluetooth module, connect the 5v and GND to their corresponding arduino headers of the same name. For the TX/RX pins, use digital pins 10(TX) and 11(RX).

Image

You’re indicator led on the HC-05/06 should now start blinking.

To pair your android to the module, use the passcode “1234″. Try “0000″ if that does not work. Once paired, the indicator led should now be constant ON.

To set-up the simple LED cct, please refer to the the picture below. Note the GREEN, BLUE, RED, and WHITE led’s are powered by digital pins 4, 5, 6, and 7, respectively.

Image

Almost finished!

Upload this sketch to your board:

#include <SoftwareSerial.h>

SoftwareSerial bluetooth(10, 11); // RX, TX
int ledGRN = 4;
int ledBLU = 5;
int ledRED = 6;
int ledWHI = 7;
int BluetoothData;

void setup()
{
  bluetooth.begin(9600);
  pinMode(ledGRN,OUTPUT);
  pinMode(ledBLU,OUTPUT);
  pinMode(ledRED,OUTPUT);
  pinMode(ledWHI,OUTPUT);
}

void loop()
{
   if (bluetooth.available())
   {
     BluetoothData=bluetooth.read();

     if(BluetoothData==’1′)
       {  
         digitalWrite(ledGRN,1);
         bluetooth.println(“GREEN ON”);
       }

      if(BluetoothData==’2′)
       {  
         digitalWrite(ledBLU,1);
         bluetooth.println(“BLUE ON”);
       }

      if(BluetoothData==’3′)
       {  
         digitalWrite(ledRED,1);
         bluetooth.println(“RED ON”);
       }

      if(BluetoothData==’4′)
       {  
         digitalWrite(ledWHI,1);
         bluetooth.println(“WHITE ON”);
       }

      if (BluetoothData==’0′)
       {
         digitalWrite(ledGRN,0);
         digitalWrite(ledBLU,0);
         digitalWrite(ledRED,0);
         digitalWrite(ledWHI,0);
         bluetooth.println(“LED’S OFF”);
       }

    }
      delay(100);
}

Now you should be able to turn on the 4 LED’S by entering the numbers ’1 2 3 4′, and turn them off by pressing ’0′.

Image

Think of all the possibilities that are now open to you! For example, you could control any 120V cct. by simply adding a relay, instead of powering a led. Remember, creativity is limitless!

Leave your questions & comments below.