×
Namespaces

Variants
Actions
(Difference between revisions)

Communicating with Arduino

From Nokia Developer Wiki
Jump to: navigation, search
rcu (Talk | contribs)
(How?)
rcu (Talk | contribs)
Line 1: Line 1:
 
[[Category:Maemo]][[Category:MeeGo]][[Category:Python]][[Category:Symbian]]
 
[[Category:Maemo]][[Category:MeeGo]][[Category:Python]][[Category:Symbian]]
 
=Why?=
 
=Why?=
Arduino popular robotics and automation platform - see [Practical Arduino], etc.
+
Arduino - popular robotics and automation platform - see [Practical Arduino], etc.
  
 
[Jurgen] demonstrates interfacing S60 phone with robot via Bluetooth.  
 
[Jurgen] demonstrates interfacing S60 phone with robot via Bluetooth.  
Line 19: Line 19:
  
 
One can buy an Arduino USB host shield from http://www.circuitsathome.com/ (I personally bought it from a local retailer that got a compatible USB host shield from Sparkfun - see http://www.sparkfun.com/products/9947.  
 
One can buy an Arduino USB host shield from http://www.circuitsathome.com/ (I personally bought it from a local retailer that got a compatible USB host shield from Sparkfun - see http://www.sparkfun.com/products/9947.  
Note: Another option which I didn't try is the ...!!!!
+
Note: Another option which I didn't try is the V2DIN...!!!!
 +
 
 +
We have experimented with Arduino Uno, but should work as well with Duemilanove, etc.
  
 
The Arduino USB host shield library can be found at https://github.com/felis/USB_Host_Shield.
 
The Arduino USB host shield library can be found at https://github.com/felis/USB_Host_Shield.

Revision as of 20:07, 31 January 2011

Contents

Why?

Arduino - popular robotics and automation platform - see [Practical Arduino], etc.

[Jurgen] demonstrates interfacing S60 phone with robot via Bluetooth. Also !!!!

We consider that interfacing a phone with Arduino brings a lot of benefit. The phone has a lot of sensors (camera, GPS), radios (3G, BT, WiFi), and Arduino is very good for controlling motoros, adding other sensors (temperature, PIR, etc). A possible way of interfacing them is to have them form a one body system in which case using USB communication makes more sense than using Bluetooth.

The USB protocol

USB guest - maybe called slave!!!!

USB host - acts like a PC!!!!; requires 1!!!!Mbps transfer rate

How?

All standard phones support USB guest mode. Only the newer phones, from 2010 onwards, support USB host mode - e.g., Nokia N8, C7, the Maemo phones. Therefore we want to have phones acting as USB guests and connect them to Arduino, which needs to act as a USB host.

One can buy an Arduino USB host shield from http://www.circuitsathome.com/ (I personally bought it from a local retailer that got a compatible USB host shield from Sparkfun - see http://www.sparkfun.com/products/9947. Note: Another option which I didn't try is the V2DIN...!!!!

We have experimented with Arduino Uno, but should work as well with Duemilanove, etc.

The Arduino USB host shield library can be found at https://github.com/felis/USB_Host_Shield. The first application to try is board_test found in examples. With board_test I tested phones, USB memory sticks, USB Bluetooth sticks and a Sony DSC camera - normally all should work.

Other interesting projects are https://github.com/felis/Arduino-Bluetooth (see http://www.circuitsathome.com/mcu/bluetooth-code-for-arduino-usb-host), https://github.com/felis/Arduino_Camera_Control (see http://www.circuitsathome.com/mcu/controlling-canon-powershot-cameras-to-arduino). Info about all the projects can be found at http://www.circuitsathome.com/category/mcu/arduino/usb-shield.

Sending data on a Symbian phone on the USB port can very easily be achieved by using the pys60usb module.

Note: on the Internet one can find pages describing attempts of connecting USB port of phones directly to Digital IOs of Arduino. THIS IS NOT FEASIBLE! The USB protocol is much more complex than simple serial Tx/Rx data communication. You need to transform the Arduino in a USB host which is possible ONLY if attaching a USB host shield to it (the solution described in chapter 3!!!! of [Practical_Arduino] is, as far as we know, also not good since that transforms Arduno in a USB guest/slave and it is not possible to change the program to implement a USB host). We are open to informed comments.

References

[Practical_Arduino] book!!!!

235 page views in the last 30 days.
×