To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3958
3957  |  3959
Subject: 
Re: train precision
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 29 Dec 2005 16:33:01 GMT
Viewed: 
8316 times
  
Steve Hassenplug wrote:
On Tue, December 27, 2005 4:49 pm, Daniel Carvalho wrote:

A couple of years ago, i used brickOS. Then, i changed to Lejos...

I have a moc where i use the RCX to control a train with a lego train
motor. It is difficult to control the train with LejOS, because it only
has 8 output levels. Two solve the problem, i need to implement loops
that alternate two levels. But the result is not so smooth as i want. It
is the same thing with NQC and the official lego programming system.

I've heard that BrickOS is different, because it doesn't use the
standard lego routines for output control. Do you thing i can get more
precise control of the train, with BrickOS?

thanks

daniel




Daniel,

One problem you'll run into with most software is that it switches between power and
float to adjust the motor levels.  It works much better to switch between power and
brake.

Using most software, the train will continue to speed up, even with the power set
low.  (I've done this before, and it doesn't work well)

I used a scheme for my Legway robot, and it seemed to work very well.  It stitches
the power level ever 1ms, and has 8 forward "settings", and 8 backward settings.
It's very simple, and works very well.  Just set the variable MotorA, B or C to the
speed you want the motor to go (a number between 0 and 16).

Does this make sense?



hi Steve,

I think the problem is not exactly the same.

The lego technic motors run always at the same speed so you need to use
that kind of schema for speed control in robots. The train motors are
different, they have a speed proportional to the output level (like the
old technic motor).

But my problem is that i cannot control my train with the 8 power levels
Lejos has. If i have an loaded train, it won't move with power less than
4. When i change to 5, it will start to move. With 6, it will move fast
and 7 the same.

So, i need to use loops. I tried with brake and without brake. But the
result is not so smooth has when using the "Lego Train Speed Regulator"
(http://guide.lugnet.com/set/4548).

Since BrickOS has 256 power levels, maybe it is better. With that
precision, i think i can control the speed without using loops.

[Note: I think that, internaly, the BrickOS also use loops to set the
output level, but maybe they are more accurate.]

Anyone can try to connect an loaded train to rcx, and see if it can be
controlled??? For instance, use a program that sets the output vary
slowly from 0 to 255 and see if the train has a continuos aceleration.

I cannot try this because i still don't have BrickOS installed in my
computer. The last time i tried to install, it was very difficult. I had
to upgrade many packages.

daniel



Message has 2 Replies:
  Re: train precision
 
I do think Steve is on the right track here. The train regulator varies the voltage, but the RCX output can't. So you are left with managing (nominally) 9v pulses. But there is another solution. You could add a DCC decoder to your train motor, and (...) (18 years ago, 29-Dec-05, to lugnet.robotics.rcx.legos)
  Re: train precision
 
(...) ... (...) ... (...) ... (...) As Brian said, it's not the motors, it's the RCX. You can run Technic motors off a train controller, and you can vary the speed. But you need to do a bit more if you're using the RCX. We used that scheme when we (...) (18 years ago, 29-Dec-05, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: train precision
 
(...) Daniel, One problem you'll run into with most software is that it switches between power and float to adjust the motor levels. It works much better to switch between power and brake. Using most software, the train will continue to speed up, (...) (18 years ago, 27-Dec-05, to lugnet.robotics.rcx.legos)

8 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
    

Custom Search

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