Serial to i2c chip?  - Page 1
Forum section: electronics / projects

author: Asim
author_rank: Regular Contributor
timestamp: February 10, 2015, 07:27:44 am
content: Hi,A freind of mine has a project that requires sending serial date to a pc the problem is he has 50 serial port he wants to interface to a pc and he wants to minimize the date cables used .Any suggetion?Thanks

author: SL4P
author_rank: Super Contributor
timestamp: February 10, 2015, 09:06:53 am
content: Not getting the problem yet...If he has 50 existing serial ports, then why not send data via whatever levels the serial ports are using?Or if the serial ports are all in use - perhaps use serial over ethernet (telnet like...)Is the problem synchronous to any other events?Either way - taking I2C outside the box is not really a solution that would make many engineers happy.Why choose I2C? Do you have a spare I2C buss sitting idle?If it must be serial, and the PC slots are full - lok at devices like the Rocketports whuich present multiplke RS422/232/485 ports on an ethernet connection (COM drivers on the PC), or a generic ethernt to serial adapter from eBay.

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 10, 2015, 11:49:42 am
content: I would say look at rs232 to ethernet converters. There are single port ones and multi port ones, boxed ones and small PCB blocks the size of just a RJ connector. Simply Google for "rs232 to ethernet".

author: rexxar
author_rank: Frequent Contributor
timestamp: February 10, 2015, 04:02:54 pm
content: I think he means that they have 50 serialdevicesto interface with, so they want a bus rather than using 50 serial ports.

author: Rigby
author_rank: Super Contributor
timestamp: February 10, 2015, 04:37:01 pm
content: SPI & shift registers are how I might initially approach that.I2C is much slower than SPI and is a pain to use compared to SPI.50 serial devices @ 9600bps exceeds the most common I2C speed I've used (400kbs). Driving SPI @ 25MHz is easily done.As already mentioned, serial to Ethernet would be another good thing to research.edit: an FPGA would easily handle this, by the way. If you're capable of doing digital design work, anyway.

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 10, 2015, 05:40:50 pm
content: SPI is not intended as a dedicated bus but merely for a limited number of devices. It can be used as a bus but then you need either to enable each device by a HW line or implement a kind of protocol yourself.We don't know what OP wants to interface and how fast. If it is sensors and drives and it has to be fast, EtherCat is also an option (but expensive).Advantage of RS232 to ethernet is you get needed PC drivers and software with it.

author: Rigby
author_rank: Super Contributor
timestamp: February 10, 2015, 05:53:41 pm
content: Nah, I meant just stringing a bunch of shift registers out of the SPI data lines, not addressing each shift register independently. Just sending and receiving to all 50 at once, basically, then pulling it all apart in code (or hardware, if using an FPGA.)

author: Asim
author_rank: Regular Contributor
timestamp: February 10, 2015, 05:57:18 pm
content: Quote from: rexxar on February 10, 2015, 04:02:54 pmYou are right

author: IanJ
author_rank: Unknown
timestamp: February 10, 2015, 06:10:45 pm
content: Many years ago I used Lantronix serial thin servers to interface a number of serial devices to multiple PC's as well as to each other.You would have to check Lantronix website but they used to do single servers (1 serial port) as well as 4-port models or more which allow you to cut down on the hardware.An app on the PC takes the data via the Ethernet port and decodes it out to any number of virtual serial ports which your own apps can then access. Although 50 virtual ports sounds like a heck of a lot especially if they are running fast and with a lot of data. However, as I said that was many years ago.All the best.Ian

author: SL4P
author_rank: Super Contributor
timestamp: February 10, 2015, 09:44:26 pm
content: Starting to sound like the OP is chasing the wrong solution.Perhaps post the problem - and we may suggest alternatives.

author: nctnico
author_rank: Super Contributor
timestamp: February 10, 2015, 09:56:00 pm
content: Quote from: rexxar on February 10, 2015, 04:02:54 pmIf that is the case: RS485

author: Kjelt
author_rank: Super Contributor
timestamp: February 10, 2015, 10:10:02 pm
content: Quote from: nctnico on February 10, 2015, 09:56:00 pm+1

author: daedalus
author_rank: Regular Contributor
timestamp: February 11, 2015, 02:59:20 pm
content: depends how you use the 50 devices, there are shortcuts you can take if you are only writing the same data to all devices, or only interacting with devices one at a time. That said all of those require a custom board. Assuming the worst case, you really need a tx/rx buffer per channel.I am assuming this is a one-off job, and you are not going to be making many 50 port serial adaptors for people. Before designing something maybe you should consider off the shelf options.if you need high reliability, you can buy 16 port pci-express RS232 port cards for around the 150 gbp mark, and 3 of those would get you close enough that with the internal rs232 ports you would be fine. Total cost 450 gbpa cheaper option would be buying a load of usb-rs232 dongles, that can be had for 4.15 usd each. Total cost 135gbpbeating 4 dollars a channel is going to be tough on a custom board solution for a one off pcb, when you have connector, rs232-whatever ic, etc per channel. Personally I wouldn't bother doing a board for this unless there was a real good reason the usb dongles couldn't work.Edit: I of course agree with nctnico that if you have control over the design of the device being connected, then RS485, usb, or Ethernet would all be more suitable interfaces.

author: diegosfb
author_rank: Contributor
timestamp: February 11, 2015, 05:08:13 pm
content: RS232 to RS485 converters are really easy to make, and an RS485 network has the advantages of extended range, noise immunity (its differential) and acceptas many connections to one network.Ethernet or usb are also good but usually more expensive

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 11, 2015, 05:16:56 pm
content: Hmm, let us first define the problem/project and the project requirements before we define a solution

author: elgonzo
author_rank: Unknown
timestamp: February 11, 2015, 05:27:19 pm
content: Quote from: Pjotr on February 11, 2015, 05:16:56 pmNah, it's way more fun to debate possible best solutions with knowing as little as possible about the problem scenario...That said, i join the fun and agree with nctnico about RS485 most likely being one of the best choices.

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 11, 2015, 09:11:29 pm
content: :lol: Ok, go ahead....

author: nuno
author_rank: Frequent Contributor
timestamp: February 11, 2015, 11:56:35 pm
content: Maybe he has access to the interfacing code&hw at both ends, so he can use RS232 with the 9th bit to address the slave devices. Just wanted to contribute too

author: Dave Turner
author_rank: Frequent Contributor
timestamp: February 12, 2015, 08:04:58 pm
content: How far apart are the nodes?