EmbeddedRelated.com
Forums

Controlling embedded devices from tablet apps

Started by David Brown July 4, 2013
I'm looking for some ideas or suggestions here.

We have an embedded system based around a small microcontroller (an AVR
XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with
a little PC program to control and monitor the embedded system.  This
all works fine.

The customer would like to know if they can use tablets (Android or iPad
- and maybe Android and iPad telephones too) to control the system
instead of a PC or laptop.

Although I haven't done any Android app development, I've got some
reasonable ideas about how to get started.  I know even less about iPad
development, except that it is more challenging to deal with (especially
as we don't have any Macs).  However, we can always outsource the actual
app development to other companies if need be.

The big challenge is to communicate between the tablet and the embedded
system.  Ideas include:

Use the existing USB connection.  That would be the cheapest and
easiest, but most tablets don't have a USB port, and I don't think we
could use the FTDI chip anyway.

If we always had internet available, the card could have an Ethernet
port and connect to an external server, and the tablet could connect to
the external server.  But customers don't always have internet
connections where this system would be used.

We could put Wifi on the board, and use that between the board and the
tablet.  But there is not always Wifi available, and when there is there
may not be access between nodes on the network.  And even then there is
the question of getting SSIDs, passwords, etc., into the board.

We could try Bluetooth - but I am not sure that an app can get the kind
of direct access to a Bluetooth device that would be needed here.


I can't be the first person to be considering this situation, so I hope
that other people have ideas or suggestions.

Thanks,

David

David Brown wrote:

>... >The big challenge is to communicate between the tablet and the embedded >system. Ideas include: > >Use the existing USB connection. That would be the cheapest and >easiest, but most tablets don't have a USB port, and I don't think we >could use the FTDI chip anyway.
Look at the IOIO board as a starting point: http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html https://github.com/ytai/ioio/wiki -- Roberto Waltman [ Please reply to the group, return address is invalid ]
In comp.arch.embedded,
David Brown <david@westcontrol.removethisbit.com> wrote:
> I'm looking for some ideas or suggestions here. > > We have an embedded system based around a small microcontroller (an AVR > XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with > a little PC program to control and monitor the embedded system. This > all works fine. > > The customer would like to know if they can use tablets (Android or iPad > - and maybe Android and iPad telephones too) to control the system > instead of a PC or laptop.
[...]
> We could try Bluetooth - but I am not sure that an app can get the kind > of direct access to a Bluetooth device that would be needed here.
What kind of access do you need? I have done a simple test application on android with a bluetooth to serial module. I got a serial connection to the embedded device working fairly quickly. The app is not perfect yet, but that is mostly because of my limited Android experience i think. ;-) I'm hoping to find time to improve it. Especialy seperate all IO and UI in different threads to get some kind of performance.
> I can't be the first person to be considering this situation, so I hope > that other people have ideas or suggestions.
Have a look at the Android SDK bluetooth examples. With IOS there is some extra difficulty with having to use an approved device ID or something to be able to use bluetooth. But there are some modules (bluegiga?) that take care of this. -- Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) You can observe a lot just by watching. -- Yogi Berra
On Thu, 04 Jul 2013 13:58:49 +0200, David Brown wrote:

> I'm looking for some ideas or suggestions here. > > We have an embedded system based around a small microcontroller (an AVR > XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with > a little PC program to control and monitor the embedded system. This > all works fine. > > The customer would like to know if they can use tablets (Android or iPad > - and maybe Android and iPad telephones too) to control the system > instead of a PC or laptop. > > Although I haven't done any Android app development, I've got some > reasonable ideas about how to get started. I know even less about iPad > development, except that it is more challenging to deal with (especially > as we don't have any Macs). However, we can always outsource the actual > app development to other companies if need be. > > The big challenge is to communicate between the tablet and the embedded > system. Ideas include: > > Use the existing USB connection. That would be the cheapest and > easiest, but most tablets don't have a USB port, and I don't think we > could use the FTDI chip anyway. > > If we always had internet available, the card could have an Ethernet > port and connect to an external server, and the tablet could connect to > the external server. But customers don't always have internet > connections where this system would be used. > > We could put Wifi on the board, and use that between the board and the > tablet. But there is not always Wifi available, and when there is there > may not be access between nodes on the network. And even then there is > the question of getting SSIDs, passwords, etc., into the board. > > We could try Bluetooth - but I am not sure that an app can get the kind > of direct access to a Bluetooth device that would be needed here. > > > I can't be the first person to be considering this situation, so I hope > that other people have ideas or suggestions. > > Thanks, > > David
I think you're giving up on USB and Bluetooth too easily. I'm toying with a hobby project that would need a terminal; most of the new tablets (not phones) that I looked at on Amazon do, indeed, have USB host ports. Moreover, there's already a USB terminal app for Android tablets that talks to FTDI chips. Given that, I would think that filling in the blanks is easy. There is a Bluetooth serial data connection mode implemented; I've used it on a PC running Linux to talk to a Bluetooth-enabled device I'm making for a customer. It works just like any other serial. I'd be mildly surprised if you couldn't already access such with Android, and astonished if you couldn't figure out how. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
David Brown <david@westcontrol.removethisbit.com> writes:

> The customer would like to know if they can use tablets (Android or iPad > - and maybe Android and iPad telephones too) to control the system > instead of a PC or laptop.
Check out FT312D from FTDI. Using the traditional FTDI chips with android is not that easy because Android does not expose USB host. It took a few days for me to do basic control application, but I had been coding Java a lot maybe 5 years before. -- Mikko OH2HVJ
On 7/4/2013 5:58 AM, David Brown wrote:
> I'm looking for some ideas or suggestions here. > > We have an embedded system based around a small microcontroller (an AVR > XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with > a little PC program to control and monitor the embedded system. This > all works fine. > > The customer would like to know if they can use tablets (Android or iPad > - and maybe Android and iPad telephones too) to control the system > instead of a PC or laptop. > > Although I haven't done any Android app development, I've got some > reasonable ideas about how to get started. I know even less about iPad > development, except that it is more challenging to deal with (especially > as we don't have any Macs). However, we can always outsource the actual > app development to other companies if need be. > > The big challenge is to communicate between the tablet and the embedded > system. Ideas include: > > Use the existing USB connection. That would be the cheapest and > easiest, but most tablets don't have a USB port, and I don't think we > could use the FTDI chip anyway. > > If we always had internet available, the card could have an Ethernet > port and connect to an external server, and the tablet could connect to > the external server. But customers don't always have internet > connections where this system would be used. > > We could put Wifi on the board, and use that between the board and the > tablet. But there is not always Wifi available, and when there is there > may not be access between nodes on the network. And even then there is > the question of getting SSIDs, passwords, etc., into the board. > > We could try Bluetooth - but I am not sure that an app can get the kind > of direct access to a Bluetooth device that would be needed here. > > > I can't be the first person to be considering this situation, so I hope > that other people have ideas or suggestions. > > Thanks, > > David >
You can Google "android arduino" or "iPhone arduino" and get the basics. or add "wifi" or "bluetooth" to the list and get even more.
On 04/07/13 13:58, David Brown wrote:
> I'm looking for some ideas or suggestions here. > > We have an embedded system based around a small microcontroller (an AVR > XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with > a little PC program to control and monitor the embedded system. This > all works fine. > > The customer would like to know if they can use tablets (Android or iPad > - and maybe Android and iPad telephones too) to control the system > instead of a PC or laptop. > > Although I haven't done any Android app development, I've got some > reasonable ideas about how to get started. I know even less about iPad > development, except that it is more challenging to deal with (especially > as we don't have any Macs). However, we can always outsource the actual > app development to other companies if need be. > > The big challenge is to communicate between the tablet and the embedded > system. Ideas include: > > Use the existing USB connection. That would be the cheapest and > easiest, but most tablets don't have a USB port, and I don't think we > could use the FTDI chip anyway. > > If we always had internet available, the card could have an Ethernet > port and connect to an external server, and the tablet could connect to > the external server. But customers don't always have internet > connections where this system would be used. > > We could put Wifi on the board, and use that between the board and the > tablet. But there is not always Wifi available, and when there is there > may not be access between nodes on the network. And even then there is > the question of getting SSIDs, passwords, etc., into the board. > > We could try Bluetooth - but I am not sure that an app can get the kind > of direct access to a Bluetooth device that would be needed here. > > > I can't be the first person to be considering this situation, so I hope > that other people have ideas or suggestions. > > Thanks, > > David >
Thanks to all who replied. It looks like the FTDI Android chips could be the easiest and cheapest way forward. If these let an Android app talk to the microcontroller over a UART link, like the FT232 chips do, then I think we can make that work. Does anyone know if you connect a PC to these same chips (i.e., can we make the one board that will work with a PC and a tablet)? Of course, I can (and will) read the datasheet and other information, but someone might know of the top of their head. Other than that, Bluetooth serial sounds like another practical idea after all. I'll let the project developer figure out the details (I am not directly involved in this particular project). It sounds like this is the way we would have to go for iOS support. Thanks, David
>Use the existing USB connection. That would be the cheapest and >easiest, but most tablets don't have a USB port, and I don't think we >could use the FTDI chip anyway. >
>If we always had internet available, the card could have an Ethernet >port and connect to an external server, and the tablet could connect to >the external server. But customers don't always have internet >connections where this system would be used. > >We could put Wifi on the board, and use that between the board and the >tablet. But there is not always Wifi available, and when there is there >may not be access between nodes on the network. And even then there is >the question of getting SSIDs, passwords, etc., into the board. > >We could try Bluetooth - but I am not sure that an app can get the kind >of direct access to a Bluetooth device that would be needed here. > > >I can't be the first person to be considering this situation, so I hope >that other people have ideas or suggestions.
It is my understanding that ALL Android tablets have USB ports. certainly every one I have looked at does have one. Finding the USB driver may be more problematic- I never found one for my el-cheapo Android tablet from the Far East. Fred Eady recently did a series of lectures on using an Android tablet and covered using the Wifi and Bluetooth for I/O. There are archived at http://www.embeddedrelated.com/usenet/embedded/show/175140-1.php June24-June 28. As previously mentioned there is the IOIO board and also the AOAA kit from Embedded Artists (http://www.embeddedartists.com/products/app/aoa_kit.php ) I have done a number of blogs of my struggles in creating an application using Android/Bluetooth culminating in an oscilloscope hosted on an Android tablet and communicating via Bluetooth see http://www.microcontrollercentral.com/author.asp?section_id=1887&doc_id=264457& If you look at the bottom you will see links to all my blogs on teh topic including discussions as to why I chose Android over the iPad. --------------------------------------- Posted through http://www.EmbeddedRelated.com
On 2013-07-05, antedeluvian <63015@embeddedrelated> wrote:
> > It is my understanding that ALL Android tablets have USB ports. certainly > every one I have looked at does have one. Finding the USB driver may be > more problematic- I never found one for my el-cheapo Android tablet from > the Far East. >
No, all Android tablets have USB device support. David would need USB host support if he wants a USB connection because he wants to control the device from the tablet, and not all tablets, especially the low end ones, have USB host support. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
>On 2013-07-05, antedeluvian <63015@embeddedrelated> wrote:
>No, all Android tablets have USB device support. David would need USB
host
>support if he wants a USB connection because he wants to control the
device
>from the tablet, and not all tablets, especially the low end ones, have
USB
>host support. > >Simon. > >-- >Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP >Microsoft: Bringing you 1980s technology to a 21st century world >
Simon It depends on what you are using. The AOAA board acts as a USB host and I am pretty sure the IOIO does too. If you read the comments on the IOIO board there are some phones that seem to have problems, but most seem to succeed. --------------------------------------- Posted through http://www.EmbeddedRelated.com