|
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.
|