Detecting wheel slip using the Traxxas RPM Telemetry Sensor
I want my autonomous RC car to be able to know when the wheels are slipping. This will be prerequisite information to detect and predict conditions such as understeer, oversteer, and wheel spin. I believe this will be crucial to maintain control of the car during high speed maneuvers.
Wheel Slip
Lateral wheel slip is is the angle between the direction the wheel is moving and the direction it is pointing. My plan for this is to use the car's velocity vector as the direction it is moving and to use an onboard magnetometer to determine the direction that the car is pointing. For the front wheels, I'll have to factor in the steering angle as an offset to the wheel's heading, which I can approximate with the steering servo's position. I'm not yet to that stage of the project, so expect more on this later.
Longitudinal wheel slip is the percentage of the difference between the surface speed of the wheel compared to the speed between axle and road surface. Positive longitudinal slip indicates that the wheels are spinning, while negative longitudinal slip indicates that the wheels are skidding. The speed between the axle and road surface is simply the magnitude of the car's velocity vector (after you factor out lateral slip velocity). To get the surface speed of the wheel I need to know its diameter, which I can measure with a ruler (I'll assume for now that there's no tire deformation), and I also need to know its RPM.
RPM Sensor: Converting to Wheel Speed
This is where the RPM telemetry sensor comes into play. Thankfully, Traxxas makes RPM telemetry sensors that fit the Traxxas Slash. They are marketed to plug into the Traxxas TQi receiver, which sends the RPM information back to a module on the RC transmitter, which you can connect to with a Traxxas app on your smartphone. The app shows you RPM, speed, and some other things when you add other optional sensors. I don't care about seeing the RPM on my phone, but I do want my navigation controller to know the wheel's RPM.
The RPM sensor measures the RPM of the spur gear. To get the wheel's RPM I'll have to divide by the transmission's gear ratio - best I can tell from online message boards, this is 2.72 for the Traxxas Slash. To compute the wheel's surface speed the formula is simple:
wheel's surface speed (meters per second) = spur RPM / 60 / 2.72 * π * wheel diameter in mm / 1000
Let's break that down:
RPM = revolutions per minute of the spur gear
RPM / 60 = revolutions per second of the spur gear
(RPM / 60) / 2.72 = revolutions per second of the rear wheels
wheel diameter in mm / 1000 = wheel diameter in meters
π * diameter = circumference of a circle
revolutions per second * wheel circumference = wheel's surface speed
RPM Sensor: Digital Interface
But how do I get the RPM from this RPM sensor? I couldn't find any documentation for this thing. With a little bit of guess-work and a multimeter on the Traxxas TQi receiver, I determined that it is a 3-wire inductive proximity sensor operating at 3.3V. That's easy enough to deal with, and thankfully matches the voltage of my Adafruit microcontrollers (so I don't need level shifters). The white signal wire is normally high but momentarily drops low every revolution.
To read the Traxxas RPM sensor on a microcontroller, connect the black wire to ground, the red wire to 3.3V, and the white wire to a digital input pin with a pullup resistor. Then in your code, setup an interrupt on the falling edge of the input pin. Store the duration in microseconds between each time the interrupt fires. To get the RPM of the spur gear, calculate:
1 / (duration in microseconds / 1,000,000) * 60 = revolutions per minute of the spur gear
Breaking that down:
Divide microseconds by 1,000,000 to get seconds (this gives you seconds per revolution),
Take the inverse to get revolutions per second,
Then multiply by 60 to convert seconds to minutes.
Example
Here's a small example for Arduino:
#define RPM_PIN 7
#define WHEEL_DIAMETER_MM 105
#define DRIVE_RATIO 2.72
volatile unsigned long tick_micros = 0;
void tickRPM() {
static unsigned long last_tick = 0;
unsigned long now = micros();
tick_micros = now - last_tick;
last_tick = now;
}
float getSpurRPM() {
return 6e7 / tick_micros;
}
float getWheelSpeed() {
return getSpurRPM() / 60 / DRIVE_RATIO * M_PI * WHEEL_DIAMETER_MM / 1000;
}
void setup() {
Serial.begin(9600);
pinMode(RPM_PIN, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(RPM_PIN), tickRPM, FALLING);
}
void loop() {
Serial.printf("Spur gear RPM: %f; Wheel speed: %fm/s", getSpurRPM(), getWheelSpeed());
Serial.println();
delay(1000);
}
From Roulette to Three Card Poker, Blackjack to Punto Banco, slots to high-limit gaming, Pasha Global Casinos have all of the action you could need on the heart of the Strip. Increased state costs to implement gambling laws, not likely to to|prone to} exceed the low hundreds of thousands of dollars annually. Some of these costs might be be} offset by the increase in state revenues. The new civil enforcement technique would create extra work for DOJ and the state courts. DOJ would need to evaluation and respond to claims that gambling laws are being damaged. State courts 메리트카지노 would also need to course of any civil lawsuits filed.
ReplyDeleteNever play extra money than you can to|you presumably can} afford to lose and never underestimate the dangers of playing habit — even whenever you play enjoyable slot machine games for free. And if you really feel issues may be getting out of arms, search skilled assist. As you perceive now, 카지노 betting extra money helps to win extra on on-line slots...nevertheless it additionally put your slot machine technique in danger and makes you threat to lose all your bankroll lots quicker. The technique for means to|tips on how to} improve your chances to win a spin on penny slots lies behind making bets may be} bigger than $0.01 because of|as a outcome of} these bets normally do not unlock bonus rounds.
ReplyDeleteIf both the player and the banker have eight or 9, it’s a tie. When the playing cards total any quantity aside from eight or 9, the banker consults a rule e-book to dictate the player’s subsequent transfer, adopted by his personal. Eight decks of playing cards are used; face playing cards and 10’s depend as zero and 카지노 사이트 Aces depend as one.
ReplyDelete