Go to Post As a team leader if I do not INSPIRE I have failed, and I do not like to fail. - Mike Martus [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 29-09-2014, 21:13
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
[FTC]: Encoders on new Andymark motors.

I was really excited about the new andymark motors that we are allowed to use this year (Game Manual 1).

However, I see that the encoders only give 280 pulses per shaft revolution (PPR). The old encoders give 1440 pulses per revolution.

So the old encoder would be giving 3600 pulses per second at full speed , and the new encoders will be giving 700 pulses per second at full speed.

By my reckoning this will totally mess up any chance that the motor controllers have of achieving the correct requested speed, and subsequently cause all sorts of overshoot when attempting to "run to position".

eg: if I ask for 10% speed, I'm going to get %51 speed. Because the motor will keep speeding up until the pulses get as fast as expected.

I guess if I limit my speed requests to 20%, I'll get a proportional range, but I KNOW it's going to mess up the PID position controller since the gain will essentially be 5 times higher.

Does anyone at Hitechnic know if we can use the "gain" settings in the motor controller to compensate for this much-reduced PPR?
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 29-09-2014, 21:51
emmell's Avatar
emmell emmell is offline
Murphy was an Optimist!
AKA: Mannie Lowe
no team (Radbotics, RoboKnights, CircuitRunners, Oscar, and more...)
Team Role: Coach
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Marietta, GA
Posts: 178
emmell is just really niceemmell is just really niceemmell is just really niceemmell is just really niceemmell is just really nice
Re: [FTC]: Encoders on new Andymark motors.

Phil:
I think you'll have to contact AndyMark instead of HiTechnic since it's there motor/encoder.
__________________
Mannie Lowe
FIRST Program Manager - Center for Mathematics and Science Education - University of Mississippi
Mississippi FIRST Tech Challenge Affiliate Partner


Reply With Quote
  #3   Spotlight this post!  
Unread 30-09-2014, 01:00
Scott_4140 Scott_4140 is offline
Registered User
FTC #4140 (Fish in the Boat)
Team Role: Coach
 
Join Date: May 2011
Rookie Year: 2005
Location: Lakeville, MN
Posts: 86
Scott_4140 is just really niceScott_4140 is just really niceScott_4140 is just really niceScott_4140 is just really nice
Re: [FTC]: Encoders on new Andymark motors.

Quote:
Originally Posted by emmell View Post
Phil:
I think you'll have to contact AndyMark instead of HiTechnic since it's there motor/encoder.
AndyMark is not going to change the encoder at this point. Beyond that, there's not much they can do. They essentially provide an input.

The PID is buried in the firmware of the HiTechnic motor controller. Hopefully, the "gain" or another hook can compensate. It may take some combination of the HiTechnic firmware and code in either LabVIEW or RobotC.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-09-2014, 07:47
Sasha Sasha is offline
Registered User
AKA: Alexander Kirillov
FTC #4137 (IslandBots)
Team Role: Coach
 
Join Date: Sep 2010
Rookie Year: 2008
Location: Long Island, NY
Posts: 58
Sasha is just really niceSasha is just really niceSasha is just really niceSasha is just really niceSasha is just really nice
Re: [FTC]: Encoders on new Andymark motors.

Or you can just write your own PID. In fact, for position control it suffices to use proportional control (P of PID), and the code is quite simple - this is what we are doing.
__________________
FTC 4137 "Islandbots"
islandbots.org
Reply With Quote
  #5   Spotlight this post!  
Unread 30-09-2014, 08:06
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Encoders on new Andymark motors.

Thanks for the replies.

I did also contact AndyMark, but I suspect they may say "Oh Well". I was hoping they have worked with Hitechnic to figure out a work around.

I'd like to buy 20 of these motors for my two teams, but if the encoders don't help... it's no bargain.

Doing our own PID is possible, but since one of the most unreliable parts of the FTC system is the NXT <-> Motor controller interface-comms (an NXT problem) adding hundreds of more commands back and forwards seems like asking for trouble.

We do some of this for "Run to position" but I would really like to be able to use the constant speed control mode without having to add a lot of CPU cycles.

Still hoping for some inside help.... I've done a lot of work with the internal Motor Controller registers. These are "gain" values in there, but the docs say to leave them alone...

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #6   Spotlight this post!  
Unread 06-10-2014, 21:06
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Encoders on new Andymark motors.

Quote:
Originally Posted by Sasha View Post
Or you can just write your own PID. In fact, for position control it suffices to use proportional control (P of PID), and the code is quite simple - this is what we are doing.
But when you are doing that, are you running your motors using the constant speed or constant power setting? I would assume you are using constant speed to overcome varying drag and friction etc. If that's the case, don't expect constant speed to run smooth anymore. It will probably hunt up and down.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #7   Spotlight this post!  
Unread 07-10-2014, 09:14
BSV BSV is offline
FTC / FRC mentor
AKA: Travis
FRC #2723
 
Join Date: May 2013
Rookie Year: 2011
Location: Oklahoma City
Posts: 145
BSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud ofBSV has much to be proud of
Re: [FTC]: Encoders on new Andymark motors.

So has anyone been able to test out the encoders, yet?

We've ordered the motors, but the encoder wire wasn't available, yet (hopefully it can be ordered tomorrow). There is a hack available to get it to work, but we've got other stuff to do so we can probably wait a few days.

I started mentoring some FTC teams this year, and apparently they've never used encoders before (at least not recently - I found a couple but they were damaged). The FLL kids who have moved up to FTC this year are wondering how the heck the previous teams built a robot that doesn't have any sensor feedback.
Reply With Quote
  #8   Spotlight this post!  
Unread 07-10-2014, 20:39
Sasha Sasha is offline
Registered User
AKA: Alexander Kirillov
FTC #4137 (IslandBots)
Team Role: Coach
 
Join Date: Sep 2010
Rookie Year: 2008
Location: Long Island, NY
Posts: 58
Sasha is just really niceSasha is just really niceSasha is just really niceSasha is just really niceSasha is just really nice
Re: [FTC]: Encoders on new Andymark motors.

Quote:
Originally Posted by PhilBot View Post
But when you are doing that, are you running your motors using the constant speed or constant power setting?
Constant power.

We were doing things in a very primitive way, without using Tetrix controllers built-in PID (in motor setup tool, PID box was unchecked). Probably the speed was not constant, but we never noticed any speed variations as long as the battery was charged, and "going the set distance" function was working quite reliably, with the accuracy of about 1/2 inch.

One of the reasons was that initially only 1 out of 4 drive motors was equipped with encoder (because we didn't have enough encoders). After that, it was "do not fix what is not broken".
__________________
FTC 4137 "Islandbots"
islandbots.org
Reply With Quote
  #9   Spotlight this post!  
Unread 12-10-2014, 22:50
CougarRobot CougarRobot is offline
Registered User
FTC #4251 (Cougar Robotics)
Team Role: Coach
 
Join Date: Oct 2010
Rookie Year: 2007
Location: Columbus, Ohio US
Posts: 17
CougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to behold
Re: [FTC]: Encoders on new Andymark motors.

Interfacing the new AndyMark NeveRest Motor with the HiTechnic Motor Controller

We have tested the new AndyMark NeveRest Motor and it works well with the TETRIX/HiTechnic Motor Controller. Here's what you should expect and what you need to do to make it work the way you want on an FTC robot. We will use motorD as our motor in our examples.

First we need to agree on some terminology. The TETRIX shaft encoder used with the TETRIX motors is a US Digital e4P with a 360 degree encoder wheel. Model E4P-360-236-N-D-H-D-B. To use US Digital's terminology it produces 360 Cycles Per Rotation (CPR) or 1440 Pulses Per Rotation (PPR). It is a quadrature encoder producing 4 Pulses per Cycle. In FTC use, with ROBOTC, it will produce 1440 PPR, ticks, or a count of 1440 in nMotorEncoder[motorD] per revolution.

The AndyMark NeveRest motor's built in encoder produces 280 cycles per revolution (CPR). We tested it. As expected with 280 CPR, it outputs 1120 PPR, ticks, or a count of 1120 in nMotorEncoder[motorD] per revolution.

So, here's the only tricky bit. The NeveRest motor’s 1120 PPR is only approximately 78% of the TETRIX Motor’s 1440 PPR. You need to adjust your range when running under PIDControl from 0-100 down to 0-78.

The HiTechnic motor controller expects 1440 PPR and is "tuned" to drive a Tetrix motor at about 150 rpm when using PIDControl and a commanded speed of 100% motor[motorD]=100;. That is, the motor controller will up the power as necessary to try to achieve 3600 Pulses per second when commanded to run the motor at 100% speed, or at about 1800 Pulses per second when commanded to run the motor at a speed of 50%.

At full speed, 150 rpm, the NeveRest motor encoder will only produce 2800 Pulses per second. Using the 1440 PPR Tetrix motor with shaft encoder will produce 2800 ticks at 78% speed or 117 rpm. Since the motor controller will try to adjust power as necessary using the built in PID to achieve the correct speed, a speed setting of 78%, i.e. motor[motorD]=78; will achieve full speed on the NeveRest Motor. Likewise, a speed setting of 39, motor[motorD]=39; (½ of 78) will achieve approximately 50% speed on the NeveRest motor running under PIDControl. Any speed from 78% to 100% will cause the controller to run the motor at 100% speed. Please keep in mind that this only works this way under PIDControl and not under openLoop. Under openLoop mode you are just passing a percentage power to the motor controller and you will need to revert to using 0 through 100 for your power levels if you want to get full range & power out of the NeveRest motor.

Last edited by CougarRobot : 12-10-2014 at 23:02.
Reply With Quote
  #10   Spotlight this post!  
Unread 13-10-2014, 14:19
ftcTeam6389 ftcTeam6389 is offline
Registered User
FTC #6389
 
Join Date: Oct 2013
Location: Eden Prairie MN
Posts: 39
ftcTeam6389 is on a distinguished road
Re: [FTC]: Encoders on new Andymark motors.

Thank you very much for this info @CougarRobot! Very helpful!

- - - -
Rachel
Team Captain
FTC Team #6389 - "The LazyBotts"
Reply With Quote
  #11   Spotlight this post!  
Unread 07-12-2014, 22:44
Jay Clayton's Avatar
Jay Clayton Jay Clayton is offline
Registered User
FTC #7060
Team Role: Mentor
 
Join Date: Oct 2013
Rookie Year: 2013
Location: Pittsburgh PA
Posts: 2
Jay Clayton is an unknown quantity at this point
Unhappy Re: [FTC]: Encoders on new Andymark motors.

Team #7060 Fried Fuzes , would like to know if anyone using the NeveRest encoder cable, black end will not fit in the Motor Controller. With some trimming of the black plastic it will fit. BUT what is the proper direction in the MC ? Can anyone tell us what are the pin colors of the encoder port ? Yellow pin on the inside or outside , black end goes in MC both ways .

Thanx , Confused and Frustrated #7060
Reply With Quote
  #12   Spotlight this post!  
Unread 07-12-2014, 22:54
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Encoders on new Andymark motors.

Hi

The Yellow wire is nearest to the outside of the Motor Controller.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #13   Spotlight this post!  
Unread 08-12-2014, 00:33
Jay Clayton's Avatar
Jay Clayton Jay Clayton is offline
Registered User
FTC #7060
Team Role: Mentor
 
Join Date: Oct 2013
Rookie Year: 2013
Location: Pittsburgh PA
Posts: 2
Jay Clayton is an unknown quantity at this point
Re: [FTC]: Encoders on new Andymark motors.

Quote:
Originally Posted by PhilBot View Post
Hi

The Yellow wire is nearest to the outside of the Motor Controller.

Phil.
Thanks for everyones help ��
Reply With Quote
  #14   Spotlight this post!  
Unread 08-12-2014, 11:27
Sasha Sasha is offline
Registered User
AKA: Alexander Kirillov
FTC #4137 (IslandBots)
Team Role: Coach
 
Join Date: Sep 2010
Rookie Year: 2008
Location: Long Island, NY
Posts: 58
Sasha is just really niceSasha is just really niceSasha is just really niceSasha is just really niceSasha is just really nice
Re: [FTC]: Encoders on new Andymark motors.

Image from AndyMark page

__________________
FTC 4137 "Islandbots"
islandbots.org
Reply With Quote
  #15   Spotlight this post!  
Unread 17-12-2015, 15:41
dcribbs dcribbs is offline
Registered User
AKA: Dave Cribbs
FTC #5598 (Parish Robotics)
Team Role: Coach
 
Join Date: Mar 2009
Rookie Year: 2004
Location: Denton, TX
Posts: 35
dcribbs has a spectacular aura aboutdcribbs has a spectacular aura about
Re: [FTC]: Encoders on new Andymark motors.

A couple of questions concerning using the AndyMark encoders on the NeveRest Motors with the new MRI controllers.

1.Which set of encoder wires work best (or with the least modification)?
a) am-2965 both ends white connectors
b) am-2992 one black, one white connector


2.What is the correct orientation for the encoder cables to plug into the new MRI controllers?

I read the above posts about the built in Hi-Technic controller. Has anyone had issues with the new MRI controllers? Any advice on using the encoders with autonomous?

Thanks for your help!
__________________
Dave Cribbs
Coach & Teacher

FTC - Team 5598, 6635, 6795
FRC - Team 3626
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi