Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controlling a motor with an android device

Tags:

java

android

port

I am trying to get a custom android app (running on a Packard Bell "liberty tab", android 3.2) to control an external motor. No need for fine control, just a way to signal "on" and "off". Which port on the device can I use to get that output, and how do I program it? Being able to simply turn on or off the power on the USB would be perfect, but I read an answer to another question on this site that told me it is not possible with android.

I have been thinking of simply playing a sound on the headphone jack and then build a relay that will react to this current.

For those wondering about the reason, the tablet is going to be used to train a blue-and-gold macaw (huge parrot). The tablet is going to be set it up in her cage (suitably protected, but in a way so that she can use her tongue on the screen) with a program specifically written to train her and connected to an automatic feed dispenser. What I need is a simple way of controlling this dispenser, which is also going to be custom build, probably with a small DC motor.

like image 784
Kasper Emil Feld Avatar asked Nov 14 '22 07:11

Kasper Emil Feld


2 Answers

This would be a perfect application for an ADK (Accessory Development Kit), if your tablet supports it.

like image 179
Sparky Avatar answered Nov 16 '22 04:11

Sparky


There are some ways to use RS232 on Android (with an appropriate adaptor), so it's possible that you could simply use a serial port to signal a relay or something else to switch on/off the motor.

like image 34
ravuya Avatar answered Nov 16 '22 03:11

ravuya