Sunday, June 26, 2011

RS-485

Reference Links:
http://www.lammertbies.nl/comm/info/RS-485.html
http://www.interworldna.com/accesio/serial/usb-232-422485.html
http://digital.ni.com/public.nsf/allkb/B9A38929D546B796862572C7005F0644
http://www.arcelect.com/485info.htm

RS-232 is the single ended serial protocol and RS-485 and RS-422 are differential serial protocol. The pinout for RS-232, RS-422 and RS-485 is shown below figure.
A loopback test is a test in which a signal in sent from a communications device and returned (looped back) to it as a way to determine whether the device is working right. The figures below will show you what pins you need to connect to perform loopback test on RS-232 and RS-422/RS-485 respectively.
RS-232

RS-422 and RS-485


RS485 will support 32 drivers and 32 receivers (we are talking about bi-directional - half duplex - multi-drop communications over a single or dual twisted pair cable !!).  An RS-485 network can be connected in a 2 or 4 wire mode.  Maximum cable length can be as much as 4000 feet because of the differential voltage transmission system used. The typical use for RS485 is a single PC connected to several addressable devices that share the same cable. You can think of RS485 as a "party-lined" communications system (the addressing is handled by the Remote Computer unit). The RS232 may be converted to RS485 with a simple interface converter - it can have optical isolation and surge suppression.


RS232 is an interface to connect one DTE, data terminal equipment to one DCE, data communication equipment at a maximum speed of 20 kbps with a maximum cable length of 50 feet. This was sufficient in the old days where almost all computer equipment were connected using modems, but soon after people started to look for interfaces capable of one or more of the following:
  • Connect DTE's directly without the need of modems
  • Connect several DTE's in a network structure
  • Ability to communicate over longer distances
  • Ability to communicate at faster communication rates
RS485 is the most versatile communication standard in the standard series defined by the EIA, as it performs well on all four points. That is why RS485 is currently a widely used communication interface in data acquisition and control applications where multiple nodes communicate with each other.


RS485 functionality

Default, all the senders on the RS485 bus are in tri-state with high impedance. In most higher level protocols, one of the nodes is defined as a master which sends queries or commands over the RS485 bus. All other nodes receive these data. Depending of the information in the sent data, zero or more nodes on the line respond to the master. In this situation, bandwidth can be used for almost 100%. There are other implementations of RS485 networks where every node can start a data session on its own. This is comparable with the way ethernet networks function. Because there is a chance of data collosion with this implementation, theory tells us that in this case only 37% of the bandwidth will be effectively used. With such an implementation of a RS485 network it is necessary that there is error detection implemented in the higher level protocol to detect the data corruption and resend the information at a later time.
There is no need for the senders to explicity turn the RS485 driver on or off. RS485 drivers automatically return to their high impedance tri-state within a few microseconds after the data has been sent. Therefore it is not needed to have delays between the data packets on the RS485 bus.

Wednesday, June 22, 2011

Trace your Internet message

Reference: http://communication.howstuffworks.com/convergence/router10.htm



Tracing a Message

If you're using a Microsoft Windows-based system, you can see just how many routers are involved in your Internet traffic by using a program you have on your computer. The program is called Traceroute, and that describes what it does -- it traces the route that a packet of information takes to get from your computer to another computer connected to the Internet. To run this program, click on the "MS-DOS Prompt" icon on the "Start" menu. Then, at the"C:\WINDOWS>" prompt, type "tracert www.howstuffworks.com". When I did this from my office in Florida, the results looked like this:

The first number shows how many routers are between your computer and the router shown. In this instance, there were a total of 14 routers involved in the process (number 15 is the Howstuffworks.com Web server). The next three numbers show how long it takes a packet of information to move from your computer to the router shown and back again. Next, in this example, starting with step six, comes the "name" of the router or server. This is something that helps people looking at the list but is of no importance to the routers and computers as they move traffic along the Internet. Finally, you see the Internet Protocol (IP) address of each computer or router. The final picture of this trace route shows that there were 14 routers between the Web server and me and that it took, on average, a little more than 2.5 seconds for information to get from my computer to the server and back again.
You can use Traceroute to see how many routers are between you and any other computer you can name or know the IP address for. It can be interesting to see how many steps are required to get to computers outside your nation. Since I live in the United States, I decided to see how many routers were between my computer and the Web server for the British Broadcasting Corporation. At the C:\WINDOWS> prompt, I typed tracert www.bbc.com. The result was this:

You can see that it took only one more step to reach a Web server on the other side of the Atlantic Ocean than it did to reach a server two states away!

It surely works, when tried from a place in North India;

C:\>cd windows

C:\WINDOWS>tracert www.howstuffworks.com

Tracing route to a462.g.akamai.net [96.17.182.8]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2    30 ms    31 ms    33 ms  ABTS-North-Static-157.130.160.122.airtelbroadband.in [122.160.130.157]
  3    29 ms    31 ms    29 ms  ABTS-North-Static-153.130.160.122.airtelbroadband.in [122.160.130.153]
  4    30 ms    31 ms    29 ms  125.19.22.145
  5    30 ms    30 ms    31 ms  59.145.7.230
  6    30 ms    34 ms    34 ms  a96-17-182-8.deploy.akamaitechnologies.com [96.17.182.8]

Trace complete.

C:\WINDOWS>

C:\WINDOWS>tracert www.yahoo.com

Tracing route to any-fp.wa1.b.yahoo.com [69.147.125.65]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2    35 ms    47 ms    31 ms  ABTS-North-Static-157.130.160.122.airtelbroadband.in [122.160.130.157]
  3    31 ms    29 ms    29 ms  ABTS-North-Static-149.130.160.122.airtelbroadband.in [122.160.130.149]
  4    29 ms    29 ms    29 ms  203.101.83.197
  5    50 ms    50 ms    49 ms  203.101.100.22
  6   195 ms   195 ms   195 ms  so-4-0-3-zcr2.lnt.cw.net [166.63.223.69]
  7   195 ms   195 ms   195 ms  so-5-2-0-dcr2.tsd.cw.net [195.2.10.134]
  8   205 ms   195 ms   195 ms  xe-0-3-0-xcr1.lnd.cw.net [195.2.25.1]
  9   306 ms   325 ms   306 ms  ge-11-0-0-xcr1.nyk.cw.net [195.2.25.18]
 10   359 ms   276 ms   277 ms  pat1.nyc.yahoo.com [198.32.118.24]
 11   279 ms   279 ms   279 ms  ae-8.pat1.dcp.yahoo.com [216.115.101.157]
 12   277 ms   294 ms   294 ms  ae-2-d170.msr2.re1.yahoo.com [216.115.108.69]
 13   305 ms   280 ms   278 ms  te-9-4.bas-a2.re1.yahoo.com [66.196.112.203]
 14   277 ms   276 ms   280 ms  ir1.fp.vip.re1.yahoo.com [69.147.125.65]

Trace complete.





Tuesday, June 21, 2011

How XM Radio Works


Reference: 
http://www.tech-faq.com/how-xm-radio-works.html


XM Radio is a satellite radio service. Satellite radio is a technology that for the most part has been around for many years. For instance, many television studios have been using satellites to beam TV signals from far away locations to viewers for decades, however satellite radio has been in operation in America since 2001.
Satellite radio is pretty easy to describe. The programs for satellite radio include music, talk shows, live sporting events and sport analysis shows. These shows are usually sent from one central location, where they are sent from the ground to satellites rotating in space that then broadcast the signal to those listeners with the hardware such as special antennas and receivers to pick up the signal. Here is some more information
XM Radio1 How XM Radio Works

Satellite Radio Starts from the Broadcaster

It is important to note that XM satellite radio initially starts from the studio, where the programming is put together. Programming such as music, talk shows, sports analysis shows, etc are created and then transmitted usually from a main source to two satellites over head. (It is also possible that live events such as news or sporting events are sent individually directly from the location where they are happening to the two satellites overhead). Usually programming is digitized and then compressed to fit lots of data into a small bandwidth of radio frequency which XM satellite is allowed to operate on.

The Satellites

XM Radio has two satellites that are in geostationary orbit located above the equator. Geostationary orbit means that the satellites are moving at the same speed as the earth turns, making it able to be in the same position as the earth at all times. This way, XM satellite radio can always be pointing to their satellites and feeding them programming and the satellites can easily broadcast their signal to the millions of listeners that have antennas and receivers pointed towards the geostationary satellite.

Antenna

A special antenna is necessary to receive XM satellite radio. Usually these antennas are very small in size, smaller than a normal tennis ball and can be placed on top of car roofs, in an office or at home. They are not that expensive and cost usually less than $50. These antennas make it possible to catch the specific digital radio signal that is broadcasted and send it to the special XM Satellite Receiver.

Satellite Repeaters

Because satellites that are in geostationary orbit, their antennas must have a clear line of sight to the southern sky to pick up signals clearly. Obviously not everyone will have a clear line of sight (especially if you live in an urban location) so a technique used to increase the likelihood of anyone using this technology to have good reception are repeaters. A repeater is a large antenna located in key positions around the country, where a satellite signal can be received and then repeated or rebroadcasted to antennas facing any direction, south, north, east, west and in between.

Satellite Receivers

Satellite receivers enable listeners to receive the digital audio broadcasts being relayed off of the satellites in geostationary orbit. These satellite receivers come in many different styles and some have different functions. They all include a chipset that can decode the encrypted signal sent from the satellite. The satellite sends its programming signal encrypted so that people that do not have a receiver or do not pay the monthly subscription fee can not have access to it.
Receivers can come in the form of auto car stereos, add on receivers that hook up to your already installed car stereo, boom boxes, home audio receivers with satellite receiver capability and portable devices that allow you to pick up the satellite signal no matter where you go. These portable devices have their own energy source and are similar to size and shape as iPod's. These receivers usually cost from about $30 to over $300.

Mindbox