Pages: [1]   Go Down
Author Topic: Trying to communique Arduino mega to Duemilnove over serial  (Read 1621 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:-)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8432
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Fl
Offline Offline
Newbie
*
Karma: 1
Posts: 13
Arduino just like Linux ... Just smaller and crunches when you chew it.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might want to be sure to power both board from the same supply.
You may be dealing with a ground potential issue.
Logged

16 Mhz Arduino.... 8 times bigger then an Altair 8800 smiley!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: