Go Down

Topic: [SOLVED] USB 2 serial converter (Read 2304 times) previous topic - next topic

Oct 06, 2012, 08:33 pm Last Edit: Oct 08, 2012, 01:16 am by Wolfman Reason: 1
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

Palliser

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

James C4S


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.


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

SM.Ching

See Mini USB Host Microcontroller Board
http://www.kickstarter.com/projects/985890579/mini-usb-host-microcontroller-board-arduino-compat
Electronics and computer projects
http://ediy.com.my/

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.

James C4S


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

CrossRoads

Quote
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
Code: [Select]

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

cut & paste it around as you debug the various sections.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Riva


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

#9
Oct 07, 2012, 07:03 pm Last Edit: Oct 08, 2012, 01:16 am by Wolfman Reason: 1

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.

Thank you very much James. After a while it works on my Ubuntu 12.04.


Go Up