Tablet to control embedded device?

gregulator

Senior member
Apr 23, 2000
631
4
81
I am working on a project where the customer wants to control an embedded device (motor controls) from a tablet (maybe android or ipad), and I am guessing my only communication options are wifi and bluetooth. I am thinking that my best option is to have an embedded web server, and just communicate that way. Also, this allows me to build a single GUI an not have to create "apps" for all kinds of tablets (even though I am sure I will have to create different html pages for each device..). Any advice or thoughts from people that have done something similar? Thanks!
 

sm625

Diamond Member
May 6, 2011
8,172
137
106
There are already plenty of products on the market that have digital and analog I/O that you can control from a web page. You just log onto the web page and set the I/O however you want.

If it was me I would probably go with a Arduino A000073 Uno. It has 14 digital I/O. It doesnt have analog output, but you can easily generate such a signal using the PWM digital outputs and a really cheap DAC.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
A web server sounds reasonable. With HTTP over wifi you can use it with any tablet, phone or laptop with a browser.

If you keep the HTML simple enough then one set of pages could work on everything.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Why worry about an embedded web server.
You want security; that is what the bluetooth provides - low power distance communication

I did a similar for the Army on tracked vehicles.
Bluetooth was used to authenticate the vehicle and the maintenance depot.
When authentication occurred; wifi was then enabled to dump data from the vehicle and upload info as needed.

Project specific data transfer protocol using sockets once the secure comm link has been established.
Put all the formatting requirements for user input/output at the user level
 

BoberFett

Lifer
Oct 9, 1999
37,562
9
81
I would definitely go the web interface route. It's standard, can be used from any device, can be controlled remotely rather than having to be within broadcast range.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
I would definitely go the web interface route. It's standard, can be used from any device, can be controlled remotely rather than having to be within broadcast range.

I would be leery on controlling mechanical equipment when not in visual/broadcast range.

Putting equipment on any network that can be accessed from outside puts it at risk.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
I would be leery on controlling mechanical equipment when not in visual/broadcast range.

Putting equipment on any network that can be accessed from outside puts it at risk.

Yes, requiring bluetooth and custom socket code might be overkill for a civilian setup, but allowing outside access instead of just on the LAN is going too far in the other direction.

The embedded web server should also at least use a session cookie and password page to set it.
 

BoberFett

Lifer
Oct 9, 1999
37,562
9
81
Control security via the network, not the hardware the application is running on. If you only want certain subnets to run the app, lock it down on the network and require login via an RDP session to a workstation on that subnet.

And why wouldn't you want to be able to control it without seeing it? Without knowing the specifics, it may be something that runs 24/7 anyway. Why not have the option for somebody monitor sensors remotely? Hell, put in an IP camera if you're worried about visual observation.

Either way, I see a web interface as the most versatile.
 

gregulator

Senior member
Apr 23, 2000
631
4
81
Thanks for the suggestions and reaffirmation guys! And no, security is not a concern at all, it is a simple project with only a few devices being made, and any malicious attempts to control it do not matter (can't endanger anyone or anything). It would mostly live offline, and then when someone is using it, they would monitor control.
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,792
126
www.anyf.ca
I second a web page setup, easier to manage. I have such interface to control my hvac. I can use my phone, computer, tablet or any device. Most of the time I just use the computer. I need to make the interface more touch friendly, but it does work.

Do consider the security aspects though, should require a password, be on a local network etc...
 

Fox5

Diamond Member
Jan 31, 2005
5,957
7
81
I am working on a project where the customer wants to control an embedded device (motor controls) from a tablet (maybe android or ipad), and I am guessing my only communication options are wifi and bluetooth. I am thinking that my best option is to have an embedded web server, and just communicate that way. Also, this allows me to build a single GUI an not have to create "apps" for all kinds of tablets (even though I am sure I will have to create different html pages for each device..). Any advice or thoughts from people that have done something similar? Thanks!

I'm actually working on a similar project.

I ended up using an XMPP chat server. I installed the Openfire xmpp server, and wrote a bot using the Smack library on the desktop for "smart commands". I wrote a simple TCP client that translated from XMPP to the embedded device as well, and I used the Asmack library to talk XMPP on Android.

It's a little overkill compared to just a web server, but more flexible.

I also had a "command line" interface just by firing up a chat client.