Author Topic: Serial to i2c chip?  (Read 6214 times)

0 Members and 1 Guest are viewing this topic.

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
Serial to i2c chip?
« on: February 10, 2015, 07:27:44 am »
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
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Serial to i2c chip?
« Reply #1 on: February 10, 2015, 09:06:53 am »
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.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Serial to i2c chip?
« Reply #2 on: February 10, 2015, 11:49:42 am »
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".
 

Offline rexxar

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
Re: Serial to i2c chip?
« Reply #3 on: February 10, 2015, 04:02:54 pm »
I think he means that they have 50 serial devices to interface with, so they want a bus rather than using 50 serial ports.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Serial to i2c chip?
« Reply #4 on: February 10, 2015, 04:37:01 pm »
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.
« Last Edit: February 10, 2015, 04:41:31 pm by Rigby »
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Serial to i2c chip?
« Reply #5 on: February 10, 2015, 05:40:50 pm »
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.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Serial to i2c chip?
« Reply #6 on: February 10, 2015, 05:53:41 pm »
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.)
 

Offline AsimTopic starter

  • Regular Contributor
  • *
  • Posts: 171
Re: Serial to i2c chip?
« Reply #7 on: February 10, 2015, 05:57:18 pm »
I think he means that they have 50 serial devices to interface with, so they want a bus rather than using 50 serial ports.


You are right
 

Offline IanJ

  • Supporter
  • ****
  • Posts: 1736
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: Serial to i2c chip?
« Reply #8 on: February 10, 2015, 06:10:45 pm »
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
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Serial to i2c chip?
« Reply #9 on: February 10, 2015, 09:44:26 pm »
Starting to sound like the OP is chasing the wrong solution.
Perhaps post the problem - and we may suggest alternatives.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: Serial to i2c chip?
« Reply #10 on: February 10, 2015, 09:56:00 pm »
I think he means that they have 50 serial devices to interface with, so they want a bus rather than using 50 serial ports.
If that is the case: RS485
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6575
  • Country: nl
Re: Serial to i2c chip?
« Reply #11 on: February 10, 2015, 10:10:02 pm »
I think he means that they have 50 serial devices to interface with, so they want a bus rather than using 50 serial ports.
If that is the case: RS485
+1
 

Offline daedalus

  • Regular Contributor
  • *
  • Posts: 140
  • Country: gb
Re: Serial to i2c chip?
« Reply #12 on: February 11, 2015, 02:59:20 pm »
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 gbp

a cheaper option would be buying a load of usb-rs232 dongles, that can be had for 4.15 usd each. Total cost 135gbp

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

« Last Edit: February 11, 2015, 03:02:10 pm by daedalus »
 

Offline diegosfb

  • Contributor
  • Posts: 16
  • Country: ar
Re: Serial to i2c chip?
« Reply #13 on: February 11, 2015, 05:08:13 pm »
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
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Serial to i2c chip?
« Reply #14 on: February 11, 2015, 05:16:56 pm »
Hmm, let us first define the problem/project and the project requirements before we define a solution :D
 

Offline elgonzo

  • Supporter
  • ****
  • Posts: 688
  • Country: 00
Re: Serial to i2c chip?
« Reply #15 on: February 11, 2015, 05:27:19 pm »
Hmm, let us first define the problem/project and the project requirements before we define a solution :D

Nah, it's way more fun to debate possible best solutions with knowing as little as possible about the problem scenario...  >:D
That said, i join the fun and agree with nctnico about RS485 most likely being one of the best choices.
« Last Edit: February 11, 2015, 05:35:24 pm by elgonzo »
 

Offline Pjotr

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: nl
Re: Serial to i2c chip?
« Reply #16 on: February 11, 2015, 09:11:29 pm »
:lol:  Ok, go ahead....
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Serial to i2c chip?
« Reply #17 on: February 11, 2015, 11:56:35 pm »
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 :)
 

Offline Dave Turner

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Serial to i2c chip?
« Reply #18 on: February 12, 2015, 08:04:58 pm »
How far apart are the nodes?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf