0

I have been working on a project where our Android tablet has only 1 microUSB port.

enter image description here

Since we must communicate via serialUSB with an external device, it became a little fuzzy after we noticed that leaving the tablet powering the bus (Host Mode) drains it`s battery till death. Moreover, we still must supply enough energy to power the tablet.

After a lot of attempted fails, such as using a OTG-Y cable, modifying Kernel Battery Config and using a USB Hub, I need to discover a way to perform the communication and keep the tablet charging.

Thought about using the HDMI or even the audio/serial. Is there any solution I can look forward to solve this?

At this point, I'm getting out of ideas.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
Machado
  • 14,105
  • 13
  • 56
  • 97

2 Answers2

0

You can use an arduino, but not a normal one, you'll need a mega, i say this because the ardiono mega is the only arduino i know of with more than one serial UART. The Uno for example shares the RX/TX serial pins with the same UART as the USB interface.

If you DO have a mega, you can get a cheap USB to Serial module such as this: http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=arduino+usb+to+serial&_sop=15

Now, you plug your PC into the mega's normal USB This will power the Mega from your PC. Then you connect your tablet to the serial module.

All that's left to do is create a simple ino script for your mega to transfer data from serial (pc-USB) to serial2 (Tablet), and vice versa..

Example:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200); // PC <--> USB
  Serial1.begin(115200); // Serial <--> Tablet
}

void loop() {
  // put your main code here, to run repeatedly:
serialComs(); // Tells loop to execute the serialComs() function
}

// Serial Comunication function
void serialComs() {
  // read from port 1 (Tablet), send to port 0 (PC):
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0 (PC), send to port 1 (Tablet):
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
  }
}

NOTE: You may need to add #DEFINE entries before void setup to define which pins are which on your serial to USB module.

0

I think your way througt the HDMI will not work. And you have only one other option:

You could also load your battery directly. You could open the case and power your tabled instead your battery. This should also work. I think ther is no other way.

Also you could try a OTG hub: http://www.miniinthebox.com/de/3-in-1-micro-usb-otg-host-adapter-kabel-hub-fuer-samsung-smartphone-tablet-n9000_p1996674.html?currency=EUR&litb_from=paid_adwords_shopping&litb_from=&adword_mt=&adword_ct=73333307802&adword_kw=&adword_pos=1o1&adword_pl=&adword_net=g&adword_tar=&adw_src_id=4196617767_313342362_22461529362_kwd-140182704282&gclid=CJqW-Na8zMcCFc8aGwodznEIZA

But not all tables allow charging and using USB at the same time.

Fruchtzwerg
  • 10,999
  • 12
  • 40
  • 49