Duemilanove to Duemilanove via USB

Is it possible to connect 2 Duemilanoves together using the on board USB connector? Probably a stupid question, but I need to ask.

Is it possible to connect 2 Duemilanoves together using the on board USB connector? Probably a stupid question, but I need to ask.

No
[edit]They are both usb 'slaves', and USB needs a master.[/edit]

But you can connect two together using the USART (serial comms) behind the FTDI USB chip. (This would be as good as USB, in that they will talk at the same speed.)

[edit]To connect the serial interface (pin 0 and pin 1) only needs three wires; two for Tx and Rx, and one for ground. Connect the Tx of one Arduino to the Rx of the other (and vice versa), and join their ground connections.[/edit]

HTH
GB

Thanks for the quick response GB. I didn't know about master and slave relationships. Now I need to know if the raw signals from pin 0 & 1 will travel reliably over 2 or 3 meters.

Now I need to know if the raw signals from pin 0 & 1 will travel reliably over 2 or 3 meters.

As wires get longer, they are subject to electrical noise (picking up radio, and domestic appliances like the 'fridge).

Use telephone cable. It is made from two twisted pairs, so use one of the twisted pairs for the serial signal. The twist reduces its sensitivity to noise.
It should be good for more than 2-3 metres in a domestic setting (i.e. not a factory with heavy machinery).

HTH
GB

The raw signals from pins 0 and 1 will travel over 50 metres of cat5 cable in my experience (at least at 9600 baud).

The raw signals from pins 0 and 1 will travel over 50 metres of cat5 cable in my experience (at least at 9600 baud).

Yes, easily 50m, but telephone cable is even cheaper, probably lying around a house, and easy to get (even my local supermarkets sell it).

GB

Some telephone cable doesn't use twisted pairs (depends on the quality, I suppose); stick with a piece of cat5 ethernet cable.

Some telephone cable doesn't use twisted pairs ...

Fair point.
I don't know which country miken lives in, so it was a bad assumption. (Oh the luxury of an over regulated state, where I rarely think of these issues ;))

I was only trying to make it easy for miken by suggestng something very easy and cheap to get hold of.

I reduce my suggestion to:
If you can't see that it's twisted pair,
(and don't live in a country with a tightly regulated telecom industry (e.g. an old EEC member)),
Then use cat5 (which should be printed on the plastic sheath, or is that an EEC thing too :))

Seriously, though, if you have cat5 to hand, or it's easy to get, use it. The difference in cost will be small on 3 metres.

You can test it out with a couple of foot of ordinary wire anyway.

GB

Excellent response(s). I live in Spain, where they don't use twisted pair, but ethernet cable is freely available.

I'd been expecting to have to use a line driver/receiver.

I understand it to be necessary to disconnect my wires from pin 0 & 1 whilst programming over USB. Is there a way to do this without having to physically break the connection with a switch or connector?

I understand it to be necessary to disconnect my wires from pin 0 & 1 whilst programming over USB.

Yes, somehow you need that effect.

... Is there a way to do this without having to physically break the connection with a switch or connector?

Do you mean is there an electronic way to do it, i.e. "put an X in the cable and disable/enable it like this", or do you mean something else?

GB

Sorry, I'm not trying to be obtuse.

If you want an electronic solution, start off with something cheap and easy to get like a 74HC244 OCTAL TRI-STATE BUFFER, which are 'cheap as chips (French fries)'

It has two sets of 4 buffers, which are independently controllable. So for experiments, you could use one to connect/disconnect both sides

You should pull the enable (which is active when it is low) high with a resistor, so that it is disabled when the Arduino is reset. Then pull it low with an Arduino pin, pr a jumper when you want to talk to the other Arduino.

GB