Go Down

Topic: Trying to communique Arduino mega to Duemilnove over serial (Read 2002 times) previous topic - next topic

martin_michaelsen

Hey folks.

I am trying to send some serial data from a Mega to a Duemilnove.

I have connected the Mega to Duemilnove with the RX and RX (and ground is on)

The problem is that the Duemilnove seams to be be powered by the Mega even if there is no external power on the Duemilnove.

The funny thing is that when in this state I can communicate fine between the two boards but when I connect power to the Duemilnove no transmission can be done.

What the heck am I doing wrong? I have tried to use the SoftwareSerial but that gives the same problem.

Help me ArduinoKenobi. You,re my only hope:-)

CrossRoads

Don't you need Mega Tx connected to Duem RX and similarly Rx to Tx for the other direction?
And Gnd to Gnd of course.
I have 2 prominis talk that way with no problem over 80 feet of wire.  +5s can be seperate sources.
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.

Graynomad

Quote
The problem is that the Duemilnove seams to be be powered by the Mega even if there is no external power on the Duemilnove.

This is quite common, the tx signal is powering its host chip through the ESD protection diodes. All (most) pins have a diode from the pin to VCC to shunt ESD pulses, however it also provides a path for normal Vs to VCC and therefor the entire circuit board.

Quote
The funny thing is that when in this state I can communicate fine between the two boards but when I connect power to the Duemilnove no transmission can be done.

The above doesn't explain this, as CR said, you really have Tx->Rx and Rx->Tx don't you?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

nealz

You might want to be sure to power both board from the same supply.
You may be dealing with a ground potential issue.
16 Mhz Arduino.... 8 times bigger then an Altair 8800 :)!

CrossRoads

You don't need to power both from the same supply. They do need to have the same ground, and Tx connected to the matching Rx.
I have a 'main' box that brings in 5V and powers 2 prominis from that.
The 5v then goes thru a 5v to 12V converter, the 12V and ground goes thru 40 feet of cable to a remote box with its own 7805 to make 5v for the promini there.
In fact, there are 2 such remote boxes, each converting 12V to ground (needed 12V to power 4 strings of 5 LEDs, that the promini controls via transistor). The primary promini in the main box receives data from the secondary promini, formats it some and sends it out to the prominis in the remote boxes. The only common connection between all 3 boxes is ground.
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.

martin_michaelsen

Sorry. My TX of the Mega is of course connected to the Duem RX. Even if i reverse the connection the Duem is powered from the Mega.

The boards are powered from the same source. I even tried separate sources.

Any other suggestions?

Go Up