Is there a difference with accuracy between using degrees vs rotations to program the EV3 motors?

653 views
Skip to first unread message

Kevin Le

unread,
Jun 14, 2018, 9:01:13 PM6/14/18
to legoengineering
Hi all, 
Does anyone know if the EV3 can detect movements accurately down to 1-2 degrees? 

One of my students believe programming the robot to move with degrees has a better accuracy than using rotations (in the motor blocks). 

My answer was  the EV3 just convert rotations or degrees into a machine language. Hence, the output will be the same. 

eg. 360 degrees is the same as 1 rotation. Therefore, moving 2 degree is the same as 2/360 rotations. 

It has not convinced him. 

Has anyone know the inner working of the EV3 in more details so I can settle this discussion with him?


Many thanks in advance. 

Kevin. 



Rob Torok

unread,
Jun 14, 2018, 9:25:07 PM6/14/18
to legoeng...@googlegroups.com
I haven't looked into this, but it would be interesting to do this as a datalogging investigation...

--
--
Robotics in Education - Mailing List
LEGO Robotics Resources available at www.damienkee.com
 
The aim of this mailing list is connect educators from around the world who have a common interest using robotics in education. We welcome any and all conversation that is on-topic, (and occasionally off-topic!) and strongly encourage all members, regardless of their level of experience, to be a part of the conversation. While we want our member to give their opinions on commercial products so that others may benefit, sales-pitch posts are not permitted.
If in doubt, please ask me off-line first - dam...@damienkee.com
---
You received this message because you are subscribed to the Google Groups "legoengineering" group.
To unsubscribe from this group and stop receiving emails from it, send an email to legoengineering+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Teacher Computing (Robotics and Game Design), Computer Science
Hobart College | Department of Education  (Mon am, Wed pm, Fri am)

Website Content Editor, LEGO Education Australia (Mon pm, Tue)
Editor-in-Chief, LEGO Engineering (Thu)
Outreach Mentor, UTAS Robotics

Pereira, Lana

unread,
Jun 14, 2018, 9:32:36 PM6/14/18
to legoeng...@googlegroups.com

I looked the motor accuracy up once. Apparently LEGO claims an accuracy of 1 degree for its motors, but people testing them say 3 degrees;  I have no idea whether it would make a difference to use degrees or rotations. As Rob says, it would be interesting to test this.


Lana


Lana Pereira
Robotics Teacher
Milwee Middle School

"Let's Make America Smart Again."

Neil DeGrasse Tyson




From: legoeng...@googlegroups.com <legoeng...@googlegroups.com> on behalf of Kevin Le <kevi...@gmail.com>
Sent: Thursday, June 14, 2018 9:01 PM
To: legoengineering
Subject: [legoengineering] Is there a difference with accuracy between using degrees vs rotations to program the EV3 motors?
 

***** CAUTION: This email originated from outside SCPS. *****

DO NOT click links or open attachments unless you recognize the sender and are expecting the information or have verified with a third party that the information is safe!  Contact the I.S. Help Desk at 407-320-0350 if you have concerns about unsafe content.


 

--
--
Robotics in Education - Mailing List
LEGO Robotics Resources available at www.damienkee.com
 
The aim of this mailing list is connect educators from around the world who have a common interest using robotics in education. We welcome any and all conversation that is on-topic, (and occasionally off-topic!) and strongly encourage all members, regardless of their level of experience, to be a part of the conversation. While we want our member to give their opinions on commercial products so that others may benefit, sales-pitch posts are not permitted.
If in doubt, please ask me off-line first - dam...@damienkee.com
---
You received this message because you are subscribed to the Google Groups "legoengineering" group.
To unsubscribe from this group and stop receiving emails from it, send an email to legoengineeri...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


www.speakouthotline.org


[Florida has a very broad Public Records Law. Virtually all written communications to or from School District Personnel are public records available to the public and media upon request. E-mail sent or received on the School District system will be considered public and will only be withheld from disclosure if deemed confidential pursuant to State Law.]

Walt White

unread,
Jun 15, 2018, 12:15:10 AM6/15/18
to legoengineering
Hi Kevin,

I wondered the same thing when I first started using the EV3.  I made a test rig and ran a motor 360 degrees six times in a loop, expecting any error to accumulate.  There was no accumulated error.  The pointer is at exactly the same place it started six loops ago.  So it looks like the encoder inside the motor is not only accurate to one degree, but the "brake" end condition forces the EV3 to compensate for any drift and bring the motor back to exactly where it started.

Video at YouTube

Walt

Damien Kee

unread,
Jun 15, 2018, 12:32:42 AM6/15/18
to LEGO engineering
While I haven't done any testing, I was led to believe that it won't make a difference as the robot just counts degrees and then converts to rotations as necessary. 

However, it depends very much on how many decimal places you go to when dealing with rotations.  
If you stick with 1 decimal place, then you get the following - 2.3 rotations = 828 degrees,  2.4 rotations = 864 degrees ( a difference of 36 degrees.  So if your students are only using 1 decimal place, then yes, they can get better accuracy with degrees.

If we go to two decimal places - 2.33 rotations = 839 degrees (rounded up).  2.34 rotations = 842 (rounded down).  This still gives a difference of 3 degrees.  So if your students are using 2 decimal places, then they can still get slightly better accuracy with degrees.

If we go to 3 decimal places - 2.335 rotations = 840 degrees, 2.336 rotations = 841 degrees a difference of only 1 degree.  So at this point there is no difference between Degrees and rotations.

In reality every motor has what is called 'backlash', the amount of sag in a gearbox as a result of all the different stages of gears meshing together. That will result is a little bit of 'play' in the motor that you can feel if you gentle turn the motor back and forth.

So, TL:DR.   Rotations are as accurate as degrees providing you go to 3 decimal places :)

Regards
Damien Kee


Kevin Le

unread,
Jun 15, 2018, 3:07:07 AM6/15/18
to legoengineering
Thanks Walt, 
Great experiment. Very unexpected seeing the encoder compensating the drift of the handle. Have you tested it with different weight on the handle to see the limit when the EV3 stop compensating.?
I do notice in our robots that as the weight of the robots increase and or the speed increases the accuracy of the robots are reduced. Hence, compensation must be overburdened. 

Cheers 
Kevin. 

Kevin Le

unread,
Jun 15, 2018, 3:24:36 AM6/15/18
to legoengineering
Thanks Damien, 
Very nicely illustrated. 
This give me another way to explain the situation. 

I have been teaching the students to use the math block to convert their desired distance to rotations eg. Rotations = Target distance/circumference of the wheel (Pi*2r).
(Hence, the EV3 is calculating the number of rotations down to multiple decimal places.) 
They then data wire this to the Motor block to move the robots. 

Cheers
Kevin. 

Christine Chu

unread,
Jun 15, 2018, 9:05:29 AM6/15/18
to legoeng...@googlegroups.com

But do 6 rotations have the same accuracy?


Christine Chu
Education Technology Specialist
Island Park Schools
150 Trafalgar Blvd
Island Park, New York 11558
Office: 516-434-2655



From: legoeng...@googlegroups.com <legoeng...@googlegroups.com> on behalf of Walt White <firstco...@gmail.com>
Sent: Friday, June 15, 2018 12:15 AM
To: legoengineering
Subject: [legoengineering] Re: Is there a difference with accuracy between using degrees vs rotations to program the EV3 motors?
 

Christine Chu

unread,
Jun 15, 2018, 9:19:34 AM6/15/18
to legoeng...@googlegroups.com

We have had many issues trying to get the EV3 to go the same distance repeatedly and accurately (even though we haven't changed anything in the program).  It is very frustrating for the students.  During FLL practices (and competition) the robot seemed to have a mind of it's own for no apparent reason.  They were very careful in placing the robot and even created a measure to place it.  Without a line to follow to compensate for any variation, is there a way to be more consistent?  Would it be better to set it to move slightly back and forth, even though you want it to go straight?  We did not have much luck with the gyro sensor.  We even tried measuring the distance from the wall with the ultrasonic sensor but we couldn't get that to work either.  


They did well for beginners, they came in 6th out of 192 teams on Long Island, but they could have done better if everything worked consistently and there was a great deal of frustration involved.  One thing that we considered is that the movement shakes the parts apart and that slight bit of variation changes the way the robot works, but they tried pressing everything back into place each time and still had problems.


Any advice or suggestions would be greatly appreciated.  


Christine


Christine Chu
Education Technology Specialist
Island Park Schools
150 Trafalgar Blvd
Island Park, New York 11558
Office: 516-434-2655



From: legoeng...@googlegroups.com <legoeng...@googlegroups.com> on behalf of Damien Kee <dam...@domabotics.com>
Sent: Friday, June 15, 2018 12:32 AM
To: LEGO engineering
Subject: Re: [legoengineering] Re: Is there a difference with accuracy between using degrees vs rotations to program the EV3 motors?
 

Walt White

unread,
Jun 16, 2018, 8:09:06 PM6/16/18
to legoengineering
Hi Kevin,

I haven't tested the rig with added weight, but it seems likely that the faster and heavier the robot moves, the harder it will be for the motor to compensate for momentum.  That could also be Christine Chu's situation, although I would suspect slippage of the wheels on the mat as another source of her problem.

I made building instructions that students can use to do simple rotation-to-degree demonstrations.  It's also fun to see what happens when you interfere with the rotation --- does the motor overcome your effort to keep it from completing its assigned rotations, and what is the resulting accuracy.

Walt

Christine Chu

unread,
Jun 16, 2018, 9:26:33 PM6/16/18
to legoeng...@googlegroups.com

We actually made a point of not having the robot go too fast, since we noticed that could be an issue.  We also tried to make it fairly symmetrical.  The problem was it would work perfectly, sometimes many times in a row and then not.


So is there any reliable way to stop slippage?  It seems that many of the competition robots that have won use the box design.  Does that lock in the wheels better to prevent any wobbling?  Are there any plans around for that type of robot to look at and play with as a starting point?  


Christine


Christine Chu
Education Technology Specialist
Island Park Schools
150 Trafalgar Blvd
Island Park, New York 11558
Office: 516-434-2655



From: legoeng...@googlegroups.com <legoeng...@googlegroups.com> on behalf of Walt White <firstco...@gmail.com>
Sent: Saturday, June 16, 2018 8:09 PM
To: legoengineering
Subject: [legoengineering] Re: Is there a difference with accuracy between using degrees vs rotations to program the EV3 motors?
 

ProjectB Coach

unread,
Jun 17, 2018, 5:42:37 PM6/17/18
to legoeng...@googlegroups.com

Hi Christine,

 

I’ll chime in here with some observations reported by my FLL team…

 

We prevent wobble by supporting the drive axle in 2-3 places on each wheel, ideally on each side of the motor and on the outside of the tyre. The box design helps with this build, but it’s not the only way to go.

 

In terms of error on the mat, my team runs a “Robot FIRST Aid” program at tournaments. Once you remove code issues (dead reckoning, errors etc) we’ve found that the biggest causes of slippage/bad performance are:

 

  • Friction difference in new mats at tournaments vs old/worn ones at home.
  • Wobbly wheels
  • Unbalanced robot
  • Dirty tyres (use clear sticky tape to remove the gunk)
  • Deformed drive axles

 

My team minimises the chance of slippage through code (e.g. gradual acceleration) and robot design (e.g. balance, wheel support), and then writes programs that can cope if slippage occurs. I don’t think we’ve come up with a design that guarantees slippage will not occur 😊.

 

Let me know if you’d like to discuss further. My team would love the chance to make some new friends from the USA!

 

Regards,

 

Andrew Clark

Lead Mentor

Project Bucephalus

www.projectb.net.au

Cort Wee

unread,
Jun 18, 2018, 8:47:29 AM6/18/18
to legoengineering
Hi Christine,

While I don't train any teams for FLL, here are a few observations I have when dealing with EV3 robots.

Degrees VS Rotations
They are exactly the same. The motor uses a build in encoder that measures degrees*, and all rotation commands are converted to degrees in software.

Accuracy
The encoder measures 1 degree* precision, but accuracy is affected by backlash (looseness in the gear). Backlash can be minimised with certain techniques.

Moving accurately
Without something to align to (eg. line or wall), it's not possible to move an EV3 robot over a large distance accurately, but the following can help.

  • When placing the robot at a starting line, start by placing it slightly ahead of the line then pulling it back to the line. This will reduce errors due to backlash in the gears.
  • Ensure the center of gravity is near the driven wheels, and reduce the weight on the caster wheel. This will minimise slippages and is especially important if the robot is turning.
  • Place the driven wheels further apart. If they are close together, even a small error in wheel rotation will cause the robot to turn a lot. It'll also minimize the impact of backlash when turning the robot.
  • Some wheels are better than others. The wheels that comes with the EV3 set have a large contact area and this makes it less consistent when the robot is turning. The NXT wheels are a better choice. There are other wheels with small contact areas as well. This only matters if the robot is turning.
  • Use the move steering or move tank blocks instead of the individual motor blocks. This will synchronise the two motors, ensuring that if one slows down (eg. more friction), the controller will slow down the other one to match.
  • Make sure the weight on each wheel is equal. The wheel can deform, reducing its effective radius.
  • Don't accelerate too fast.
I would suggest letting the team figure most of these out on their own. They'll learn more through the process of figuring it out! :-)

Cort


* Strictly speaking, it measure "tacho counts" and the EV3 motor is designed for 1 tacho count to 1 degree by default. This can actually be modified to double the accuracy (...to 0.5 degrees), but it's challenging (...and not allowed for FLL).
If in doubt, please ask me off-line first - da...@damienkee.com

---
You received this message because you are subscribed to the Google Groups "legoengineering" group.
To unsubscribe from this group and stop receiving emails from it, send an email to legoengineeri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Liam Kinne

unread,
Jun 21, 2018, 6:51:35 PM6/21/18
to legoengineering
A while ago I found a really neat website where someone has spend countless hours gathering empirical data on both the performance of LEGO wheels and motors.


He doesn't talk much about encoder performance, but as others have pointed out, the only real improvements that you can make are to the hardware side rather than software.
Reply all
Reply to author
Forward
0 new messages