Pages: [1] 2   Go Down
Author Topic: Connecting directly using RS-232?  (Read 2895 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to connect directly to the Arduino, without using USB? I would like to connect it to a traditional COM-port instead. I have an Ardiuno Duemilanove... Any ideas?
Logged

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

Yes you need to use an RS232 to TTL level converter chip. I use the MAX202 but there are lots of them. You then connect the chip to pins 0 & 1.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have some schematics for it?
Logged

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

It is in the data sheet of what ever converter chip you decide to use.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you need to use an RS232 to TTL level converter chip. I use the MAX202 but there are lots of them. You then connect the chip to pins 0 & 1.

You will lose the automatic reset feature used to upload sketches from the Arduino IDE unless you also convert the RS-232 DTR signal to a ttl level and then through a series wired .1ufd cap to the arduino reset pin. Unless you are willing to just use the manual reset switch when uploading sketches, but you will have to learn the timing of the reset switch.

Lefty

Logged

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

For an example of using this chip along with the auto reset see the schematic in this project
http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.html
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have now ordered som MAX202's... I don't need the auto-reset functionality, as the chip isn't going to be reprogrammed. What I do need however, is a simple wiring diagram to connect it. I'm quite sure I understand the diiagram from the CNC-thingy (which was ultra cool, by the way) - but could somone draw it up, with just the basic send/recive-functionality?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will this do? Or, do I need something connected to pin 6 and 15 (on the MAX202), despite not using the reset?

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49386
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are not, of course, required to use pins 0 and 1 (the hardware serial port). You can use NewSoftSerial and any two other pins.

Unless you have a Mega, with 4 hardware serial ports...
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You may also find the following useful...

http://www.arunet.co.uk/tkboyd/ec/ec1ser232.htm
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But, other than the fact that I could use other digital ports, would the above work? Would II be able to send and receive commands from my arduino?
Logged

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

Yes but you have included the reset on pin 9
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, I can leave out the connection between pin 9 (on the Max202) and pin 1 ?
Logged

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

Yes if you don't want the auto reset.
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But, other than the fact that I could use other digital ports

Which "above"? (Rhetorical). The page I gave tells you how to send and receive commands. You have to be able to program the connected device, unless it is already set up to hold up its end of the "conversation", though.
Logged

Pages: [1] 2   Go Up
Jump to: