4 channel relay board 5v-bluetooth compatible for arduino

12
4 Channel Relay Board -Bluetooth www.researchdesignlab.com Page 1 4 CHANNEL RELAY BOARD- BLUETOOTH

Upload: raghav-shetty

Post on 19-Jan-2017

529 views

Category:

Technology


2 download

TRANSCRIPT

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 1

4 CHANNEL RELAY BOARD- BLUETOOTH

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 2

Table of Contents OVERVIEW ..................................................................................................................................................... 3

FEATURES .................................................................................................................................................. 3

APPLICATION DIAGRAM ............................................................................................................................ 4

Bluetooth Module HC 05 .............................................................................................................................. 5

SPECIFICATION .......................................................................................................................................... 5

APPLICATION ............................................................................................................................................. 5

CIRCUIT DIAGRAM ........................................................................................................................................ 6

EXPERIMENTAL SETUP .................................................................................................................................. 7

RELAY SHIELD ARDUINO CODE ................................................................................................................. 8

4-RELAY SWITCH BOARD ANDROID APPLICATION .................................................................................. 11

RELATED PRODUCTS ................................................................................................................................... 12

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 3

OVERVIEW Bluetooth technology is a short distance communication technology used by almost all phones

including smart phones and all laptops. This technology find very wide uses including that of Home & Industrial automation.

The Relay shield is capable of controlling 4 relays. The max switching power could be 12A/250VAC or 15A/24VDC. It could be directly controlled by Arduino through digital IOs.

FEATURES

• 4-channel Relay. • With Bluetooth wireless interface.

• Arduino compatible.

• 4 SPDT Relay channels (10A 277VAC,10A

120VAC, 5A 250VAC).

• Power supply:5VDC 1AMP

• Current consumption: 400 mA.

• LED indication for relay & power supply.

• Design based on highly proven IC ULN2803

as driver.

• High quality PCB FR4 Grade with FPT

Certified.

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 4

APPLICATION DIAGRAM

front view

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 5

back view

Bluetooth Module HC 05

Serial port Bluetooth, Drop-in replacement for wired serial connections, transparent usage. You can use it simply for a serial port replacement to establish connection between MCU and GPS, PC to your embedded project and etc.

SPECIFICATION • Bluetooth protocol: Bluetooth Specification v2.0+EDR

• Frequency: 2.4GHz ISM band

• Modulation: GFSK(Gaussian Frequency Shift Keying)

• Emission power: =4dBm, Class 2

• Sensitivity: =-84dBm at 0.1% BER

• Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps

• Security: Authentication and encryption

• Profiles: Bluetooth serial port

• Power supply: +3.3VDC 50mA

• Working temperature: -20 ~ +75 Centigrade

• Dimension: 26.9mm x 13mm x 2.2 mm

APPLICATION

• Computer and peripheral devices

• GPS receiver

• Industrial control

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 6

• MCU projects

CIRCUIT DIAGRAM

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 7

EXPERIMENTAL SETUP

Note: remove USB after uploading the code, DC 12V 1A must be plugged in.

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 8

RELAY SHIELD ARDUINO CODE /* Software serial multiple serial test Receives from the hardware serial, sends to software serial. Receives from software serial, sends to hardware serial. The circuit: * RX is digital pin 10 (connect to TX of other device) * TX is digital pin 11 (connect to RX of other device) Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 Not all pins on the Leonardo support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). Software serial multple serial test Receives from the hardware serial, sends to software serial. Receives from software serial, sends to hardware serial. The circuit: * RX is digital pin 2 (connect to TX of other device) * TX is digital pin 3 (connect to RX of other device) SENDING DATA FORMAT 1N TO ON RELAY1 1F TO OFF RELAY1 2N TO ON RELAY2 2F TO OFF RELAY2 3N TO ON RELAY3 3F TO OFF RELAY3 4N TO ON RELAY4 4F TO OFF RELAY4 This example code is in the public domain. */

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 9

#include <SoftwareSerial.h> SoftwareSerial mySerial(2, 3); // RX, TX int rec; void setup() { pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); mySerial.begin(9600); } void loop() // run over and over { while(!mySerial.available()); rec=mySerial.read(); if(rec=='1') { while(!mySerial.available()); rec=mySerial.read(); if(rec=='N') digitalWrite(4, HIGH); else if(rec=='F') digitalWrite(4, LOW); } else if(rec=='2') { while(!mySerial.available()); rec=mySerial.read(); if(rec=='N') digitalWrite(5, HIGH); else if(rec=='F') digitalWrite(5, LOW); } else if(rec=='3') { while(!mySerial.available()); rec=mySerial.read(); if(rec=='N') digitalWrite(6, HIGH);

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 10

else if(rec=='F') digitalWrite(6, LOW); } else if(rec=='4') { while(!mySerial.available()); rec=mySerial.read(); if(rec=='N') digitalWrite(7, HIGH); else if(rec=='F') digitalWrite(7, LOW); } }

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 11

4-RELAY SWITCH BOARD ANDROID APPLICATION

4 Channel Relay Board -Bluetooth

www.researchdesignlab.com Page 12

SOFTWARE DOWNLOAD LINK

https://drive.google.com/folderview?id=0BzrGD4zr88GnSkt5aUJMZ3Y0dnM&usp=sharing#

RELATED PRODUCTS

RDL UNO ATMEGA- 328 12V-2A DC ADAPTER

DEVELOPMENT BOARD

FT232 BREAKOUT BOARD Bluetooth Module HC 05