Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interfacing android tablet with pic

Status
Not open for further replies.

arbj2

Full Member level 3
Full Member level 3
Joined
Apr 10, 2012
Messages
166
Helped
10
Reputation
20
Reaction score
10
Trophy points
1,298
Visit site
Activity points
2,697
hi,

i am looking for ways to interface an android based tablet with a pic microcontroller.

i have considered these options.

1. through usb, the pic will be a usb client and the tablet host.

2. through bluetooth, though iam not sure if a bluetooth module connected to a pic can be paired to an android tablet

3. via rs 232 using a usb to serial converter connected to the usb port of the tablet.

please suggest if the above mehods are feasible and also any other methods...

thanks
a
 

Each of your method is possible but the first and last one are difficult.
Search with microchip on google play you will find an app which comunicates with microchip pic development board and works on usb-hid class.
But its very difficult to build this from starting.
As you have to write android app for usb communication at your own.
Bluetooth one is very easy, you can use tablet bluetooth to communicate with pic, for pic side you can use bluetooth module one such module is HC-05.
Have a look at this link


https://sites.google.com/site/coole...ects-available/embedded-system/wireless-robot

This one is with bluetooth and Android Phone
 

Hello!

I would choose the BlueTooth solution for many reasons:
- RS232 is an old technology, and you will need exta hardware to connect it to
your tablet.
- USB might be a good idea, but you can not reach the whole tablet market (Apple
doesn't have USB).
- Bluetooth is (I think) the easiest way. You need only a module attached directly
to your processor, and you can communicate with Android, iPhone, and I suppose
if there is a Windows system, BlueTooth will be supported.

Careful with BlueTooth: BT 4.0, as known as BlueTooth LE (for low energy)
is not compatible with the previous versions. If your tablet was built before
Android 4.3 API18, then you cannot use BlueTooth LE.

Here is a demonstration of what I did with Bluetooth:


NB: in case of using Safari on Mac, the translation may not appear, so right click
and refresh flash. The translation will not work on apple's portable devices, it's not
supported yet.

Dora
 

thanks for the help.

@doreamon
That's a cool project you made..

How to interface with a bluetooth 4.0 tablet ?? Are there modules available for this ??

I read some datasheets on the RN41-/RN-42 modules, have you any experience with these ??.
See link https://ww1.microchip.com/downloads/en/DeviceDoc/Bluetooth-RN-41-SM-DS.pdf

I also found some modules for sale in ebay, these modules HC-06 seem to be very popular.. They are similar to the RN-41 and RN-42. I am going to buy a few and try them out...this is the model I am going to buy..**broken link removed**

See link **broken link removed**

thanks
a

Do you have any experience with these ??

Also is there any difference between bluetooth for android and ipad/iphone ??
 
Last edited:

Hello!

No, I don't have any experience with other modules. Usually I prefer buying that kind
of devices from a well known maker who provides real technical support (I suppose
Microchip can be trusted, but I would be careful with the other link you provide, there
is no maker indicated, or at least I don't know this maker. Maybe it's good).
In the past, I have used earlier version of BlueTooth (serial port profile).
For my new board, I have used BlueGiga's BLE112.
As for the small demonstration (using the car), it's really a quick and dirty, not very
responsive software, but hey, it works!

Now for the modules you found: they should be easier to use than BLE112 (just a blind
assumption) because they seem to be a kind of RS232 cable replacement like the older
series of BlueGiga modules (therefore skipping the complexity of BT4).
However, be aware that from now on, most of the recent phones tend to use BT4.
And since a phone's life is (maybe) 2 years at most, I would think that within a year
or 2, the majority of the phones will be BT4 only. Maybe some of them will be backward
compatible, but I wouldn't count on this.

BlueGiga's module can be configured with a script that hides the complexity of
Bluetooth4. When I started about 2 years ago, it was really a pain to get some useful
information and sample code, but now the whole path is covered: from the module's
configuration to iPhone application (and recently Android).

As for the differences between iPhone and Android, I don't know, but I made a hardware
for my real work, that communicates with an Android tablet. The Android programmer
working on the same project told me that there are basic examples on how to catch
messages sent from a BT4 device like the hardware I made. Apparently the heart beat
monitor is a kind of hello-world in the BT4 world. The iPhone app provided by BlueGiga is
a heart beat monitor, and the Android programmer also started from a heart beat monitor.

OK, that said, I would like to stress again that BT4 is more complex, it's not as earlier
versions which were basically radio versions of a RS232 cable.

As for the board I made, it will be delivered with BT4 already programmed to behave like
a serial port. A student working here has already put some source code online, that
explains how to drive a DC motor and a servo. He's now working on serial port
demonstrations which is the preliminary work to communicate with a BT module.
I also made an even simpler sample code for iPhone, showing how to run a motor forwards
and backwards using a single page interface with a single slider. I will publish both sides
of the code (board and iPhone).

I'm not sure that this messages replies to your questions because I don't have that
much knowledge about Android. The reason I choosed to develop on iPhone is not
technical. It's simply because I have one.

I will post updates if I develop an Android application.

Dora.
 

Wi-Fi modules are another option if you need to be wireless. I have been using a Lantronix XPort Direct+ ethernet to serial module for a wired application. I'm sure there are many WiFi to serial modules available. Then you could access the device using anything with a web browser.
 

The Lantronix XPort Direct+ module looks expensive, for that price I can buy a beaglebone black and get ethernet connectivity.

Whats the best development tools for making apps for android ??

thanks
a
 

$29 USD at Mouser for the XPort Direct+. I think it's along the same price as a Bluetooth modem module. I was given a box of them so the cost was nil for my project. I was just giving you ideas/alternatives.

For Android development, I use Basic4Android (http://www.basic4ppc.com/). It's Visual Basic like so it was easy to start building without learning Java as my background is C and VB.
 

$29 USD at Mouser for the XPort Direct+. I think it's along the same price as a Bluetooth modem module. I was given a box of them so the cost was nil for my project. I was just giving you ideas/alternatives.

For Android development, I use Basic4Android (http://www.basic4ppc.com/). It's Visual Basic like so it was easy to start building without learning Java as my background is C and VB.

Thanks for the info. Your idea is indeed welcome. Sorry if my above post sounded harsh...
I had seen the prices in element14 as they quote in indian rupees,import duty included. I did not see in mouser.

Basic4Android looks good. How is the support for bluetooth in Basic4Android ??

thanks
a

- - - Updated - - -

$29 USD at Mouser for the XPort Direct+. I think it's along the same price as a Bluetooth modem module. I was given a box of them so the cost was nil for my project. I was just giving you ideas/alternatives.

For Android development, I use Basic4Android (http://www.basic4ppc.com/). It's Visual Basic like so it was easy to start building without learning Java as my background is C and VB.

Thanks for the info. Your idea is indeed welcome. Sorry if my above post sounded harsh...
I had seen the prices in element14 as they quote in indian rupees,import duty included. I did not see in mouser.

Basic4Android looks good. How is the support for bluetooth in Basic4Android ??

thanks
a

- - - Updated - - -

$29 USD at Mouser for the XPort Direct+. I think it's along the same price as a Bluetooth modem module. I was given a box of them so the cost was nil for my project. I was just giving you ideas/alternatives.

For Android development, I use Basic4Android (http://www.basic4ppc.com/). It's Visual Basic like so it was easy to start building without learning Java as my background is C and VB.

Thanks for the info. Your idea is indeed welcome. Sorry if my above post sounded harsh...
I had seen the prices in element14 as they quote in indian rupees,import duty included. I did not see in mouser.

Basic4Android looks good. How is the support for bluetooth in Basic4Android ??

thanks
a
 

I haven't used BT (yet) so I can't comment on how easy it is to use. Go to the forums (http://www.basic4ppc.com/android/forum/) and search for bluetooth. There will probably be many examples that you can download to see how the code is written. The Basic4Android (B4A) code is plain text so you can read it without having B4A installed. If you want to install, there is a 30 day(?) demo version you can download and play around with.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top