View Full Version : [FTC]: Motor encoders Love'em? or leave'em?
DocMartin
04-11-2013, 20:22
My fellow Mentor and I are at odds on using encoders or not.
I want to hear from you.
Does your team use them or not? and why?
Go!
MattRain
04-11-2013, 20:57
We love them. With the right code, they work wonders. We have code that allows us to move all the way up to a .001 of an inch, not that we need.. haha.:P
DocMartin
04-11-2013, 21:46
Can you provide some examples of what scenario you had the need to use them and what problem it solved?
I don't think this question can be asked so broadly.
They're hugely necessary in some instances, useless and redundant in others.
You should analyze your situations and decide what's best for it.
I just wish the things weren't so insanely expensive and fragile.
ftcTeam6389
06-11-2013, 14:35
We've never had good luck with them, they are not accurate. Program it to go to the same spot every time, but it rarely does. I also agree they are too delicate. I just don't understand why Tetrix can't come out with a DC motor with a good encoder built in.
We love them. With the right code, they work wonders. We have code that allows us to move all the way up to a .001 of an inch, not that we need.. haha.:P
How did you verify that your positioning was accurate to within .001"?
We avoid them for navigation and positioning of mechanisms. They are delicate, readings are unreliable, and they are bulky enough that they move the applied load out to the end of the motor shaft. That said, we used one with great success a few years ago. We had an arm that needed to move at a constant slow speed regardless of load or position. Adding an encoder changed that arm from unwieldy to elegant.
ftcTeam6389
06-11-2013, 15:44
We avoid them for navigation and positioning of mechanisms. They are delicate, readings are unreliable, and they are bulky enough that they move the applied load out to the end of the motor shaft. That said, we used one with great success a few years ago. We had an arm that needed to move at a constant slow speed regardless of load or position. Adding an encoder changed that arm from unwieldy to elegant.
I agree, there are times when you need them to control speed when under load. Another way to accomplish the same thing is to gear the arm down to 1:9 or some such.
RRLedford
08-11-2013, 02:43
We are doing a Mechanum drive for Block Party this year, using the very affordable VEX mechanum plastic hub wheels. We need the encoders to allow the mechanum drive controling S/W to function properly. BTW, for their price, these wheels work very well, if you can come up with a hub scheme for them that eliminates the tiny square shaft in favor of a sturdier one.
I agree that the Tetrix scheme for externally adding encoders is horrible, and exposes them to far too much stress and damage, usually in a very short amount of time. It forces gears & sprockets to be mounted further away from the motor gearbox, where they will tend to more easily & quickly damage it, or where they will cause the motor to shift position in the not-so-solid of a design TETRIX motor mount clamp.
Even when the encoders themselves are not internally damaged, the lack of a strain relief at the point where their wire assembly enters their micro-connector causes early failures of the wiring assembly there too.
When you combine the other TETRIX scheme for a motor with an eccentric output shaft as a way for adjusting gear & sprocket spacing, this adds even more problems for preventing the encoder wires from breaking at the connector, as the moter gets twisted in the mount clamp.
We have used urethane and silicone glue to make strain reliefs and to glue wires to side of motor case. we also use lots of ties to keep encoder wires out of harms way as much as possible.
The VEX motors with internal encoders are so much more appealing, but just too weak for most of our needs.
-Dick Ledford
MattRain
09-11-2013, 19:06
Can you provide some examples of what scenario you had the need to use them and what problem it solved?
For example for last years FTC. The robot sits in the corner of the field. Autonomous starts. IR turns on, finds out which column the IR is on, then picks out of three programs, which one to run to make it to the IR. Ok, say its the left column, robot makes a left 45 degree turn, goes 15 inches, right 45 degree turn, 20 or so inches forward, stops, lift goes up, which also has an encoder to tell it how many turns, to make it to that height, then 5 inches in, placing the ring on the peg, lift goes down a few inches, robot backs up 10 inches, does a 135 degree turn to face the ring dispenser. Ready for teleop.
With our code as well, I could move the robot to tile, carpet, concrete, asphalt, etc. And it would still do the same exact thing the program tells it to. Other than a few teams that I have seen with advanced code, most teams run off time, which with time, just with the wear and tear of some foam tiles, or brand new tiles, along with battery powered, wither fully charged, or somewhat charged, can change the autonomous sooooooo much.
If you write your code right, it works. With what we have written, it takes us less than a few minutes to write a code, or 30 minutes to write a very precise code. (and extremely easy once written. One of our new programmers, never seen code before, is writing the autonomous this year,(one day of teaching the basics) only having to list down how many inches,degrees turned,and lifting height)
How did you verify that your positioning was accurate to within .001"?
The code is written in such a way, that it tells me on the NXT brick and computer screen, how far its traveled for each step it does, granted, there is no reason for that precision, especially this year, so we changed only go to the .1 of an inch really.
The code is written in such a way, that it tells me on the NXT brick and computer screen, how far its traveled for each step it does
I don't think that answered the question Madison was asking.
There's a difference between what the sensor on your robot says and how far the vehicle actually moved.
MattRain
09-11-2013, 19:50
I don't think that answered the question Madison was asking.
There's a difference between what the sensor on your robot says and how far the vehicle actually moved.
Ok, yes there is that fact of that robot could have gone a little under or over that number. Again, there really is no reason for programming that far, and hard to even get that measurement in real time, without looking at the computer. I was just stating the fact that the program could do it if it really wanted to. Right now in our programming, we do give a tolerance area for the code to decided if its in the right place without it getting stuck on a certain step. Its just stupid not to have your program run through all the steps because of a small.1 of an inch. I think right now, our programmer has it to a .1 or .15 of a tolerance, as there is really no need for huge precision this year, unlike last year with the pegs and such.
Ok, yes there is that fact of that robot could have gone a little under or over that number [ed: 0.001 inch]
As a pre-kickoff project, you might want to try this:
1) Command your robot to move exactly 20 feet forward and stop.
2) Using a tape measure, determine how far it actually traveled.
3) I think you may find the results surprising.
MattRain
15-11-2013, 11:00
I will have to students try that out today. I shall post the results tonight.
I will have to students try that out today. I shall post the results tonight.
Did you forget?
aakerberg
25-11-2013, 16:33
Well, accurate distance isn't all that important. Presumably you should have some opportunity to tune your program to account for any inaccuracy in the encoder. However, consistent results ARE important. A better experiment would be:
1. Mark a very specific start point
2. Program the robot to go any distance
3. Mark where it finishes moving.
4. Repeat several times - preferably with different loads (add/subtract weight) and/or different levels of battery charge.
How close does it get to your original finish mark each time? if the encoders are reasonably consistent, you should end up in the same spot (or very close) each time, regardless of load or battery condition.
The problem with using encoders for measuring robot position in autonomous mode is they offer no defense against the things that are most likely to trip you up - getting bumped off course by another robot, wheels slipping on the edge of the board, etc.. I would argue that provided you don't make radical changes to the robot during the course of a single competition and manage your battery pack properly, you can get equally effective results using time for judging distances driven.
If they are consistent, I can see them being more useful for measuring things like precision arm movements, or maybe feedback for a sophisticated driving control system...
We have been also been unhappy with they way they are mounted to the outside of the motor. We are experimenting this year with other ways to give us the information we need.
Well, accurate distance isn't all that important.
That may well be true in many cases, but the specific point of posts 7, 11, 12, 13, 14, and 15 was to think through the statement in post 2.
We do use encoders for autonomous. They work fine for straight motion (of course, not to 0.01 inch - but it is not necessary). However, we found them rather unreliable for measuring turns (when turning, both wheels slip), so we use gyro sensor for this. Works much better for us. Your mileage may vary.
I will have to students try that out today. I shall post the results tonight.
Still interested in your test results.
DavisDad
22-12-2013, 18:00
My fellow Mentor and I are at odds on using encoders or not.
I want to hear from you.
Does your team use them or not? and why?
Go!
We're working on a design using VEX 4" Mecanums. We built a prototype to test performance of wheels, motor controller, and gearmotor/encoder combination. We used the Matrix system for cost and availability reasons; the Matrix gearmotor has the encoder integral to the motor.
Our competition design is currently:
http://simhardware.org//img/DriveAssemblyRight.JPG
For the testing prototype we built:
http://simhardware.org//img/Simple_DriveAssembly.JPG
http://simhardware.org//img/DrivePrototype.JPG
Things we like about the prototype:
Motor controller built in PID speed control worked well (RobotC code)
Teleop control is very nice for omni-directional control
Speed vs. power is good (quantitative data to follow if we can wrestle the bot away from the drivers :))
Fabrication was fairly straight forward (see cons)
Square shaft for wheel eliminates hub
Cons:
Haven't been able to get encoder position control to work with the built in Matrix RobotC code
Square shaft VEX to 4mm motor shaft coupling was tricky. We had to learn how to broach a square hole and weld 2 pieces of the coupler together.
http://simhardware.org//img/4mm_Sq1-8ShaftCoupling.JPG
I think using the motor controller encoder speed control is excellent; you're telling the motor how fast to go rather than sending a power level that is blind to load and variations in the wheels'/gearbox response to voltage. We pushed chairs around the kitchen at the same speed with no load. Teleop control of the prototype is smoother, more responsive and predictable than any other drive we've tested in 3 seasons; 6 wheel tank, 4-wheel mecanum without encoder feedback.
MattRain
22-12-2013, 22:47
Sorry about the delay.
Test Results: (Average of three tests each)
FTC Regulated Foam pads: 20ft exact
Carpet: 19.76
School Tile: 19.5
Home Tile/with bumps: 19.4
Yes, as you change the flooring options, the distance did change. But for on foam tiles, it went the distance. Even though the field wouldn't allow that in a game.
RRLedford
24-12-2013, 19:08
DavisDad, regarding the VEX mechanum wheels, I am not sure if their square axle material is considered legal for FTC. We also used these wheels this year and made 1st seed in our 1st regional, captaining the winning alliance. We also received a Rockwell Design Innovation Award (primarily for the drive system) at our second regional. Our robot was very consistently best positioned for flag winding and still able to get back on the bridge in correct location for executing a potential double hang, when possible.
We used Tetrix motors at 1:1 with external encoders and chain direct driven wheel attached sprockets. We were doing consistent autonomous block drop and getting on bridge from the level of precise driving we could get with encoders on our practice field, but at competition, we kept hitting the wall enroute to block drop.
We opted to drill & ream out the VEX wheel square holes to .188" and then used extra long, hardened 10-32 SHCS with unthreaded portion polished for fit to terix sleeve bearings. Protruding overlong Tetrix hub screws engaged into holes in plastic of the VEX 7-spoke wheel hubs, and Shoe Goo urethane adhesive strengthened the hub-to-wheel attachment. Bolt axles free spin in nested channel bearing blocks, and threaded portion captures wheel to adjacent hub/sprocket. Direct driven chain sprocket that is close mounted to wheel is our preferred FTC drive scheme. Driving wheels through axles has proven too unreliable for us.
Double bar H-frame of 20mm Bosch-Rexroth slotted aluminum, using 80/20 10-32 slot nuts. Sliding motor plate adapter and sliding bearing block on opposite sides of T-slot frame allow variable positioning for setting wheelbase length and chain tensioning. This encoder supplemented drive was very precise & reliable in competition and had excellent traction. The VEX wheels are an excellent value.
PICs below:
http://i489.photobucket.com/albums/rr259/RRLedford/FTC2013-14/20131203_205718_zps4c86e5b9.jpg (http://s489.photobucket.com/user/RRLedford/media/FTC2013-14/20131203_205718_zps4c86e5b9.jpg.html)
http://i489.photobucket.com/albums/rr259/RRLedford/FTC2013-14/20131203_205650_zps54f5c514.jpg (http://s489.photobucket.com/user/RRLedford/media/FTC2013-14/20131203_205650_zps54f5c514.jpg.html)
http://i489.photobucket.com/albums/rr259/RRLedford/FTC2013-14/20131203_205622_zps68d6fa33.jpg (http://s489.photobucket.com/user/RRLedford/media/FTC2013-14/20131203_205622_zps68d6fa33.jpg.html)
-Dick Ledford
DavisDad
24-12-2013, 20:01
DavisDad, regarding the VEX mechanum wheels, I am not sure if their square axle material is considered legal for FTC.
Hi RRLedford,
I've been following your work in another thread. Nice work!
To be honest, it never occurred to me that the square shaft axle might be an illegal part. I'll have to look into this. Thanks for the heads-up.
We had initially planed to bore to 3/16" and make a hub, as I thought the VEX design would be prone to strip. After working with the system, I'm comfortable that it'll hold up; hope we can keep it.
Questions from a first year FTC team:
Have you seen teams using the Matrix 9V motors? If so, was there an appreciable difference in power?
Are you using the Tetrix motor controller internal PID control for encoders? If so, have you been able to use Tetrix motor controllers for position control? We haven't gotten this to work with Matrix.
How important is power in FTC for blocking and shoving? The videos I've seen from early scrimmages don't have much "combat".
We custom weld aluminum structures as it's a lot of fun, quick and strong. Anyone interested in Al welding, I'd be glad to post on the subject. We've been MIG welding steel for a while, but had thought Al was difficult; not true with a "spool gun". The welder and spool gun set-up is about $1,000 equipment costs. The up side is that the Al stock is cheaper than vendor structural components. Welding is also good for prototyping as you can tack weld a design together more quickly than bolting and it's easy to grind away the spot welds for changes. We've yet to have a weld failure.
Thanks for the post
RRLedford
29-12-2013, 22:12
DavisDad,
I have not seen the Matrix motors used so far. For us they seemed too weak for a 1:1 drive train.
We are using the Tetrix motor controllers with our Tetrix motor-encoder combos. We use LabView for programming.
This year the penalties are rather high and easy to get if you plan to use blocking and pushing for a defense strategy. We wanted the more powerful Tetrix motors for better acceleration to peak speed.
The AL welding makes more sense for our team at the FRC level than the FTC level, especially since we have already accumulated a lot of the Tetrix channel and related parts. It does really annoy me though when I see too many screws and nuts falling off the robot, and wiggling joints negatively impacting performance.
Good luck using the VEX square shafts to drive your VEX mechanum wheels.
-Dick Ledford
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.