|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#31
|
|||
|
|||
|
Re: Best gyro for frc.
Quote:
|
|
#32
|
||||
|
||||
|
Re: Best gyro for frc.
Hmm, I was using the millis() function and did not realize there was a micros() available. Reviewing the Arduino library I now see it is available, so I'll go back and modify my code to use it. This could help to increase heading sample rates.
|
|
#33
|
|||
|
|||
|
Re: Best gyro for frc.
Quote:
You might also want to look into using interrupt driven timers. And while on the topic of timing and arduino, for timing dependent tasks write the code yourself. Tests I did a couple years back showed that there's a SIGNIFICANT overhead for the arduino digitalWrite compared to the comparable C code. I'd always assumed they were just macros but they actually include a fair bit of code. |
|
#34
|
||||
|
||||
|
Re: Best gyro for frc.
Quote:
I'm using SPI.transfer(data), not digitalWrite. Is there a more efficient method than this one? |
|
#35
|
||||
|
||||
|
Re: Best gyro for frc.
Has anyone thought about making an aftermarket board that plugs straight into the expansion port on the rRIO that includes a gyro built in as well as pwm expansion and dI/O and analog expansion?
|
|
#36
|
||||
|
||||
|
Re: Best gyro for frc.
Quote:
Even if it wasn't, the chip I tried in particular is a single-axis gyro and will require more precise mounting on the robot. Many teams like to mount cRios/roboRios vertically or in a way convenient for troubleshooting or maintanence. Maybe an embedded 3-axis gyro would solve that problem, like the rRio's 3-axis accelerometer. |
|
#37
|
||||
|
||||
|
Re: Best gyro for frc.
Quote:
Result: ~1 deg drift in 10 minutes. I think that'll be good enough. Photo of the setup (3D printed protective case): ![]() Serial Output: ![]() |
|
#38
|
|||
|
|||
|
Re: Best gyro for frc.
Quote:
I'd be willing to bet doing the SPI write yourself would be more efficient but it's probably not a huge deal. The only reason I did any tests was I needed faster executing digital writes. It was mostly an example of how the wrapper library is pretty inefficient. Mounting the gyro near the roboRio probably won't be an issue. Every time I've run a gyro has been an analog gyro, the issue was that the signal got messed up by the magnetic fields caused by currents driving motors. Minimizing transmission distance should help you there. But this gyro talks SPI so it's less susceptible to that issue. |
|
#39
|
|||
|
|||
|
Re: Best gyro for frc.
Quote:
|
|
#40
|
||||
|
||||
|
Re: Best gyro for frc.
Not to bust your chops, but that's true for electric fields -- not so much for magnetic fields. Effective magnetic shielding requires the use of a material with a high magnetic permeability such as Mu-metal (Carpenter Specialty Alloys). Rolled foil copper such as that found on PCBs has little effect.
|
|
#41
|
|||
|
|||
|
Re: Best gyro for frc.
Quote:
![]() |
|
#42
|
|||
|
|||
|
Re: Best gyro for frc.
Kauailabs will be announcing exactly what you describe on January 3.
|
|
#43
|
||||
|
||||
|
Quote:
Awesome, any plans to offer official Python support? |
|
#44
|
|||||
|
|||||
|
Re: Best gyro for frc.
Quote:
Thanks |
|
#45
|
|||
|
|||
|
Re: Best gyro for frc.
Invensense MPU-9250 (9-axis sensor).
Plus an on-board 32-bit ARM microcontroller, providing motion processing and calibration algorithms for accelerometers, gyros and magnetometers. Minimal yaw drift due to filtering/fusion algorithms. UART, SPI, I2C and USB interfaces. Open source hardware and firmware. C++, Java and Labview libraries for the Roborio will be available, too. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|