Serial communication to DCE through USB

Hey, I'm using an Arduino Duemilanove (http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove).

I want to use it to communicate with a DCE using RS232. I've already tried using a MAX232A chip to convert TTL voltages to RS232 voltages using this: http://www.arduino.cc/en/Tutorial/ArduinoSoftwareRS232. But I want to be able to do that without creating prototype circuits.

So I bought a USB to rs232 converter (something like this: http://www.usbgear.com/computer_cable_details.cfm?sku=USBG-RS232-F12&cats=199&catid=482%2C199%2C601%2C461) and plugged it into the usb port of the Arduino (using an A to B type usb converter).

I programmed the Arduino to continuously send stuff through the serial interface, but it doesn't seem to send anything when I use the adapter.

When I plug the adapter to the USB port of my computer and the rs232 end to a DCE, it seems to work fine (after I installed the ftdi driver).

So my question is: Do I need an equivalent of the ftdi driver on the Arduino for it to be able to communicate through that adapter?

When I connect the Arduino to the computer using the normal USB cable, it starts sending only when I open up the serial monitor in the IDE. So my guess is that something on the other side needs to initiate the communication before the Arduino starts sending. My DCE can't do that.. so is there some way to make the Arduino to just send data without anything on the other side?

Thanks

USB equipment has a "master/slave" relationship, and both the Arduino and the USB-to-serial widget you bought are "slaves". You need a "master" (usually some sort of PC, but there are some micros these days that can act as masters) to talk to both devices.

You probably want to get something similar to this or this (scroll down to the "P4") to act as an RS-232 buffer.

Ran

Ran is quite correct.

When you say:-

When I connect the Arduino to the computer using the normal USB cable, it starts sending only when I open up the serial monitor in the IDE.

How do you know this? You can't see the output unless you open the serial monitor. It's like saying you don't know the fridge light is off when the door is closed. In fact data is being sent to the USB chip if it is initialised or not and when plugged into the computer it is receiving data irrespective of if any application is listening.

Thanks for your replies. I had already created a version of the RS232-TTL converter, and it works fine. The extra breakout board would just add another component to the system, which I don't want to do. I'll take a look at the P4 and see what I learn. Thanks.

@Grumpy_Mike: The TX light on the Arduino only lights up when the serial monitor is started up. So I assumed that it sends data only when the serial monitor is started. I guess that is what Ran meant about the master-slave relationship, and why I thought there should be something on the "other side" to initiate the communcation.

The TX light on the Arduino only lights up when the serial monitor is started up.

The TX light is not controlled by the arduino it is controlled by the USB / Serial bridge. It is the main computer that is responsible for flashing these lights. The arduino sends data anyway.

The Tx light is so controlled by the Arduino. If something is reading the data, the light flashes. When two Arduinos are communicating using xbees, the Tx and Rx lights flash at the appropriate times.

The Tx light is so controlled by the Arduino.

Look at the schematics.

The LEDs are connected to GPIO0 and GPIO1 of the FT232RL. These, as the name says are General Purpose Input Output lines. These are controlled purely by the drivers in the PC. :P

The LEDs are connected to GPIO0 and GPIO1 of the FT232RL.

Yea, I looked up the arduino schematic and ftdi datasheet (page 30, http://www.ftdichip.com/Documents/DataSheets/DS_FT232R.pdf), and you're right.

I've done some reading about usb host/slave and as far as I understand a USB Host has to initiate the communication. So is the Arduino actually sending data before the host initiates communication? Or is the act of plugging in the USB to my computer the "initiation of communication"?

if the Arduino is indeed sending data regardless of what's on the other side, does that mean when I connect my USB-RS232 adapter, it is also sending data? There is another ftdi chip at the end of the adapter, and my guess is that's where my problem lies. Something needs to interface with that before the arduino can send data through it.

I think I have a better idea of what's going on now. This USB-RS232 thing is not going to work. bah.