Pages: [1]   Go Down
Author Topic: RS232, MAX232 & Serial MEGA  (Read 2015 times)
0 Members and 1 Guest are viewing this topic.
Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 4
I love arduino!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'am arduino newbie... smiley

I have create a new project for read four serial ports. I using Serial Port Arduino Mega(Serial 1,2) and MAX232 transceivers (for the conversion RS232 to TTL 5V) like this:http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232

My PC Serial  exit with 3 wires (RX,TX and GND)

 smiley-evil have a problem: If I use Arduino serial embedded, the data reading it works only with GND not connect... and if I use the serial connected to MAX232  it works only with GND CONNECTED!!!...

Somebody help me???

Thanks a lot and sorry for my english!  smiley-roll-sweat
Logged

MM

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 627
Posts: 34233
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If I use Arduino serial embedded, the data reading it works only with GND not connect.
What ground where?
It is hard to know what your setup is, you do not describe it.
Grounds must always be common.
Logged

Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 4
I love arduino!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I explain you better...

In my simulation i have connected the serial on PC for trasmitted data.
My cable have 3 wires:
Green: TX
Blue: RX
Black: GND

====================================
Step1: Connect My serial directly to arduino:

Green on TX1
Blue on RX1
Black not connected

And I reading all data!! .. If connected black wire (GND) on arduino GND the serial data stopped work


====================================
Step1: Connect My serial to MAX32 thought arduino digital pin:

Green on ArduinoPIN10
Blue on ArduinoPIN10
Black Arduino GND

And I reading all data!! .. If I disconnect black wire (GND) on arduino GND the serial data stopped work


thanks....
Logged

MM

Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 4
I love arduino!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley i'm sorry... Errata corrige

====================================
Step2: Connect My serial to MAX32 thought arduino digital pin:

Green on ArduinoPIN10
Blue on ArduinoPIN11
Black Arduino GND

And I reading all data!! .. If I disconnect black wire (GND) on arduino GND the serial data stopped work
Logged

MM

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oof! That page referenced looks like a plate of spaghetti. As G_M says, all the grounds in
such a setup should be common. With spaghetti like that, 99% probably you have something
plugged into the wrong slot on the whiteboard.
Logged

Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 4
I love arduino!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-red smiley-red smiley-red

the plugs are OK!

what are kind of differences between "Arduino Serial embedded" and this "http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232" ?
Logged

MM

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The arduino chip (328P) outouts 5V and 0V from the serial output an board. The Max 232 ouptus a more proper +5V and -5V. when you hook the wires up directly WITHOUT GROUND the float on the wires work to have the signals slide around and fall in a voltage range that your PC serial port is able to function with. For Now. re-arrange your desk or add some other circuit somewhere and things may not float the same and it will quit working.

Or in other words - You Got Lucky!
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 627
Posts: 34233
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Step1: Connect My serial directly to arduino:

Green on TX1
Blue on RX1
Black not connected

And I reading all data!! .. If connected black wire (GND) on arduino GND the serial data stopped work


===================================
This is wrong, it is nt happening like you think,you have another mistake that is making you think it is working OK just because you are reading data. You got lucky with your fault. You need to find the real fault so that connecting the ground does not stop it working.
Logged

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyway, connecting directly the Pc serial port to the arduino is not a good way of doing it ! You will burn the digital pins of arduino.

Can you post a schema of the way you interface the MAX232 IC to the arduino ?

May be it will allow us to understand.

I had never trouble with arduino + MAX232 + Serial PC.

Grag
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

He says he followed the scheme in the link given in the first posts, and says his
connections are totally correct.
Logged

Pages: [1]   Go Up
Jump to: