8/10/2019 2channelbluetoothrelaymodulev6_1
1/24
2 Channel Bluetooth Relay ModuleUser Guide
8/10/2019 2channelbluetoothrelaymodulev6_1
2/24
Get in touch with us!
Please feel free to send a mail to one of the mail IDs elow or use the Contact Us !a"e athttp://www.numato.comto dro! us a #uic$ messa"e.
Technical Help
Got technical #uestions% Please write to [email protected]
Sales Team
&uestions aout ma$in" !ayments' volume discounts' academic(o!en source discounts' !urchase
orders and #uotes% Please write to [email protected]
Webmaster
&uestions()u""estions aout our wesite% Please write to [email protected]
*i$e us on +aceoo$, htt!s-((www.faceoo$.com(numato
isit our lo" http://www.numato.ccfor news' u!dates and s!ecials.
Mailing Address/umato )ystems Pvt *td
2nd +loor' 0 11' )ee$an ei"hts
Phase32' 4lectronics City
Ban"alore 5 768188
http://www.numato.com/https://www.facebook.com/numatohttps://www.facebook.com/numatohttps://www.facebook.com/numatohttp://www.numato.cc/https://www.facebook.com/numatohttps://www.facebook.com/numatohttp://www.numato.cc/http://www.numato.com/8/10/2019 2channelbluetoothrelaymodulev6_1
3/24
1 2 Channel Bluetooth Relay Module ? User Guide
Introduction/umato *a@s 2 Channel Bluetooth Relay Module is a versatile !roduct for controllin" electrical and
electronic devices remotely from a PC over Bluetooth lin$. 4ase of use and wider o!eratin" system
com!atiility are the !rimary "oals ehind this !roduct@s desi"n. Ahis sim!licity allows use of off3the3
shelf Aerminal 4mulation !ro"rams such as y!er Aerminal and PUAA: for controllin" the module with
a sim!le set of human readale commands. +or !ower users' this module can e controlled y writin"
!ro"rams in various !ro"rammin" lan"ua"es.
)ome of the !ossile uses of this module include
ome utomation
*i"htin" Control
Garden 4#ui!ment Control
Industrial utomation
Aest +i>tures
DI: and oy
Ahis !roduct is com!atile with the followin" o!eratin" systems.
indows P and later
*inu>
Mac
nd any other o!eratin" system that su!!orts Bluetooth devices.
8/10/2019 2channelbluetoothrelaymodulev6_1
4/24
2 2 Channel Bluetooth Relay Module ? User Guide
How to use the module
Ahe followin" section descries how to use this module.
Components/Tools required
lon" with the module' you may need the items in the list elow for easy and fast installation
1. 12 1 !ower su!!ly
2. Medium siHe Phili!s screw driver
Connection Details
M!"#TA$T !lease e%ercise utmost caution while wor&ing with electrical mains or other
high 'oltages. (ailure to compl) with sa*et) regulations ma) result in in+ur) and or death.
Connection Diagram
8/10/2019 2channelbluetoothrelaymodulev6_1
5/24
; 2 Channel Bluetooth Relay Module ? User Guide
Ahis module has on oard Jum!ers
8/10/2019 2channelbluetoothrelaymodulev6_1
6/24
2 Channel Bluetooth Relay Module ? User Guide
Relay Contacts
ll contacts on each relay is availale e>ternally on screw terminals for easy user access. Ahe relays are
rated for C and DC su!!ly volta"es. Please see the electrical !arameter tale
for more details. 4ach relay has three contacts
8/10/2019 2channelbluetoothrelaymodulev6_1
7/24
7 2 Channel Bluetooth Relay Module ? User Guide
GPIF(nalo" in!uts
8/10/2019 2channelbluetoothrelaymodulev6_1
8/24
6 2 Channel Bluetooth Relay Module ? User Guide
Driver Installation
indows
hen the 2 Channel Bluetooth Relay Module is Powered u! for the first time a red *4D
8/10/2019 2channelbluetoothrelaymodulev6_1
9/24
O 2 Channel Bluetooth Relay Module ? User Guide
;. )elect the second o!tion
8/10/2019 2channelbluetoothrelaymodulev6_1
10/24
E 2 Channel Bluetooth Relay Module ? User Guide
7.It will install the driver automatically
8/10/2019 2channelbluetoothrelaymodulev6_1
11/24
N 2 Channel Bluetooth Relay Module ? User Guide
6.Ri"ht clic$ on device
8/10/2019 2channelbluetoothrelaymodulev6_1
12/24
18 2 Channel Bluetooth Relay Module ? User Guide
*inu>
Ao use this !roduct with *inu>' Bluetooth device driver needs to e com!iled in with the $ernel.
+ortunately' most inu% distributions 3buntu4 #edhat4 ebian etc..5 has this dri'er pre6installed.
hen connected to a *inu> machine' this !roduct should a!!ear as a serial !ort in the (dev directory.
Usually the name of the device will e Lrfcomm> or similar. Ahe name may e different de!endin" on
the *inu> distriution you have.
Mac
)imilar to *inu>' Mac o!eratin" system comes with the re#uired drivers !re3installed. hen connected
to a Mac com!uter' the device should a!!ear as a serial !ort.
Sending Commands
Fne of the most !owerful features of this module is the sim!le easy to use command set it su!!orts.Ahe followin" sections "ive details of the command set and how to use the command set
Ahe command setAhis !roduct su!!orts a very sim!le command set that is desi"ned to e less cry!tic and easy to use
manually
8/10/2019 2channelbluetoothrelaymodulev6_1
13/24
11 2 Channel Bluetooth Relay Module ? User Guide
$o 0ommand 7%ample escription
1 ver ver Returns current firmware version.
2 idid "et
id set >>>>>>>>
Id "et reads the module ID. Id set will assi"n a new ID to the
module. L> stands for al!hanumeric characters includin"
symols. Ahe new ID must e e>actly E characters in len"th.
; relay
relay onx
Aurns a !articular relay on. Ahe !arameter LxL stands for the
relay numer. Ahe relay numer starts from Hero. )ee somee>am!les elow.
relay on 0? Aurns on relay 8
relay on 1? Aurns on relay 1
relay offx
Aurns a !articular relay off. Ahe !arameter LxL stands for the
relay numer. Ahe relay numer starts from Hero. )ee some
e>am!les elow.
relay off 0? Aurns off relay 8relay off 1? Aurns off relay 1
relay readx
Returns the status of a !articular relay. Ahe !arameter LxL
stands for the relay numer. Ahe relay numer starts from Hero.
)ee some e>am!les elow.
relay read 0? Returns status of relay 8
relay read 1? Returns status of relay 1
8/10/2019 2channelbluetoothrelaymodulev6_1
14/24
12 2 Channel Bluetooth Relay Module ? User Guide
numer that ran"es from 8 ? 182;. Please see e>am!les elow.
adc read 0? Reads analo" in!ut 8
6
"!io
"!io setx
)ets the GPIF out!ut status to hi"h. ere Lxis the numer of
the GPIF. Please see e>am!les elow.
gpio set 0? )ets GPIF 8 to hi"h state
"!io clearx
)ets the GPIF out!ut status to low. ere Lxis the numer of
the GPIF. Please see e>am!les elow.
gpio clear 0? )ets GPIF 8 to low state
"!io readx
Reads the di"ital status !resent at the in!ut mentioned. ere
Lxstands for the numer of GPIF. Ahe res!onse will e either
Lon or Loff de!endin" on the current di"ital state of the
GPIF. Please see e>am!les elow.
gpio read 0? Reads GPIF 8 status
Controllin" relays usin" )erial Aerminal 4mulator softwareAhe sim!le set of )CII ased human readale command set su!!orted y this module ma$es
controllin" relays easy with any off the shelf )erial Aerminal 4mulation !ro"ram li$e y!er Aerminal or
Aeraterm. Ahe most im!ortant thin" to rememer here is that since the module a!!ears as a serial
!ort in the o!eratin" system' treat it Just li$e any serial device you may use. )ince the underlyin"
trans!ort is U)B not R)2;2' almost all settin"s such as aud rate' !arity' numer of sto! its can e
8/10/2019 2channelbluetoothrelaymodulev6_1
15/24
1; 2 Channel Bluetooth Relay Module ? User Guide
If everythin" "oes well' you should e !resented with a lan$ screen. Press 4/A4R $ey and the
command !rom!t should a!!ear. Commands listed in the tale aove can e entered herenow.
+or e>am!le' here is the res!onse for Lver command.
8/10/2019 2channelbluetoothrelaymodulev6_1
16/24
1 2 Channel Bluetooth Relay Module ? User Guide
Aeraterm is an o!en source software. free co!y can e downloaded fromhtt!-((en.sourcefor"e.J!(!roJects(ttssh2(releases(
Run Aeraterm a!!lication and select the !ort corres!ondin" to the relay module in the L/ew
connection dialo" and clic$ F5.
Press 4/A4R $ey on the main window and a command !rom!t should a!!ear as in the ima"e
elow.
http://en.sourceforge.jp/projects/ttssh2/releases/http://en.sourceforge.jp/projects/ttssh2/releases/8/10/2019 2channelbluetoothrelaymodulev6_1
17/24
17 2 Channel Bluetooth Relay Module ? User Guide
Controlling the module using a custom program
Ahis relay module can e controlled usin" custom !ro"rams written in many lan"ua"es. lmost any
lan"ua"e can e used as lon" as it su!!orts some sort of serial communication method. )ome of the
su!!orted lan"ua"es include
C(C
isual Basic
isual Basic for !!lications
8/10/2019 2channelbluetoothrelaymodulev6_1
18/24
16 2 Channel Bluetooth Relay Module ? User Guide
Additional Information
nalo" to Di"ital Converter)ome !roducts do su!!ort nalo" to Di"ital Conversion on some of the IF terminals. list of GPIFs
that su!!orts analo" function in this !roduct is listed elsewhere in this document. Ahere is no s!ecial
command is re#uired to e>ecute to switch etween analo" and di"ital mode. 4>ecutin" Ladc
command will set the GPIF to analo" mode and e>ecutin" L"!io command will set the GPIF ac$ to
di"ital mode on the fly. Resolution of the DC is 18 its unless otherwise noted. Ahe in!ut volta"e
ran"e of the DC is 8 ? DD
8/10/2019 2channelbluetoothrelaymodulev6_1
19/24
1O 2 Channel Bluetooth Relay Module ? User Guide
etween the relay contacts and can deteriorate the contact #uality over time and reduce the life s!an
for the relays consideraly.
)o it is im!ortant to ta$e countermeasures to su!!ress the ac$ emf to acce!tale levels to !rotect
relay contacts. Usually this re#uires connectin" electronic devices in !arallel with the load such that
they asor the hi"h volta"e com!onents "enerated y the load. +or solenoids' connectin" a diode
8/10/2019 2channelbluetoothrelaymodulev6_1
20/24
1E 2 Channel Bluetooth Relay Module ? User Guide
Technical Specifications
!arameter 8 -alue 3nit
9asic Speci*ications
/umer of relays 2
/umer of GPIFs E
/umer of analo" in!uts ed with GPIFs= O
Di"ital circuit !ower su!!ly volta"e ternal= 7
Ma>imum current drawn y di"ital circuitry N7 m
9luetooth Speci*ications
Bluetooth version Class 2
Baud rate s!eeds 1'288!s to N21
5!s
Bluetooth ran"e 18 m
+re#uency 2'82 2'E8 MH
Communication Interface )PP or CI
)PP data rates 28 )lave
;88 Master
5!s
5!s
8/10/2019 2channelbluetoothrelaymodulev6_1
21/24
1N 2 Channel Bluetooth Relay Module ? User Guide
#ela) Speci*ications
/ominal relay coil volta"e 12
/ominal coil !ower consum!tion
Relay contact material "CdF
Contact ratin" 12(128 C
O(278 C
18(2 DC
Ma>imum switchin" volta"e 118 DC(28 C
Ma>imum switchin" current 17
Ma>imum switchin" !ower 1E88' ;68
Contact resistance !ectancy
8/10/2019 2channelbluetoothrelaymodulev6_1
22/24
28 2 Channel Bluetooth Relay Module ? User Guide
A
.I set a GPIF to a !articular value lan"ua"e for !ro"rammin". ow do I find out if this lan"ua"e can e used to !ro"ram and control the relay
module%
A.+ind out if the lan"ua"e of interest su!!orts some $ind of PIs(+unctions(Com!onents for serial communication. If it
does' most li$ely you should e ale to use that lan"ua"e with this module.
.hat is the connector mar$ed as IC)P on this module%
A. Ahis connector is used to !ro"ram the on3oard microcontroller. Ahis connector is !rimarily intended for factory use.
.I need a customiHed version of this !roduct' can /umato do the customiHation for me%
A.:es' we can definitely do customiHation ut there may e minimum order re#uirements de!endin" on the level of
customiHation re#uired. Please write to salesWnumato.comfor a #uote.
.here can I uy this !roduct%
A. ll /umato !roducts can e ordered directly from our we store htt!-((www.numato.com.e acce!t maJor credit
cards and Pay!al and shi! to almost all countries with a few e>ce!tions. e do have distriutors in many countries where
you can !lace your order. Please find the current list of distriutors athtt!-((numato.com(distri .
mailto:[email protected]://www.numato.com/http://www.numato.com/http://numato.com/distribhttp://numato.com/distribhttp://numato.com/distribmailto:[email protected]://www.numato.com/http://numato.com/distrib8/10/2019 2channelbluetoothrelaymodulev6_1
23/24
21 2 Channel Bluetooth Relay Module ? User Guide
"h#sical Dimensions
8/10/2019 2channelbluetoothrelaymodulev6_1
24/24
1
1
2
2
3
3
4
4
5
5
A A
B B
C C
Date: 23 sep 2 13
KiCad E.D.A.
Rev:ize: A4
Id: 1/1
Title: 2 Channel Bluetooth Relay
File: 2ChannelBluetoothrelay.sch
Sheet: /
Numato Lab
http://www.numato.com
License : CC BY-SA
1 2
7
SPST
1 2 USB PWR
2 3 EX PWR
3 2 1
V SELECT
+
G
N
R
0
R
1
GND
3V3
8
7
6
5
4
3
2
1
G
P
O
S
M
4
M
3
M
2
M
1
NC C NOC C NO
C12
47mfd
C13
47mfd
VRELAY
3V3
1
2
3
4
5
6
7
8
9
10
P
C
N
VRELAY
V
I1
I2
I3
I4
I5
I6
I7
GND COM
9
O7
10
6
11
5
12
4
13
3
14
2
15
1
16
U4
ULN2003
R10
2K2
R9
2K2
PWR_FLAG
1
2
P
C
N
1
2
P
C
N
1
2
P
C
N
1
2
P
C
N
A
1
OUT
2
IN
U3
LM317
P
C
P
D
V
V
V
V
C11
0.1mfd
C10
0
1
m
f
d
C9
4
m
f
d
V
1
D
23
G
N 4
S
e
d
5
S
e
d
6
J
USB
P
C
P
D
PGD
PGC
RESET
FWU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