How to connect usb device to ioio?

192 views
Skip to first unread message

Bhaskar

unread,
May 17, 2013, 3:32:18 AM5/17/13
to ioio-...@googlegroups.com
Hello Ytai...
I have a sensor that has micro usb female connector. I can receive the data at 115200 baud rate from sensor through terminal program on PC when connected through USB cable (USB A to microB usb Cable). The sensor has a CP2102 chip to convert the TTL to usb. I want to receive data from four such sensors through IOIO on android. what would be the right way to do it? 

I already have a working android code and a circuit board (having two MAX232 chips) to receive four Rx pins from similar sensor having Rs232 interface. I open up four UARTs with only Rx to receive sensor data on android through IOIO. This works for me. However with USB interface I am struggling..

I tried using a USB to serial converter and feed serial output to existing MAX232 circuit. however could not receive any data. I suspect that the USB to serial converter will only work when connected to USB host and not with USB device (My sensor is a USB device and therefore is not powering up the USB to serial converter circuit). I externally powered up the circuit but still could not get the data. I dont know if this method is at all wrong to receive the data from a usb device. 

Can I connect D+/- of micro usb to IOIO 3.3 v pins (as they use the same voltage levels), and use UART on IOIO... Will it work ?
I dont know if  USB to TTL converter (http://www.ebay.com/itm/USB-2-0-UART-TTL-6-Pin-Module-Converter-CP2102-/250838017497?pt=LH_DefaultDomain_0&hash=item3a671c65d9#ht_4144wt_1139)  will work or not since it is not know whether the the usb or TTL side powers up the circuit. the usb device doesn't provide the power in my case.

Is there a way that IOIO can act as USB host to many devices..(adding physical usb ports..may not be possible though) in order to receive data from USB devices ??


Ytai Ben-Tsvi

unread,
May 17, 2013, 3:30:18 PM5/17/13
to ioio-...@googlegroups.com
The IOIO is not very well suited to what you're describing (interfacing between Android and USB peripherals).
Your best best is probably to find an Android device that has USB host mode, and connect your sensors through a USB hub.




--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Bhaskar

unread,
May 22, 2013, 8:38:57 AM5/22/13
to ioio-...@googlegroups.com
Hi,
would this work for connecting usb device and ioio together and receiving data from connected usb devices.
or

which communication protocol (UART, SPI..) would be required to communicate with USB devices and IOIO??

Instead of connecting Android device having USB host mode and connecting the sensors through a USB hub, it would be a better idea to use a USB host controller (link above) and connect IOIO  (V2 as device) along with other sensors through USB hub, since Android phones/tablets with USB host capabilities are much costlier than without USB host ones. However is this approach technically correct. Would it take writing drivers for the connected usb devices also, to get it working??

Now PIC24F (ioio) has also a USB host , so connecting a USB hub to IOIO USB and then connecting android and sensors to this usb hub will work or not ?? Will this require writing drivers for the connected usb devices to work?

Ytai Ben-Tsvi

unread,
May 22, 2013, 8:23:43 PM5/22/13
to ioio-...@googlegroups.com
There is currently no hub support in the IOIO USB stack, nor there's any plan to add such support.
The VNC2 way may work (I'm not very familiar with its limitations).
Your requirements are pretty unusual - USB sensors are not very common (at least for people who build their own circuits).
Reply all
Reply to author
Forward
0 new messages