Page 1 of 2

Android to PIC via Bluetooth

PostPosted: Sat Jun 30, 2012 11:11 pm
by Idris
This project shows the basic communication interface between Android phone and PIC microcontroller.
DSC01223 [640x480].JPG

I'm using Eclipse software and Java language for Android application.
For PIC microcontroller I'm using MPLAB X IDE and MPLAB XC8 Compiler.

Components:
~ PIC16F876A
~ SK28A + 8x2 LCD
~ Bluetooth Bee Module + XBee Starter Kit without module
(I'm create this module for my own, however you can purchase it at Cytron Website)
*Very basic connection between SK28A and XBee Starter Kit without module for UART communication.

I'm using Galaxy W Android 2.3.3 Gingerbread OS.

Project flow:
1st, pairing Android phone and bluetooth device.
In this project, I have hard code the bluetooth device name and mine is 'OmniTek'.
Then open the Android application click button 'connect'.
It will find the 'OmniTek' bluetooth and connecting.
Once connected, LED on SK28A can be controlled using Android phone by touching the 'LED ON' and 'LED OFF' button.

I'm really new in Java language, so I can't explain well the coding. I just try and error, follow my instinct and finally I got it. Alhamdulillah! :)

This is my references:
How to install Eclipse and SDK: http://www.youtube.com/watch?v=xtsyrKdPZVw
Android - Intro to bluetooth: http://www.youtube.com/watch?v=M5_EJ27xjMU
Android - Turning bluetooth ON and OFF: http://www.youtube.com/watch?v=E6VlPklnQMY
Android - Discovering bluetooth device: http://www.youtube.com/watch?v=X-Z4TiJTtlY
Tutorial: Android to Microcontroller via Bluetooth (Part 2): http://www.ryandebenham.com/?p=131

Android Bluetooth Source Code:
Android Bluetooth.rar
(61.78 KiB) Downloaded 2430 times

PIC Source Code:
AndroidBluetooth.X.rar
(64.08 KiB) Downloaded 2544 times

I will upload the video later. :)

Re: Android to PIC via Bluetooth

PostPosted: Sat Jun 30, 2012 11:52 pm
by Idris
This is the video:

http://www.youtube.com/watch?v=GG5byy03j0k&feature=plcp
Sorry for my phone orientation in the video. :D

Re: Android to PIC via Bluetooth

PostPosted: Sun Jul 01, 2012 1:18 am
by sich
Nice work Idris! :D
Very informative for beginners! Just love to see you shared the info which got you started *thumbs up*

Looking forward to more smartphone-related projects in this forum...

Re: Android to PIC via Bluetooth

PostPosted: Mon Jul 02, 2012 3:13 pm
by robosang
Wuh.... nice work man! Like it!

Re: Android to PIC via Bluetooth

PostPosted: Tue Jul 03, 2012 11:29 pm
by Idris
I have upgrade a little bit so that Android phone can receive and display data.

http://www.youtube.com/watch?v=Ntc0DtuI ... e=youtu.be

Android Bluetooth Source Code:
Android Bluetooth.rar
(66.59 KiB) Downloaded 1197 times

PIC Source Code:
AndroidBluetooth.X.rar
(104.12 KiB) Downloaded 1166 times

Re: Android to PIC via Bluetooth

PostPosted: Thu Oct 11, 2012 7:45 pm
by zin985
hai idris :D
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3

Re: Android to PIC via Bluetooth

PostPosted: Fri Oct 12, 2012 10:13 am
by Idris
zin985 WROTE:hai idris
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3

Hi zin985, I have list all the components at the 1st post.
1. PIC16F876A
2. SK28A + 8x2 LCD
3. Bluetooth Bee Module + XBee Starter Kit without module (SKXBEE-BOARD)
All this item you can found at Cytron website.

Connection for UART:
SK28A (5V) - SKXBEE-BOARD (5V)
SK28A (GND) - SKXBEE-BOARD (GND)
SK28A (RC6) - SKXBEE-BOARD (RX)
SK28A (RC7) - SKXBEE-BOARD (TX)

Re: Android to PIC via Bluetooth

PostPosted: Fri Oct 12, 2012 12:35 pm
by zin985
^^ i mean component list for circuit module u build by ur self.... ^^
can i have list component eletronik and schematic for that module u make by ur self... please2.. i hope u will help me... :|

Re: Android to PIC via Bluetooth

PostPosted: Fri Oct 12, 2012 12:46 pm
by zin985
Idris WROTE:
zin985 WROTE:hai idris
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3

Hi zin985, I have list all the components at the 1st post.
1. PIC16F876A
2. SK28A + 8x2 LCD
3. Bluetooth Bee Module + XBee Starter Kit without module (SKXBEE-BOARD)
All this item you can found at Cytron website.

Connection for UART:
SK28A (5V) - SKXBEE-BOARD (5V)
SK28A (GND) - SKXBEE-BOARD (GND)
SK28A (RC6) - SKXBEE-BOARD (RX)
SK28A (RC7) - SKXBEE-BOARD (TX)



^^ i mean component list for circuit module u build by ur self.... ^^
can i have list component eletronik and schematic for that module u make by ur self... please2.. i hope u will help me...

Re: Android to PIC via Bluetooth

PostPosted: Tue Oct 16, 2012 2:12 pm
by j6433
newbie here...would want to communicate between android (2.1) and adruino.. can this be possible? :roll: