To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 19141
19140  |  19142
Subject: 
Re: Speed of IR comms?
Newsgroups: 
lugnet.robotics
Date: 
Thu, 3 Oct 2002 05:17:21 GMT
Original-From: 
Rob Limbaugh <rlimbaugh@greenfieldgroup#nomorespam#.com>
Viewed: 
1084 times
  
----- Original Message -----
From: "Steve Baker" <sjbaker1@airmail.net>
Sent: Wednesday, October 02, 2002 6:53 PM
Subject: Re: Speed of IR comms?


Laszlo Meszaros (ETH) wrote:
My notebook and my mobile phone can communicate to each other
with approximately 1 mbits per second, over an infrared link.
Do you have any experience with speeding up the computer-RCX
communication...?

Bad news I'm afraid:

Your laptop and phone are using IrDA which is a vastly different
technology than the RCX uses.  The RCX protocol is more like a
TV remote.  (In fact, if you have a 'learning' remote, you can
use it to drive your RCX!)


LEGO and CIR (Consumer Infra-Red) send signals on a modulated carrier
frequency (36KHz, 38KHz, or 40Khz).  That carrier frequency becomes the
primary limiting factor.  LEGO uses 38KHz.  At 2400bps, that means the
carrier wave is pulsed on and off for ~417us (micro-seconds).  During that
~417us, the IR LED is turned "on" and "off" about 15 times.

Each "on" and "off" last ~0.132us each to establish the 38KHz frequency.
This means each cycle lasts ~0.263us.  Thus, 38Kbps is the max we could hope
for.  Unfortunately the latency of the electronics might require 2-to-5
complete cycles (~0.263us) before the signal is considered valid.

Limit equation:        b = 1 / ( t * n )

  where
        b = approximate bits per second
        t = 0.0000263 = 1 cycle/carrier freq in Hz = 1/38000)
        n = number of cycles imposed by hardware limitations

Another thing to consider is the maximum serial port speed of the H8 itself.
If the IR electronics could support 19.2Kbps but the H8 in the RCX may be
only capable of 9,600bps.

Learning remotes (even software learning remotes on PDA's with IrDA)
oversample or capture the data raw, find the pattern, and record it for
later playback.

I vaguely recall someone reporting that they'd cranked the baud
rate on both tower and RCX up to 9600 baud (I believe the default
is 1200 baud) - but that's still more than 100 times slower than
your cellphone/laptop.

Considering the error control built into the LEGO protocol, I can believe
9600bps is possible.  I recall seeing somewhere that 2400bps is default but
an option exists for 4800bps (perhaps with 3rd party firmware?).

Bypassing the IR circuitry and hooking directly into the serial port of the
H8 could be the way to go.  (I've considered doing that to go RF wireless
and keep IR capability in tact.  I just can't seem to butcher my RCX,
though.)

Worse still is the problem of bi-directional communications.  The
RCX/PC comms protocol imposes heavy delay penalties when you switch
from transmitting to receiving and vice-versa.

On top of that half of the data being sent is for error checking (maybe
where the 1200bps came from?).  A better protocol would speed things up
quite a bit.  LEGO probably figured that people buying an RIS set might sit
in a room with lighting not well suited for bi-directional IR communication,
and therefore chose a slow but reliable protocol.  The initial target
audience of RIS would probably just look at a non-responsive bot and figure
it broke, put it away, and never buy another Mindstorms set again--never
once thinking that a sun deck was probably not a good place to do RCX
program downloads.

In CIR, codes sent to TV's, VCR's, etc are repeated several times when the
button is held down, so people don't notice interference as much.  Waving
the remote around while doing a "why-isn't-this-dang-thing-working" dance
seems to fix those problems.

I presume the reason for this is that the IrDA specification only
guarantees it to work over about a meter - (although in practice, you
can sometimes get much longer ranges).  Clearly that's not enough for
the RCX - so something slower but with greater range was chosen.

IrDA doesn't use a carrier wave because it was designed for close proximity,
narrow beam width, variable data rates, etc.  Some devices my have wide beam
coverage, but limit you to less than 1m distance.  Others may work up to 3m
away if lined up perfectly.  I can use my PDA to change TV channels just
over 3m away *if* the curtains are closed, *and* the lights are off, *and* I
aim it just right.

Sorry for the rambling...

- Rob



Message has 2 Replies:
  [OT] Surplus LEGO Mindstorms Parts for sale
 
Hello, We have several LEGO Mindstorms parts (bricks, RCX 1.5, RCX 2.0 and more...)for sale. All parts are brand new and we have limited quantities. For more details, please check: (URL) STORE (HK) info@robotstorehk.com (22 years ago, 3-Oct-02, to lugnet.robotics)
  Re: Speed of IR comms?
 
(...) With preamble, complement bytes and checksum, it takes 9 bytes to send the 8 bits of data for a standard RCX message. That's only about 25 or so messages a second! The protocol used by Spybots & Manas eliminates the preamble and complement (...) (22 years ago, 3-Oct-02, to lugnet.robotics)

Message is in Reply To:
  Re: Speed of IR comms?
 
(...) Bad news I'm afraid: Your laptop and phone are using IrDA which is a vastly different technology than the RCX uses. The RCX protocol is more like a TV remote. (In fact, if you have a 'learning' remote, you can use it to drive your RCX!) I (...) (22 years ago, 2-Oct-02, to lugnet.robotics)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Contact Recovery Nerd for Speedy USDT / BTC Recovery
16 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR