[SOLVED] USB 2 serial converter

Hi, I need to send data from arduino 1 board to a PC via rs232 interface. I need to know whether is possible to use the usb 2 serial converter (http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=30&products_id=143) or it is only a programming device.

Thank you in advance and excuse me if this is not the correct section.

Wolfman

Hello Wolfman. It's quite a difficult step. While many microcontrollers today offer slave USB, like Arduino, usually only 32-bit microcontrollers (e.g. ARM) offer usb host ports.

I don't know of USB host to RS232 converters, although in theory they could exist.

So if I were asked to solve this problem, I would search for a Linux implementation supporting USB on the smallest possible processor with embedded USB host port. Sounds expensive, but it does not need to be: 32 processors used e.g. in GPS and game consoles consoles are below 20$, and if they can boot from flash (eg. SD card) the external parts are reduced to RAM and a few other chips. However, the software effort is formidable: putting the parts together (hardware, bootloader, operating system, drivers and application) is a daunting task (I'm after a 32-bit ARM board for more than five years with the help of a linux expert and yet the product is not finished...).

Hope this helps

Palliser: While many microcontrollers today offer slave USB, like Arduino, usually only 32-bit microcontrollers (e.g. ARM) offer usb host ports.

Why is a host necessary? RS-232 is a two way protocol. The PC can be host and an USB to Serial adapter can be the device just fine.

Wolfman: I need to send data from arduino 1 board to a PC via rs232 interface.

You mean an original Arduino board with RS232 interface? I would suggest something like a FTDI cable or the Arduino USB to Serial board connected directly to pins 0 and 1 of the Arduino board. This will allow for USB communication with the PC on an Arduino that doesn't have a USB to Serial chip already.

All you need Wolfman http://store.nkcelectronics.com/rs232-to-ttl-3v--55v-convert232356.html Connect to +5, Gnd, TTL Rx/Tx on your board. Run RS232 cable to your PC.

See Mini USB Host Microcontroller Board

I need to monitor some internal state of Arduino UNO board during debug and I don't know if there is another way to debug the software instead of printout some lines via serial line.

Wolfman: I don't know if there is another way to debug the software instead of printout some lines via serial line.

That's the method almost everyone uses.

The virtual serial port on the Uno is used for both programming and serial communication. You use the Serial commands to send stuff and open up Serial Monitor from the Arduino IDE.

I need to monitor some internal state of Arduino UNO board during debug

You can also use the onboard L LED to indicate when your code has reached a certain point, or a function has been run - add a simple

digitalWrite(ledPin, HIGH);
delay(1);
digitalWrite(ledPin, LOW);

cut & paste it around as you debug the various sections.

Wolfman: I need to monitor some internal state of Arduino UNO board during debug and I don't know if there is another way to debug the software instead of printout some lines via serial line.

Maybe Nick's excellent article on debugging over SPI interface http://www.gammon.com.au/forum/?id=11329

[quote author=James C4S link=topic=125938.msg947621#msg947621 date=1349618680] The virtual serial port on the Uno is used for both programming and serial communication. You use the Serial commands to send stuff and open up Serial Monitor from the Arduino IDE. [/quote] Thank you very much James. After a while it works on my Ubuntu 12.04.