Monday, April 7, 2014

Mobile Application Using Android Bluetooth And PLC




Mobile application for this topic using bluetooth hardware in android smartphone, and for android programming, I use Android SDK.
And in PLC, I use Bluetooth to RS232 converter, RS232 PPI cable and Siemens Step 7 PLC.
See the end result of the application on this topic:

Equipment required for this application:
Hardware:
1. Android Smartphone with Bluetooth Profile: SPP(Serial Port Profile).
Example: Android Specification with SPP/ Serial Port Profile

Bluetooth Profile SPP

Bluetooth Serial Port Profile

Example: I use Samsung Galaxy Star Duos S5282

samsung galaxy star duos s5282

2. Bluetooth to RS232 converter, I use HC-06 with DB9 RS232.

HC-06 Bluetooth to DB9 RS232 converter

3. Power supply for mobile phone charger or other with output DC 5V.
Example: I use mobile phone charger

Power supply for mobile phone charger

4. Linear Voltage Reducing, Input DC 4.5~12V, Output DC 3.3V.


Linear Voltage Reducing Output DC 3.3V

5. RS232/PPI Multi Master Cable


RS232/PPI Multi Master Cable

6. Siemens Step 7 S7-200

Android Apps:
1. Download APK, click here

Hardware Setting:
1. RS232 Communication Setting
1.1. Wiring of HC-06 Bluetooth Setting:


Wiring for HC-06 Bluetooth Setting

1.2. Baud Rate Setting of HC-06 Bluetooth:
For PLC Communication using Baud rate: 9600,Even,8,1
Setting of RS232 Communication using AT command of HC-06 Bluetooth.
Default parameter of HC-06: Baud rate: 9600,None,8,1 and Password:1234

Set dafault parameter from 9600,None,8,1 to 9600,Even,8,1
Baud rate:9600 OK
Parity: None Not OK, set to Even
Data bit: 8 bit OK
Stop bit: 1 bit OK

How to set Even Parity?
Using AT command of HC-06:
Send: AT+PE
Back: OK EVEN

Download AT command, click here
Download Visual Basic NET (Project File) for AT command Setting, click here
Video about AT command of HC-06 and Visual Basic NET:

Android Bluetooth And PLC
1. Wiring of HC-06 Bluetooth to PLC:


Wiring of Bluetooth to RS232 converter HC 06 to PLC

2. HC-06 and Phone Bluetooth Pairing


HC-06 and Phone Bluetooth Pairing

3. Android Apps for force ON/OFF of PLC Output Light:
3.1. Install APK and RUN.
Install APK and RUN

3.2. Select or Input MAC Bluetooth of HC-06
Select or Input MAC Bluetooth of HC-06

3.3. Click Connect
Click Connect

3.4. Select Lamp Number : 0 to 15
Select Lamp Number : 0 to 15

3.5. Click ON or OFF
Click ON or OFF



Labels:





Newer Post Older Post Home

You may also like these ebook:

Get Free PLC eBook directly sent to your email,
and email subscription to program-plc.blogspot.com




We hate SPAM. Your information is never sold or shared with anyone.

Your Email Will Be 100% Secured !