Go to Post But when it comes down to it, the best teams usually end up winning regardless. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 15-05-2015, 17:45
Bryce2471's Avatar
Bryce2471 Bryce2471 is offline
Alumnus
AKA: Bryce Croucher
FRC #2471 (Team Mean Machine)
Team Role: Mechanical
 
Join Date: Feb 2013
Rookie Year: 2007
Location: Camas, WA
Posts: 427
Bryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud ofBryce2471 has much to be proud of
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by RyanShoff View Post
I would not recommend trying anything other than absolute feedback geared one to one with the wheel.
This.
Accept that I would also only recommend mechanically zeroing the encoder.

It's not that other methods don't work. It's that I have found this to be effective, cheap, easy, relible, and no maintainance.
I just think it's the best solution, all around.

I love healthy debate though, so it would be great to hear someone's argument for why another solution is better in some way.
__________________
FLL Team Future imagineers
2010 Oregon State Championships: Winners
2011 International Invite: First place Robot design, Second Place Robot Performance
FRC Team Mean Machine
2012 Seattle: Winning alliance
2013 Portland: Winning alliance
2013 Spokane: Winning alliance
2014 Wilsonville: Winning alliance
2014 Worlds: Deans List Winner
  #32   Spotlight this post!  
Unread 15-05-2015, 18:12
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 147
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by AdamHeard View Post
That is essentially the same though. It requires the robot to be on and get comm for the sensor position to be saved.

Might not be enough time to do that in elims.
It was extremely rare this year for us to need to change the offset.

You can to do it before a match starts as soon as the robot connects to the field. (Now I thinking what happens to a smartdashboard button when pressed before the robot connects? Does the command queue? I don't know.)
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com
  #33   Spotlight this post!  
Unread 16-05-2015, 07:56
teku14's Avatar
teku14 teku14 is online now
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by Andrew Schreiber View Post
I like the idea, I'd be curious how you get around the issues with it's max velocity. It's designed for aerial vehicles so the camera expects to have a long distance to the ground. To get data for 14 fps you'd need to mount it 18 inches from the ground.

4/(1/400)*18*.0254/(.004/.000024)*3.28 = 14.4
Correct me if I'm wrong however we expected to mount this approximately 5.5 inches or 0.139 meters above the ground since that is the clearance of the our swerve modules.

- Also we have purchased an additional M12 lens to swap out which is adjustable in focal length from 2.8 to 16 mm

Assuming the minimum of 2.8mm I was thinking that

4/(1/400)*0.139/(0.0028/0.000024) = 1.9 m/s or 6.2 ft/s

Now that may not be the max speed the robot is capable of but we feel that it is an acceptable speed for accurate autonomous navigation which is what we are trying first. So it really doesn't fit into the whole theme of being an all purpose swerve sensor, but the technology used is very intriguing and our key problem with swerve is more of navigating in autonomous.

PS. Hopper Buddies for life

Last edited by teku14 : 16-05-2015 at 08:03.
  #34   Spotlight this post!  
Unread 16-05-2015, 11:12
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,074
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by teku14 View Post
Correct me if I'm wrong however we expected to mount this approximately 5.5 inches or 0.139 meters above the ground since that is the clearance of the our swerve modules.

- Also we have purchased an additional M12 lens to swap out which is adjustable in focal length from 2.8 to 16 mm

Assuming the minimum of 2.8mm I was thinking that

4/(1/400)*0.139/(0.0028/0.000024) = 1.9 m/s or 6.2 ft/s

Now that may not be the max speed the robot is capable of but we feel that it is an acceptable speed for accurate autonomous navigation which is what we are trying first. So it really doesn't fit into the whole theme of being an all purpose swerve sensor, but the technology used is very intriguing and our key problem with swerve is more of navigating in autonomous.

PS. Hopper Buddies for life
Math checks out, let me know how it works.
__________________




.
  #35   Spotlight this post!  
Unread 16-05-2015, 15:27
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by RyanShoff View Post
I agree hard coding calibration values is bad.

We put a button on the smart dashboard called 'zero encoders'. Pushing it stores the steering encoder positions to the roborio using Preferences. That way there is nothing hardcoded, and the same code will work on two different robots. If something mechanically changes on the bot, just set the wheels to straight, press the button, and the new offsets are stored.
I like this approach. If you have to zero something, having the ability to set the values in code without having to redownload code is always nice.

Even so, it isn't that bad to have magic numbers in the code if you code in such a way that the magic numbers are easily modified.

One approach is possible with the current FIRST control system is to keep these magic values in a text file on the PC, the have bit of code on the PC that communicates to the code running on the robot that sends the magic values to the robot upon request (RoboRIO sends a UDP message "please send me MagicNoXXX" Code on PC opens text file, finds MagicNoXXX, replies with UDP message "MagicNoXXX=1234"). It even works in combination with the button idea as well. Humans put robot into known location, hits RememberTheseMagicNumbers Button on the robot, RoboRIO sends UDP message "MagicNo001=1000, MagicNo002=2000, ...", Code on PC then openes text file and updates or adds the values to the list and replies to RobioRIO via UDP "as you wish")

Seems like a system that could work. (note to PaulT what do you think, should we do this? Seems like our "play sound X code" could do this as a side business without breaking sweat)

Dr. Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
  #36   Spotlight this post!  
Unread 16-05-2015, 16:48
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by Joe Johnson View Post
I like this approach. If you have to zero something, having the ability to set the values in code without having to redownload code is always nice.

Even so, it isn't that bad to have magic numbers in the code if you code in such a way that the magic numbers are easily modified.

One approach is possible with the current FIRST control system is to keep these magic values in a text file on the PC, the have bit of code on the PC that communicates to the code running on the robot that sends the magic values to the robot upon request (RoboRIO sends a UDP message "please send me MagicNoXXX" Code on PC opens text file, finds MagicNoXXX, replies with UDP message "MagicNoXXX=1234"). It even works in combination with the button idea as well. Humans put robot into known location, hits RememberTheseMagicNumbers Button on the robot, RoboRIO sends UDP message "MagicNo001=1000, MagicNo002=2000, ...", Code on PC then openes text file and updates or adds the values to the list and replies to RobioRIO via UDP "as you wish")

Seems like a system that could work. (note to PaulT what do you think, should we do this? Seems like our "play sound X code" could do this as a side business without breaking sweat)

Dr. Joe J.
Definitely seems like something that we should do. I have actually been thinking about doing a similar system for a while, but I never though of using it to zero potentiometers. This could have saved us a lot of time.

Only thing is that we should keep the text file in the roboRIO's file system, not on the laptop. Seems like that will cut out a lot of complexity in the system, prevent any problems switching between laptops, and allow us to use different constants for a practice robot/chassis.
  #37   Spotlight this post!  
Unread 16-05-2015, 16:58
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by Pault View Post
Definitely seems like something that we should do. I have actually been thinking about doing a similar system for a while, but I never though of using it to zero potentiometers. This could have saved us a lot of time.

Only thing is that we should keep the text file in the roboRIO's file system, not on the laptop. Seems like that will cut out a lot of complexity in the system, prevent any problems switching between laptops, and allow us to use different constants for a practice robot/chassis.
So there you go, CD community. If Paul goes along with something I propose you can be pretty sure it's not the worst idea I've ever had ;-) Seriously though. Paul was the core of Overclocked's coding team this year. He's top shelf. His opinion carries a lot of weight with me.

Even so, YMMV.

Dr. Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2
  #38   Spotlight this post!  
Unread 16-05-2015, 18:22
Clem1640's Avatar
Clem1640 Clem1640 is offline
Head Mentor
AKA: Clem McKown
FRC #1640 (Sab-BOT-age)
Team Role: Leadership
 
Join Date: Mar 2009
Rookie Year: 2006
Location: Downingtown PA
Posts: 249
Clem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond reputeClem1640 has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

We (FRC1640) use BI Technologies Magnepot Hall Effect Potentiometer Part # 6127V1A360L.5FS. Cost is reasonable ($12.32 each). These sensors have performed well for us since we adopted them in 2012. They are analog devices. We calibrate them mechanically and identically on all of our swerve modules.

see: http://www.bitechnologies.com/pdfs/6120.pdf
__________________


Clem McKown
Head Mentor - FRC 1640 & FTC 7314
Chairman - Downingtown Area Robotics
  #39   Spotlight this post!  
Unread 17-05-2015, 01:11
AlexanderTheOK AlexanderTheOK is offline
Guy
no team
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Los Angeles
Posts: 147
AlexanderTheOK is just really niceAlexanderTheOK is just really niceAlexanderTheOK is just really niceAlexanderTheOK is just really nice
Re: Best Sensor for Unlimited Rotation Swerve

Just mentioning this on the debate of incremental vs absolute because it hasn't been, and was what pushed 696 to use the ma3 instead of a quad encoder.

1 quad encoder takes 2 ports.

you will need 8. (one for steering and one for drive odometry right?)

Thats 16 digital ports. You don't have that to spare, especially if you want oooh i dont know, limit switches and a quadrature encoder on your elevator, or any other basic digital sensors.

You COULD run the sensors into an offboard processor, which would then stream the data over via UDP.

Or you could gear an MA3 1 to 1, save yourself 8 digital ports, save time during development by only needing 4 magic numbers in your robot code, save time during competition by not having to realign everything perfectly before each match, and save time during the build season by not having to code an offboard processor and the netcode necessary.

I know it's a compromise, but I feel like the positives far outweigh the negatives.

(Note: We at 696 DID NOT gear the MA3 1 to 1. It was a pain in the butt. We ended up essentially having quadrature encoders that go into an analog port. Not a mistake I would ever make again. It worked fantabulously during competition but something may have snapped in me halfway through debugging.)
  #40   Spotlight this post!  
Unread 17-05-2015, 14:43
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,370
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

For those who see this as an application where a quadrature encoder is best, then that is your choice, your robot, your problem.

1640 has always used an analog absolute rotary position sensor of the Hal effect principle. For the past 3 years we have used the BI 6127V1A360L.5FS. Available from Mouser and Digikey. They are up to 12.32$ for 5. Were 10.20$ the first year we used them. They just work and I like the price. I am not cheap, I'm frugal. Soldering the wires on to the posts is a good job for students that have never soldered before. They are not 0 to 5 volt like the MA3's and some other sensors. They are .25 volts to 4.75 volts. Your code has to deal with this. They are 10 bit resolution. The c-rio and the analog break out were not a ratiometric system and we did compensate for it in code. I would have to ask the programmers how stable the roborio 5 volt supply is compared to the old control system. I know the code is still in there for this. By using .25 volts for the low end most noise is avoided. Also, It is not possible to drive all the way to the 5 volt rail. This reduced range gives a crisp 0 - 360 transition under all but the worst cases With the cost of reduced resolution. The BI sensors use a bronze bushing and care must be used in attaching to the steering output shaft. Any miss alignment will cut reliability. We use the beam couplers from First choice. Our swerve modules are designed to be easy to replace. We do not fix modules on the robot. They are pulled and replaced if a problem is suspected. Remove 4 bolts and unplug 2 connectors and it's out. Put the new module in with 4 bolts and plug in 2 connectors. No programming changes or calibration. To accomplish this we mechanically calibrate the module. We do this by adjusting the beam coupler position to the banes bot steering gear box. Wheel forward, chain left, set at 2.5 volts. We made a break out for the steering sensor that allows us to plug in a good DVM and power the sensor. It is a little tedious to get them exactly at 2.5 but, with practice it gets easier.

We do not close the loop on wheel velocity. The velocity output from Ether's equations are output to the talons (PWM). We do have tachometers on each module. We use them for distance in autonomous. In the past we put 6 magnets underneath the large timing belt pulley on the first reduction. We used a Melexis US2881LUA-AAA-000-BU bipolar latch Hal effect switch. It worked but, this year we did something else. From the kit of parts we used the 3M retroflective tape and cut out pie slices and stuck them on the underneath rim of the timing pulley. 24 total. Used a spot of super glue thin to help the adhesive. Pololu QTR-1A reflectance sensors were mounted underneath the pulley to sense the tape. Mounts were printed. 2 boards for 4.25$. A frugal buy. Even though the QTR-1A is a analog output, the Roborio digital IO chops them just fine. We use a counter set for rising and falling edges for 48 counts per revolution of the first reduction. So we only use 4 digital IO's. It works.

I have thought about spi output absolute and quadrature sensors for awhile. Eating up 4 analogs can cause problems for other subsystems on the robot. So the one solution is the AMS AS5048A . It outputs 14 bit resolution and can be daisy chained to the Roborio SPI port. Pull the chip select low and read in 8 bytes. Set chip select high. Or use a chip select for each sensor.
There is also the AS5047D which outputs quadrature ABI and the resolution is programmable. You can also read absolute position from a register.
The other chip of interest is the AS5600. It can be a 5 volt or 3.3 volt absolute analog sensor 0 to 3.3 or 0 to 5 volt. The 3.3 0 to 3.3 would allow it to be wired directly to a talon srx for can control. All 3 chips are available on carrier boards with a magnet. The mounting foot print is the same for all 3 boards. A team could 3 d print a mount and play with all 3. At 15.00$ a board they are a frugal buy. I will probably buy a board and push the programming team to try controlling the swerve with can talons this summer.
  #41   Spotlight this post!  
Unread 18-05-2015, 08:39
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,332
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Best Sensor for Unlimited Rotation Swerve

Quote:
Originally Posted by AlexanderTheOK View Post
Just mentioning this on the debate of incremental vs absolute because it hasn't been, and was what pushed 696 to use the ma3 instead of a quad encoder.

1 quad encoder takes 2 ports.

you will need 8. (one for steering and one for drive odometry right?)

Thats 16 digital ports. You don't have that to spare, especially if you want oooh i dont know, limit switches and a quadrature encoder on your elevator, or any other basic digital sensors.

You COULD run the sensors into an offboard processor, which would then stream the data over via UDP.

Or you could gear an MA3 1 to 1, save yourself 8 digital ports, save time during development by only needing 4 magic numbers in your robot code, save time during competition by not having to realign everything perfectly before each match, and save time during the build season by not having to code an offboard processor and the netcode necessary.

I know it's a compromise, but I feel like the positives far outweigh the negatives.

(Note: We at 696 DID NOT gear the MA3 1 to 1. It was a pain in the butt. We ended up essentially having quadrature encoders that go into an analog port. Not a mistake I would ever make again. It worked fantabulously during competition but something may have snapped in me halfway through debugging.)
The Talon SRX controllers can take quadrature input and then you don't have to waste any of the DIO ports for them. You don't have to do anything on them like PID control to get feedback from them about the encoders. Granted, the SRX controllers have their own issues with that silly ribbon cable...

We stored our offset values on a text file on a USB drive that was plugged into the RoboRIO. We could update them easily enough by just changing the alignment and then hitting a button on the dashboard.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Closed Thread


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 20:28.

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