1

I'd like to get a word of advice regarding the subject. Basically there's a COM port based device which I need to connect to an Android tablet via USB. The tablet will be exchanging data packages with the COM device, but a) Arduino may need to do same transformation of the packages b) the tablet should not leverage OTG feature and shouldn't be a master itself.

So, my questions are

1) Which Arduino board is the best fit? 2) Is it an option to use Chinese boards for the sake of cost optimization? 3) Do I need separate RS232 and USB shield or it's ok to leverage built in USB and data pins?

Apology for this quite a noob question but that's exactly who I am for Arduino platform. Appreciate any answers.

  • No Arduino implements a USB host. That would require a more or less complete OS to work. And it's not quite clear how are parts of your project connected together. – Dmitry Grigoryev Jun 18 at 12:35
  • @DmitryGrigoryev I believe Arduino Duo must support USB Host mode, at least I saw that in various blogs and forums on the Internet : forum.arduino.cc/index.php?topic=548469.0 So, can you explain what do you mean, please? – Ivan Jun 18 at 12:51
  • True. Yet you have accepted an answer suggesting a 32U4, which doesn't have the host mode, so I still fail to understand what you're trying to do. Did you decide to use OTG, or use a Duo to connect your COM device and Android device together? Or is Arduino itself the COM based device you're talking about? – Dmitry Grigoryev Jun 18 at 13:05
  • 1
    @DmitryGrigoryev sorry for being not clear. Given is a) COM device, b) Android tablet. To be solved is how to connect them allowing the tablet to send/receive data to/from the COM device, but keeping the tablet charged (so OTG is not an option as it would make it into master, thus giving it's charge away). Also, some additional transformation may be required to apply to data flowing between the devices. – Ivan Jun 18 at 13:19
1

1) Which Arduino board is the best fit? 2) Is it an option to use Chinese boards for the sake of cost optimization? 3) Do I need separate RS232 and USB shield or it's ok to leverage built in USB and data pins?

When communicating with Android you need to make sure that there is software available for doing the communication. That's really down to the application more than the operating system, and because of that it can be quite restricted what boards will work and what won't.

Personally I would go for either an ATMega32U4 based board which provides a standard CDC/ACM interface. This also has the advantage that the (often single) UART on the board is not used by the USB communication.

Then you need to convert the UART into RS232 using (for example) a MAX232 board.

  • yeah I've got full control over Android app and basically marrying it together with a bord won't be a problem. – Ivan Jun 18 at 9:54
  • I'm a bit puzzled now. Cuz ATMega32U4 is used in Arduino Micro and Leonardo which I believed are not able to be host devices. By reading docs I was leaning to Arduino Due, cuz the documentation for USBHost class specifically says the class is compatible with Due model only. – Ivan Jun 18 at 9:57
  • @Ivan You want the Android device to be the host. – Majenko Jun 18 at 9:58
  • Not exactly, I'd like it to be slave and a bord act as a host. – Ivan Jun 18 at 9:59
  • 1
    AOA is supported in Arduino (or was) but it is called ADK. arduino.cc/en/Guide/ArduinoADK. The last time anyone was excited about this was 2012. The USB Host Shield Library 2.0 has references to ADK as does the Due USB host library github.com/arduino-libraries/USBHost/tree/master/examples/…. Whether Arduino ADK still works, I do not know. BLE or WiFi are better options to communicate with an Android device. – gdsports Jun 21 at 2:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.