5

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.

5 Answers5

3

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

Sparky
  • 8,437
  • 1
  • 29
  • 41
1

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.

Community
  • 1
  • 1
ravuya
  • 8,586
  • 4
  • 30
  • 33
0

If your tablet has bluetooth, I'm working on an RC boat controlled by an Android phone over Bluetooth. Basically I connected a bluetooth module and the speed controller for the motors to an Arduino and wrote some code the interprets signals from a program running on the Android phone. There are existing libraries that make this task very easy. Instead of these high power motors you can attach small servo motors to the Arduino directly, which is very simple and should be perfect for your case.

For details see this blog post.

Gerald Schneider
  • 17,416
  • 9
  • 60
  • 78
-1

Just as an option, you could use an existing app that uses IR to trigger the camera shutter. For example This one You can create the IR emisor very easily, check this video

Then you can use an arduino to get the IR signal and move the motor. You have more information in this tutorial IF you're lucky, you might find something very similar and avoid having to start from scratch. Good luck, it sounds like an interesting project.

Katu
  • 1,296
  • 1
  • 24
  • 38
-2

You could use something like this, but no java binding out of box. Not sure if your tablet supports running a dll.

http://www.pc-control.co.uk/motorbee_info.htm

aglassman
  • 2,643
  • 1
  • 17
  • 30