jeffy
Posts: 11
Joined: Fri Apr 27, 2012 3:37 pm

Re: How to get multiple UARTS?

Fri Apr 27, 2012 5:15 pm

Hi Everyone.

R-Pi caught my eye so I been checking out documentation. I see the Broadcom chip supports 2 UARTS but only 1 is brought to the header? UART0? I have no problem converting TTL to RS232 voltage levels.

I have an application in which I'd like to have minimum of 2 UARTS, 3 at best. I can live with 2. How would it be best done with R-Pi? Do we have to use USB to RS232 convertors? Are any of the ARM pins re-assignable from i2c to UART (like some micros?)

What are my options?   Thanks

Jeff

User avatar
Gert van Loo
Posts: 2482
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: How to get multiple UARTS?

Fri Apr 27, 2012 5:38 pm

Simplest solution is to use a USB hub and from there you can use USB to RS232 converters.

jeffy
Posts: 11
Joined: Fri Apr 27, 2012 3:37 pm

Re: How to get multiple UARTS?

Fri Apr 27, 2012 5:55 pm

Thanks Gert!

I like simple

As long as they retain their port assignment. I have not had problems with the USB-to-RS232 devices in the past... so perhaps it is the best way too.

Cheers

Jeff

domesday
Posts: 258
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK

Re: How to get multiple UARTS?

Fri Apr 27, 2012 6:00 pm

Alternativly use a MAX3110E SPI URART to use the SPI connections on the GPIO connector.

jeffy
Posts: 11
Joined: Fri Apr 27, 2012 3:37 pm

Re: How to get multiple UARTS?

Fri Apr 27, 2012 6:15 pm

That's a good idea too. It hadn't crossed my mind... thanks Darren. Wow, lots of options. 1 x UART to RS232 + 1 x SPI to RS232. I'd rather whip up a board to handle the voltage conversions than use a large bulky hub + rs232 converters. So long as there is enough documentation to handle the spi.

I want to built an app in C to handle serial communications with a number of different serial devices... like a serial thermal printer and such.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12123
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How to get multiple UARTS?

Fri Apr 27, 2012 10:41 pm

Yet another alternative is to use a small microcontroller with three serial ports (UART's). Send commands to it from the R-PI with information to which of the two other serial ports to forward the data to, and receive packages of received data from the two other serial ports, with information pertaining to from which of the two serial ports the data was received from.

Obviously you then also have to get/write the scheduler software for the microcontroller, but I have done something similar in the past. the advantage is that the main CPU doesn't have to have SPI, only a serial port.

The parallax propeller http://www.parallax.com/tabid/.....ult.aspx 

is an ideal little chip for such an application, its possible to program it to have eight UARTs.

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: How to get multiple UARTS?

Sat Apr 28, 2012 8:28 am

jeffy said:


Thanks Gert!

I like simple

As long as they retain their port assignment. I have not had problems with the USB-to-RS232 devices in the past... so perhaps it is the best way too.


The best USB to RS232 adaptors I've found are the ones based on the FTDI chip set. They seem to remember their port assignment, even if they are plugged into a different USB port. The RS232 side seems to be better as well.

Many devices will be consistent as long as they are always plugged into the same USB port - including using the same port for a hub if one is involved.

All this is based on experience with Windows but I expect that Linux will be much the same.

jeffy
Posts: 11
Joined: Fri Apr 27, 2012 3:37 pm

Re: How to get multiple UARTS?

Mon Apr 30, 2012 6:56 pm

Thanks Mah,

I actually have done the rs232 redirection as well with an atmel ATXmega chip... 1 port in, 3 ports out... Yup... it is an option too... and tempting... although a tad more proprietary.

It'll be a long time before rs232 dies. There is more diagnostic equipment out there with rs232 than people on earth I think.lol.

I need the transmission distance too... or used to need it. (150' +) Now with the Pi... I am wondering if I can re-create a project that will collect rs232 data locally... then save information on a mysql server else-where via network. I believe I ought to be able to. Don't know enough about the Pi yet nor have one.

I can go almost any way on the rs232 stuff so far. Maybe one built-in UART and a USB adaptor... so many choices

Jeff

plugwash
Forum Moderator
Forum Moderator
Posts: 3439
Joined: Wed Dec 28, 2011 11:45 pm

Re: How to get multiple UARTS?

Mon Apr 30, 2012 7:18 pm

Note that FTDI make multiport USB-serial chips so you can get up to four uarts off one USB port. I think you are also less likely to have problems with ID retention with one multiport chip than with serveral seperate chips on a usb hub.

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: How to get multiple UARTS?

Mon Apr 30, 2012 8:20 pm

I guess this is one example: "FTDI USB-COM232-PLUS4"

Looking at the price reminds me what a good deal the RasPi is!

http://parts.digikey.com/1/par.....plus4.html

plugwash
Forum Moderator
Forum Moderator
Posts: 3439
Joined: Wed Dec 28, 2011 11:45 pm

Re: How to get multiple UARTS?

Mon Apr 30, 2012 9:00 pm

jbeale said:


I guess this is one example: "FTDI USB-COM232-PLUS4"

Looking at the price reminds me what a good deal the RasPi is!

http://parts.digikey.com/1/par.....plus4.html


Well that is the demo board, the raw chip is only arround $10.

jeffy
Posts: 11
Joined: Fri Apr 27, 2012 3:37 pm

Re: How to get multiple UARTS?

Tue May 01, 2012 8:46 pm

that's a cool little puppy plug... and I like it. Mounting holes, LEDs and more... looks quite presentable out of the box. Doing a proper enclosure is like 1/4 the work. $49 isn't too bad once you add up the board, LEDs, chips, connectors... maybe 1/3 the price in large qty out of china. Don't need to go there... yet.

Enough rs232 to expand horizons beyound what I need.

Jeff

blackthorn
Posts: 1
Joined: Sun Jun 10, 2012 11:52 pm

Re: How to get multiple UARTS?

Wed Jul 04, 2012 1:19 pm

I was in the process of building an arduino project needed multiple UART ports and stumbled across a multiplexer that allows for the connection of multiple UART devices to a single port. http://atlas-scientific.com/product_pag ... s-232.html while it isn't REALLY adding extra ports (you merely switch between devices) it could be suitable for certain applications.

It has an NXP 74HC4052 http://www.nxp.com/documents/data_sheet ... CT4052.pdf

One day i'll move my arduino project (which comprised of measuring pH and other water parameters using uart sensors from atlas) to the Raspberry PI as it's much cheaper than an arduino mega with ethernet.

Hope that helps someone out there.

Cheers,

William

selsinork
Posts: 151
Joined: Mon Apr 16, 2012 8:31 am

Re: How to get multiple UARTS?

Wed Jul 04, 2012 4:30 pm

domesday wrote:Alternativly use a MAX3110E SPI URART to use the SPI connections on the GPIO connector.
Or a SC16IS762 dual port

Return to “General discussion”