Introduction:
Our Android Home Automation project will show you how to make your home automated using an Android smartphone. This requires no experience with Android programming at all, and a free application is included for you to develop. Using this Android application you will be able to control your lights, air conditioning, and door locks all from your smartphone. This system Bluetooth to connect with your device and control the various appliances in your home.
Required Materials:
Hardware:
1. Arduino Uno
Software:
1. Arduino IDE
2. Bluetooth Android APK file https://drive.google.com/open?id=0B30b4LZ6JjxJY0ZSU3hCQTB0ZTA
3. MIT App Inventor
3. MIT App Inventor
String readString;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
while (Serial.available()) {
delay(3);
char c = Serial.read();
readString += c;
}
if (readString.length() >0) {
Serial.println(readString);
if (readString == "on")
{
digitalWrite(ledPin, HIGH);
}
if (readString == "off")
{
digitalWrite(ledPin, LOW);
}
readString="";
}
}
App Screen image:
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
while (Serial.available()) {
delay(3);
char c = Serial.read();
readString += c;
}
if (readString.length() >0) {
Serial.println(readString);
if (readString == "on")
{
digitalWrite(ledPin, HIGH);
}
if (readString == "off")
{
digitalWrite(ledPin, LOW);
}
readString="";
}
}
App Screen image:
I don't see any switching on the relay path. It appears this would stay on all the time 12 VDC is applied. The Arduino would only cause the LED to turn on and off. Shouldn't the return side of the coil circuit be tied to the collector of the BC547? I know there are more techniques, but that would seem t be the easiest of the transistor could take the relay coil current. Also, tie the diode directly to the coil contacts to get the same protection.
ReplyDeleteYup are write. Same is true for the free wheel diode. Needs be moved with the coil return
Delete