All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Computing and Networks

Notices

Computing and Networks Discussion forum for general computing technologies, personal computing, data networking, information technology, and computer systems engineering.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-19-2010, 07:30 AM
Mathematics! Mathematics! is offline
Senior Member
 
Join Date: Jul 2008
Location: Ma United States
Posts: 771
Default usb ?

So I looked at the usb pin out and basically it
is

pin 1 5vdc VCC
pins 2 and 3 transmitter , reciever data
pin 4 GND

When I look up the cat5e pinout it is just 4 pairs of wires that are used for transmitting data / receiving data... so I could use any pairs probably should stick with the tx , rx main ones...

To make a usb to ethernet converter cable is it as easy as just putting pins 2 , 3 of usb onto the first tx , rx pins of the cat5e wire and VCC , GND on the second pair?

I am curious if ethernet cat5e operates at 5vdc as the usb does if so then getting the correct pins and wires should be it if not then some conversion most be made to to get it to the correct voltage ,...etc

Any input would be great I am not willing to buy this cord I want to make it from scratch.

Any help would be great because I am not sure what the voltages used for the cat5e cords are usually for network nic card/ router stuff anybody know?
Basically how much voltage is used in ethernet cat5e , cat6 cord?
Reply With Quote
  #2  
Old 03-19-2010, 09:28 AM
rjenkins rjenkins is offline
Senior Member
 
Join Date: Nov 2005
Location: Sheffield, England
Posts: 1,008
Default

The actual ethernet signals are roughly 1V if I remember correctly...

I would not refer to RJ45/CAT5 wiring as Ethernet unless you are doing conversion to an actual Ethernet protocol, as it's confusing...

To try linking USB via RJ45 cables, I'd put the data lines on one pair and use one other pair each for 0V and +5V.

(Ethernet interfaces are transformer coupled; each pair used has a transformer winding across it, so putting 5V & 0V on a single pair could cause damage if you ever accidentally cross-connect your USB-over-RJ45 with an Ethernet port).

The older 10/100 MBit Ethernet standard only uses two pairs out of the four, the center pair (usually blue) is left available for telephone use, as an RJ11 can be plugged directly in to an Ethernet socket. The phone system uses 48V DC and 90V? ring signal so that gives an idea of the safe voltage rating of the RJ45 & CAT5 setup.

If the middle pair is Blue, the other spare is Brown. I'd use both browns for +5V, the blue pair for data and green (or both green & orange) as 0V.

That should be safe against accidental connection with other gear.

I can't find any standard for doing this and I don't know if it will work more than a few metres. I think the maximum cable length according to the USB standards is 5m.

You can get Ethernet connected USB extenders, however these are active devices which repeat the data using true Ethernet protocol.
__________________
Robert Jenkins.
Reply With Quote
  #3  
Old 03-19-2010, 05:26 PM
Mathematics! Mathematics! is offline
Senior Member
 
Join Date: Jul 2008
Location: Ma United States
Posts: 771
Default

Basically I am trying to make these from scratch not buy.
http://images.esellerpro.com/2242/I/...B-EXTENDER.jpg

Seems to me that you use one pair for 5vdc and ground
And another pair for data. That would be if your going from cat5 to a usb device

But if I was going from a usb to ethernet device would I only need one pair because the data pair pins on the usb is 0 - 2vdc for a logical 0 and
3 - 5 vdc for logical 1. I don't think you need a power source when going down the cat5 ethernet wire to a router or nic.
So if I convert the data voltage down to 1volt I should be fine. But I am also wondering if I need a second pair of wires because I thought ethernet devices always used 2 pairs of transmitters/recievers but if I am going in one direction maybe I only need one?

Also for ethernet do they use PWM or some kind of modulation scheme I cann't find how they delimit a 0 from a logical one.

Obviously usb is pretty easy just stay in the range of 0 -2 vdc for 0 and
3-5 vdc for 1
But for ethernet the voltage is always 1vdc so their must be some range for a logical zero and one but seems it will be more tightly bound and more prone to error maybe just me.

So USB can only be 5 meters = 16.4041995 feet

before crap happens

Wonder why that happens since cat5e ethernet cables use 1/5th the voltage and I have used them up to 150/200 ft with no signal loss or speed loss. I would think the usb would be able to go farther since their will still be more voltage after the voltage drop on the 22gage wires...
Guess it is probably the fact that usb is not as sensitive or the modulation scheme makes it not usable at long distances since you have to be in the range of 3-5volts for a 1.
But either way you should beable to amplify/repeat the 16ft usb signal over and over again to go distances ....

Thanks for your input

Last edited by Mathematics!; 03-19-2010 at 06:35 PM.
Reply With Quote
  #4  
Old 03-19-2010, 08:34 PM
rjenkins rjenkins is offline
Senior Member
 
Join Date: Nov 2005
Location: Sheffield, England
Posts: 1,008
Default

The gadgets in the picture are usb-over-cat5 extenders, they are not Ethernet.
I'd guess they use balanced line drivers & receivers to match the impedance of the Cat5 cable, allowing long distance operation.

USB uses (roughly) TTL logic levels over a single pair which switches direction. It's similar to RS485 but at much higher data rates, either 12MBit or 480MBit.

You can get active USB extension cables that regenerate the USB data. Up to five x 5m cables can then be daisy chained.

Ethernet uses manchester encoding at 10Mbit or 100MBit etc., transmitted through transformer coupled, impedance matched and terminated unidirectional transmission lines. The distance limits are solely down to signal attenuation over cable length and 100M is the rated length for a single segment (though it would probably work far beyond that with high quality cable).

The protocols and signalling methods and speeds are completely different between USB and Ethernet. True USB to Ethernet adapters are intelligent, processor based units with memory buffers to handle multiple Ethernet data frames (up to 1500 Bytes each frame).

My reason for advising you to split the 0V & 5V over two pairs is that if you ever accidentally connect it to an actual ethernet port, with power on a single pair you would be putting it directly across a transformer winding, which could either burn out the transformer in the ethernet interface or damage the USB port the power is being drawn from.

Info on Manchester encoding: http://www.erg.abdn.ac.uk/users/gorr...pages/man.html
And the Ethernet frame structure: http://www.dcs.gla.ac.uk/~lewis/netw...ernetFrame.htm
__________________
Robert Jenkins.

Last edited by rjenkins; 03-19-2010 at 08:42 PM.
Reply With Quote
  #5  
Old 03-19-2010, 11:35 PM
Mathematics! Mathematics! is offline
Senior Member
 
Join Date: Jul 2008
Location: Ma United States
Posts: 771
Default

Quote:
The gadgets in the picture are usb-over-cat5 extenders, they are not Ethernet.
Ok , so then other then having the ability to extend your cables distance greater then 5m then what exactly would be the use for converting usb to ethernet?

But if I was going to say write a raw program to send data out a usb port
what would I have to do to convert the data into a form that a nic or router ,...etc would beable to process?

Like you told me about Manchester encoding , and the ethernet packet structure (TCP/IP protocal ,...etc) I know how to create a packet and use the Manchester encoding to do it.

But I don't know what voltage means logical 0 or 1 for ethernet devices like routers , nics ,..etc? So I am not sure how to send a zero and a one even though I know how to do everything else.
Is it like the usb split it in half like from 0 to 0.5volts => logical 0 and
0.5 to 1 => logical 1???
If that is the case then all I have to do is use some resistor to drop the voltage in the range of 1volt after I send it out the usb port....

Thanks for your input
Reply With Quote
  #6  
Old 03-20-2010, 09:36 AM
rjenkins rjenkins is offline
Senior Member
 
Join Date: Nov 2005
Location: Sheffield, England
Posts: 1,008
Default

You can't directly control the signals on either the USB or Ethernet ports.

Each has a hardware adapter chip in the machine which can only work at fixed speeds and uses fixed data formats. The two use different data rates, bit encoding and frame formats; they are completely and absolutely incompatible.

Even at the physical level they are totally different. USB has one signal pair which switches between sending and receiving, Ethernet uses two (or four) signal pairs with separate send and recieve.

I designed and built an Ethernet interface a few years back; it used three gate array chips clocked at 160MHz (plus some static ram) just to handle 10Mbit ethernet.
Trying to do any high speed data protocol without a ready-made dedicated device to handle it is incredibly difficult.
__________________
Robert Jenkins.
Reply With Quote
  #7  
Old 03-21-2010, 03:06 AM
Mathematics! Mathematics! is offline
Senior Member
 
Join Date: Jul 2008
Location: Ma United States
Posts: 771
Default

got you.

But just curious what makes the difference of a zero and one in ethernet devices?

I.E you told me about the modulation down the cat5e being Manchester encoding or some variation line code. And I have work with TCP/IP and packet type structures a ton.

However you said ethernet uses around 1volt or 2 ...etc.
What voltage range corosponds to a 0 or 1.

Like if I made an ethernet device with some chips sending data out some pins down a cat5e wire what voltages would represent a 1 and what would represent a zero.

Thanks.
And ethernet uses at least 4 wires out of the 8 wires on the cat5e wire
so then why are their 2 recievers and 2 transmitters and what 2 do I use to recieve and what 2 are for transmitting ... I guess I am a little confused about how the transmission takes place....

I know the modulation scheme , packet structure ,...etc but I don't know how to represent a 0 or 1 interms of voltages and I don't know what wires to send these voltages out and recieve on...

If I knew this I would be all set with knowing how data is sent in ethernet networks ,...etc down a wire.

Thanks
Reply With Quote
  #8  
Old 03-21-2010, 04:41 PM
rjenkins rjenkins is offline
Senior Member
 
Join Date: Nov 2005
Location: Sheffield, England
Posts: 1,008
Default

Each end of each pair is transformer coupled, so all the cables are DC isolated and floating.

I did a lot of research on this when I built my interface boards. As far as I can remember, I used conventional balancel line drivers and receivers, 26C31 and 26C32 or similar.

I matched those to the 100 Ohm transformers with a chain of three resistors across the output of the driver, chosen so the equivalent resistance across the center resistor was about 100 Ohms (and the transformer connected there) with a drive voltage of something like 1V. Possibly a 220 Ohms in the center and 100 Ohms either end from the driver.

The receiver just connected to the transformer with a 100 Ohm terminating resistor across it.

The voltage is not particularly critical as it's going to a differential receiver which works from about 100mV up, so something like 1 - 2V is fine.

Due to the manchester coding, there is no level for 1 or 0. a 'One Bit' is high for the first half of the bit timeslot and low for the second, a 'Zero Bit' is reversed.

The Green and Orange pairs are used for data, which is transmit and which is receive depends which end of the link you are looking at. Computers etc. are wired opposite to Switches/Hubs so pin-for-pin cables can be used.

Here's a nice schematic of a commercial interface setup. In this the transformer module also include line chokes to suppress any unbalanced signal. That prevents electrical noise emission from the cables.

They use a different matching resistor setup to my homebrew board, but the concept is the same - it puts 100 Ohms across each pair to give correct termination. They also link all the pairs to a common point using resistors, presumably to prevent voltage building up between cores within the cables.
http://www.nist.gov/smartspace/image..._Schematic.jpg

And another schematic, this one using a Microchip ENC28J60. Very similar in concept but this one can be used with a PIC!
http://www.animalrobots.eu/wp-conten...thernet_02.jpg

(Both from Google Images, searching 'ethernet transformer').
__________________
Robert Jenkins.

Last edited by rjenkins; 03-21-2010 at 04:49 PM.
Reply With Quote
  #9  
Old 03-21-2010, 07:07 PM
Mathematics! Mathematics! is offline
Senior Member
 
Join Date: Jul 2008
Location: Ma United States
Posts: 771
Default

Right! Manchester code

In your links I am curious ENC28J60 is for is this a line driver that is just used to invert the bits?

Also what is the purpose of the 80225 chip is this a line driver as well?

Can you just use a MCU Avr chip and a few transfomers ,resistors ,caps ,...etc and leave out these chips if inverting is not an issue? For instance if you are using 10BT devices.

For the clock signal for Manchester code for ethernet devices their must be a standard is this 25MHz because if you don't have a standard clock signal for the data then the bit boundaries will not be correct and could screw up the data sampling...etc???? I guess it would depend on the data transfer and what version of ethernet but they should beable to be backwards compatible ? <---wondering how this works and how to figure out the clock cycle signal should be?

Thanks I will probably need a little more guideness before I start my usb projects.... It's great that you could do all that really cool man.

Last edited by Mathematics!; 03-21-2010 at 07:18 PM.
Reply With Quote
  #10  
Old 03-21-2010, 11:03 PM
rjenkins rjenkins is offline
Senior Member
 
Join Date: Nov 2005
Location: Sheffield, England
Posts: 1,008
Default

Those chips are the Ethernet protocol handlers. The big one is the type of thing that would be on a PC I/O card, the 28J60 works with a PIC or other MCU & connects via the SPI data port. That's what I'd use if I was going to add ethernet to a project nowadays.

The micro writes a frame of addressing & data to the protocol handler and that does all the buffering, timing, error checking etc., for the actual line protocol.
Likewise for receive data, frames are checked for valid CRC and buffered for the micro to read in it's own time.

10MBit Ethernet uses a 10MHz or 20MHz clock to produce the manchester coded data.

The receive side is the really complex part, that needs either a digital PLL running many times the data rate (I used 16x, 160MHz) or an analog PLL, probably at 20MHz.

Either way it must get phase lock in a short time (like 30 - 40 cycles) so the receive logic can start examining the receive data for the framing code that sets the byte sync.
One of the reasons Manchester coding is used is that it guarantees at least one polarity change every bit time, so makes clock recovery accurate. It also means there is never a speady state on the line during a transmission, so the transformers can work reliably & only handle a narrow frequency range.

There are other parts to it as well, like a 'presence pulse' or heartbeat that allows both ends of a link to know there is a connection, even if no data is transferred.

Without that, neither end will listen for data reliably.
__________________
Robert Jenkins.
Reply With Quote
Reply   Post New Thread

Bookmarks

Tags

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Network timyhac The Projects Forum 6 03-20-2010 05:34 AM
Parallel to USB conversion saiello The Projects Forum 5 11-19-2009 10:00 PM
Grounded benchtop power supply and USB port yardleydobon General Electronics Chat 3 05-11-2009 06:14 AM
PIC 18F4455, Low Speed USB, Internal OSC a088008 Embedded Systems and Microcontrollers 4 04-22-2008 04:38 PM


All times are GMT. The time now is 10:17 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License. Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.