Serial to Ethernet Conversion

Hey guys,

I am not wanting to buy an off the shelf piece of hardware to do this. I want to try and do it myself.

What I want to do is take an RS232 signal and pass it through using ethernet. I have a car wash vacuum and the timer has RS232. I want to be able to talk to it over more distance than the 232 will allow.

I think there is an IC that should do this. Im thinking maybe a pre-programmed microcontroller? Can anyone point me in a direction to get started?

I dont know a lot about ethernet so this is a challenge that I am wanting to try and accomplish without buying the already designed part.

Thanks ahead of time.

Reply to
jlwilson1
Loading thread data ...

Get a Linksys NSLU2 and hack it (google for NSLU2 and Linux). There will be plenty of fun in this project even with buying the hardware.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Lantronix

formatting link
or Digi
formatting link

Make serialEthernet converters (as well as WiFi). They also offer libraries for virtual serial ports at the "PC", rather than "embedded", end.

Andrew

Reply to
Andrew Jackson

Fair enough.

Why ethernet? What sort of distance is involved? RS232 can travel quite a distance, or you could convert to a differential signalling mode for even greater distance.

Certainly a challenge.

Reply to
budgie

I'm sure there are multiple solutions out there available, but the one I am personally most familiar with is the ENC28J60 by Microchip and available at Digikey.

formatting link

The device communicates with a microcontroller via an SPI interface. So, this would require a two chip solution, one being the ENC28J60 and another being a microcontroller with an integrated UART and SPI interface.

If you wait a little while Microchip has plans to start releasing some microcontrollers with built in ethernet capabilities (Ex: PIC18F97J60 and it's close relatives), and no doubt at least some if not all of them will include UART capabilities.

Reply to
Fritz Schlunder

The OP asked for pre-programmed.

The microcontroller will need some kind of program running.

Not for the faint of heart.

Good Luck

donald

Reply to
Donald

The most sensible solution would be to use RS422. One pair per signal wire.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

this.

Famous last words ;-)

to

Well, if you use optic fiber for the RS-232 then it will go a loooong way!

The cheap-ish plastic fiber will go for about 1 km, Glass almost as long as you can get it.

part.

Consider what you need.

Protocol conversion is *hard* - if what you mean by "ethernet" is that the device is somewhere on the Internet then you need something like XML-RPC to translate from commands HTTP IP HTTP RS-232 (commands).

And infrastructure such as domain names and a computer.

If what you need is a "longer wire" then stick with RS-232 and use a better electrical interface like f.ex. fiber or current loop.

Reply to
Frithiof Andreas Jensen

RS-232 is a surprisingly robust - even though the spec might officially say that you can't exceed "n" feet, you almost certainly can go five times the official distance and it will work (well, mostly). You may have to go to a lower baud rate. The next step up is to use differential RS-422, or to use short-haul modems. All of these are entirely off-the-shelf solutions.

RS-232 is substantially less robust if real drivers and receivers are not used (e.g. lots of hobbyist projects where they assume TTL levels are mostly compatible with RS-232...)

There are good reasons (especially if you have multiple devices and can actually make use of a real network) to go with ethernet. Otherwise I would recommend sticking with something simple.

Tim.

Reply to
Tim Shoppa

The reason I chose ethernet was because my car wash's network is ethernet based.

I have a system where the customer can get a code (from the gas pump at the neighboring gas station) and enter that code to get a car wash. I am wanting to put this into affect with the vacuums as well. This way my customers can use the code to detail their entire car.

The vaccuum manufacturer's timer has the RS-232. The code system I have has ethernet.

Also the vacs are about 150 ft from the service room where the central system is located. I didnt want to run RS232 that far.

RS485 would be my choice but I want to use what my system already uses for the self-serve bays and the automatic.

I know this may seem like a big project. If I cannot do it then I cannot do it. I am at least wanting to attempt it and at worst all I can do is learn some things on the way to my failure!!

Reply to
jlwilson1

Don't get me wrong, I admire the fact that you're prepared to take on a challenge like this. But I often have the impression that people conceive one solution and in so doing disregard the possibility of others which may be simpler.

RS485 would certainly eat that distance. Back in my days on campus, we ran RS232 several hundred yards (yep, Australia wasn't metricated then) at 9600 between buildings without drama. But nowadays I'd certainly go with a balanced line system.

Reply to
budgie

Okay, sounds reasonable.

If you are willing to do some software work (learning experience value), you might look at the MC9S12NE64, which is a microcontroller from freescale with pretty much an entire ethernet interface (except the transformer) in it. You will have to take the example ethernet code though, and modify it to do what you need.

There are some more packed chip/module solutions from connectone which might save you modifying ethernet code, however you will have to learn how to configure them.

Reply to
cs_posting

The big question though regarding Ethernet, is 'quantity'. Ethernet, involves you in having to implement the TCP/IP software part. Now this is not trivial. Some sections are 'off the shelf', but some are charged for, or involve a lot of work. You then have to implement the virtual serial port driver at the other end, or a direct software ethernet drive. There is also the implementation of the Ethernet hardware interface at the remote unit as well. If the quantity is less than perhaps 100 off (and probably more like 500 off), it is going to be significantly cheaper to use an off the shelf virtual Ethernet serial interface. Such units are available for less than $100, and the development time/cost of the hardware/software makes these a much better choice. It is a much 'bigger' project than I think the poster is aware of.... RS485/422, would definately be the much simpler choice. I'd suggest the poster have a look at units like the eCov-100, or 115. There are also Ethernet units, built into assemblies the size of matchboxes. A search for the EM100, and EM200 modules, might be helpful.

Best Wishes

Reply to
Roger Hamlett

Use RS485 oder RS422 which uses differential receivers and transmitters. Using diffential signalling you can achieve line length of a few hundred meters and can still use standard uarts.

--
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de
HTML mails will be forwarded to /dev/null.
Reply to
Peter Heitzer

Perhaps you are using 10/100 Mbit which requires only 4 Pins of the RJ45 socket but have a 8 wire cable to each socket. In this case you could use the 4 wires with RS485. If you indeed want to use ethernet then do a search for "Ethernut".

--
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de
HTML mails will be forwarded to /dev/null.
Reply to
Peter Heitzer

150ft? That's peanuts for RS232 at baudrates up to 19200 bps.
--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

I'd suggest you look for a cheap little embedded processor board with Ethernet and serial ports on board, and program it up to do your conversion. It's highly likely that you'll want to do some interpretation and changes to the commands and data coming out of/in to the different equipment so a small uP is the way to go. If this doesn't meet your criteria to 'build it yourself' then you're probably aiming at the wrong solution.

You might want to consider the use of 802.11 between the service room and the vac equipment (with the serial IP converting uP located there) to avoid cabling, or if you don't like radio (and who trusts RF stuff anyway?? :) the use of fibre will go a long way to avoid interference which may be an issue on a site like yours. A 150' link is pretty inexpensive.

Cheers.

Ken

Reply to
Ken Taylor

If you're really set on ethernet for the connection and building from scratch, I suggest a lengthy visit to Jan Axelson's site at

formatting link
Jan has published a number of books related to your endeavor, dealing with serial ports, parallel ports, imbedded ethernet, etc. All right up your alley. I recommend that you spend a few evenings surfing the links on her site and learning more about the technologies before starting earnestly on your project. You'll definitely learn something and you might find a better way to get the job done.

--
Dave M
MasonDG44 at comcast dot net  (Just substitute the appropriate characters in the 
address)

Never take a laxative and a sleeping pill at the same time!!
Reply to
DaveM

Thanks,

I actually bought her Serial Port Complete book just a couple weeks ago. Havent started reading it yet though.

A uP is what I was looking at buying. If the code needs adjusted then I have a programmer that can help me with that.

I dont know the ethernet protocol well enough to tackle this right now. I am just wanting advice so I can get there eventually.

Thanks

Reply to
jlwilson1

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.