0% found this document useful (0 votes)
520 views5 pages

Arduino Bluetooth Ralay 4ch

The document provides instructions for connecting a 4-channel relay module to an Arduino board via Bluetooth to enable remote control of relays using an Android app. It includes wiring diagrams, the Arduino code to control the relays based on input from the Bluetooth module, instructions for pairing the Bluetooth module with an Android device, and recommendations for related products.

Uploaded by

Raul Lara Rocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
520 views5 pages

Arduino Bluetooth Ralay 4ch

The document provides instructions for connecting a 4-channel relay module to an Arduino board via Bluetooth to enable remote control of relays using an Android app. It includes wiring diagrams, the Arduino code to control the relays based on input from the Bluetooth module, instructions for pairing the Bluetooth module with an Android device, and recommendations for related products.

Uploaded by

Raul Lara Rocha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

TUTORIAL

Arduino Bluetooth fo Arduino.apk

1. Wiring With Relay Modul 4CH

SHARE This:
2. Code Program Arduino
Copy code program below to arduino IDE project

/*
Relay IN1 connected to PinOut 2 Arduino
Relay IN2 connected to PinOut 3 Arduino
Relay IN3 connected to PinOut 4 Arduino
Relay IN4 connected to PinOut 5 Arduino
--->you can connected to relay modul 4 channel

Serial data sending from Arduino Bluetooth Relay 4CH.apk


data '1'-'4' to on is Ralay CH 1-4
data 'A'-'D' to off is Ralay CH 1-4
data '9' to on ALL CH 1-4
data 'I' to off ALL CH 1-4
*/

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); //Pin10 RX , Pin 11 TX connected to--> Bluetooth TX,RX

#define relay1 2
#define relay2 3
#define relay3 4
#define relay4 5

char val;
void setup() {
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
mySerial.begin(9600);
Serial.begin(9600);
}

void loop() {
//cek data serial from bluetooth android App
if( mySerial.available() >0 ) {
val = mySerial.read();
Serial.println(val);
}
//Relay is on

SHARE This:
if( val == '1' ) {
digitalWrite(relay1,LOW); }
else if( val == '2' ) {
digitalWrite(relay2,LOW); }
else if( val == '3' ) {
digitalWrite(relay3,LOW); }
else if( val == '4' ) {
digitalWrite(relay4,LOW); }
//relay all on
else if( val == '9' ) {
digitalWrite(relay1,LOW);
digitalWrite(relay2,LOW);
digitalWrite(relay3,LOW);
digitalWrite(relay4,LOW);
}
//relay is off
else if( val == 'A' ) {
digitalWrite(relay1,HIGH); }
else if( val == 'B' ) {
digitalWrite(relay2,HIGH); }
else if( val == 'C' ) {
digitalWrite(relay3,HIGH); }
else if( val == 'D' ) {
digitalWrite(relay4,HIGH); }
//relay all off
else if( val == 'I' ) {
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
}

//Arduino project created by: pujar


//www.mutekla.com
//Apk Android remote controll suport this project, download on Playstore:
//Arduino Bluetooth Relay 4CH.apk
//https://play.google.com/store/apps/details?id=dev.merahkemarun.arduinobluetoothrelay4ch

SHARE This:
3. Try APPS and Pair Bluetooth Modul to Android Device

SHARE This:
4. Recommendation product Best seller from Amazon.com

Product Name Price Link Image


IEIK UNO R3 Board $8.99 http://amzn.to/219BA4L
ATmega328P with USB Cable
for Arduino

HC-05 Wireless Bluetooth Host $8.99 http://amzn.to/1U8v2S7


Serial Transceiver Module
Slave and Master RS232 For
Arduino
4 Channel DC 5V Relay Module $6.99 http://amzn.to/1U8u8Fg

8 Channel DC 5V Relay Module $8.98 http://amzn.to/1XbBtY3

120pcs Multicolored 40pin Male $9.99 http://amzn.to/22TGODi


to Female, 40pin Male to Male,
40pin Female to Female
Breadboard Jumper Wires
Ribbon Cables Kit

Complete Starter Kit for Arduino $52.99 http://amzn.to/1regjut

37-in-1 Sensor Module Kit for $28.68 http://amzn.to/1UCzIwz


Arduino

SHARE This:

You might also like