how to make precise turns with the motor?

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 1
Joined: Sat Jan 02, 2010 4:30 am

how to make precise turns with the motor?

Postby hijaz » Sat Jan 02, 2010 4:48 am

I am using the motor to turn a sqaure stage. I need it to turn exactly 90 degress every time. The problem is that it varies by a few degrees every time, is there a way to make it more precise?

New User
Posts: 11
Joined: Thu Nov 05, 2009 2:05 pm
Location: Sweden

Postby PenemuNXT » Sat Jan 02, 2010 10:58 am

User avatar
leJOS Team Member
Posts: 5742
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Sat Jan 02, 2010 11:12 am

Has anyone ever got a compass to work well? Perhaps for a turn, but whenever I've tried to use one the various bits of metal around the place always seems to throw things off...

To hijaz... If you tell is a little more about your robot... What shape is it, how does it steer etc. And the problems you are seeing (do you always get the same sort of error when you turn), what sort of floor are you running it on etc. then you may get some more help....


New User
Posts: 3
Joined: Mon Feb 01, 2010 10:53 pm

Postby roadster46 » Tue Jun 22, 2010 2:23 am

any other idea than using compass??
coz i just need a motor to turn exactly 90 deg

Active User
Posts: 130
Joined: Tue Jul 20, 2010 2:01 pm

Postby s.frings » Tue Jul 20, 2010 2:16 pm

I collected some experience with that using a NiboBee robot, which also uses two motors, two driven wheels and rotation sensors on both motors. SO what I've learned should also apply to the Lego System as well.

Basically, exact movements using the shipped sensors (inside the motors) are impossible, because:

- The wheels slip always a little. The problem is larger on carpet floor compared to laminate or PVC.

- If the software detects that the destination position has been reached, the motor must stop immediately. This is technically impossible because of the mass inertia. Even if you manage to stop the motors exactly, the robot would slip a little.

The biggest problem is, that the amount of error is random.

So, whatever you want to do, you need to include enough tolerance for incorrect movements. You could mark the path with black tape on the floor and find or follow these marks. I saw this solutution in an industrial production hall where robot-cars have been used to transport things from the store to the work-places.

Another solution could be a set of optical markers that the robot can use to detect his own position. I saw this on a field outside, where a tractor distributed semen automatically.

Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest