DPRG
DPRG List  



[DPRG] Fwd: your robot's fans

Subject: [DPRG] Fwd: your robot's fans
From: Dan Miner miner at centtech.com
Date: Wed Jul 12 11:18:24 CDT 2000

> From: Ralph Tenny [mailto:rten at metronet.com]
> 
> Have you any numbers for bot speed, and some idea of how fast 
> you have to sample the sensors and correct the vector to keep
> the line?

I don't know the speed.  Check the past results for the times.
I just did a quick search and couldn't find it.  A fuzzy memory
thinks my LEGO bot completed the Line Following contest in 
59 seconds.  I'll let you figure out the speed.  :-)

Using the built in firmware (actually a form of bytecode 
interpreter), you need to write the code to execute as quickly
as possible.  I was unable to measure the update rate but gut 
feel says about 20 times a second is an absolute minimum required.
That's just about the maximum rate the software will run.  
In other words, the software is just barely fast enough.

> ## Do you have a provision to adjust the sensor spacing to accomodate
> different line widths?

Since this is LEGO, yes.  Just unsnap the sensors and place them 
at the width you want.

> ## How about a software switch to allow for the possibility of white
> line/black background (current DPRG standard) or black line/white
> background?

Yes, just change the "<" to ">" and visa-versa.  Or since it's LEGO,
just unsnap the electrical connections for the 2 sensors and swap them.

> > I built my first LEGO line follower in about 3 hours (including
> > rebuilding it twice).  Then I spent about 30 hours (or more!)
> > tuning the software only to discover that fresh batteries
> > entirely changes the tuning.  This is because fresh batteries
> > make the motors respond faster and it becomes "twitchy" compared
> > to weak (sluggish) batteries.
> 
> ## Can this battery slope be fixed (with software economy) by tweaking
> the PWD value(s)?

Yes and no.  My code does have a number of constants that can be
modified to change the behavior of the code.  However, there isn't
enough computing power to do this on the fly.

Also, ambient lighting conditions make a difference in the
responsiveness
of the algorithm.  So no matter how much tuning I do at home, I still
need to re-tune when I get to the contest.  If there was more computing
power available, some (or all?) of this could be eliminated.  Note that
no hardware is required.  The CPU in the LEGO RCX is plenty fast, it's 
just inefficiently used for the sake of making it easier to use.

Next time I get serious about LEGO robots, I'll switch to pbFORTH or
some other language that is more efficient.

				- Dan Miner


More information about the DPRG mailing list