![]() |
Speed Sensor
I'm looking for some kind of sensor that can measure speed/velocity of a moving wheel. I considered encoders/gear teeth sensors but I'm out of interrupts.
Ideally I'd like to find something that would return an analog value based on the speed... Any ideas? Thanks |
Re: Speed Sensor
What about using a seperate board, and have it communicate to the IFI board via a serial connection?
|
Re: Speed Sensor
You can use accelerometers, which you have to integrate to get the speed. I don't know if they are included in the kit this year, but they were definitely in the kit last year.
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
There is a 2 axis accelerometer in the kit this year.
An accelerometer will give you an accurate velocity reading (after a simple integration. Remember: position, velocity, and acceleration are all interconnected) for the robot as a system. If you are checking overall velocity, this will be fine. If you need each individual wheel's velocity, it may not be the best solution. If you can tell me, how are you out of interrupts? There's good ol' interrupts 1 and 2 (as configured in Kevin's encoder code), but you can also set your code to run interrupts off pins 3-6. Do you really have 6 interrupt driven sensors? I'd be afraid of interrupt overflow before I ever worried about not having enough hardware interrupts to work with. See the interrupt source at www.kevin.org/frc for more info. Quote:
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
Quote:
the dual axis accelerometer has an X and Y output that are analog voltage that is proportional to acceration. There for the input to the controller would use 2 analog ports and need to have a support routine relating the Analog to digital output to acceleration of the robot in the X and Y directions. This could be done with integer math only and could even be written as inline assembler code for optimal speed. Just a few thots from an old mentor. LRU. |
Re: Speed Sensor
Quote:
-Kevin |
Re: Speed Sensor
The Kit includes a accelerometer, a gyro, and two gear tooth sensors. You can use EasyC and drag and drop them into the code. There is also information in the help file on getting them going.
|
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
A tachometer (an AC motor in reverse) gives voltage and frequency output porportional to the velocity of its shaft, but these arn't very precise at low speeds.
I have heard many different things in regards to using a microcontroller other that the RC, is it allowed? Can I forexample use a PIC or someother microcontroller to handle low level stuff? |
Re: Speed Sensor
I think so, the rules dont specifically write about how we cant make a PIC. as long as its outputs go to the RC, they're okay..
We're going to use 2 low-g high precision Motorolla accelerometers (1 axis) run it through a kalman filter on a PIC or STAMP or whatever and output an analog signal.. be sure to eliminate every possible source of bias before your integrator (PIC in this case) or else your v measurements will be vastly off |
Re: Speed Sensor
Quote:
|
Re: Speed Sensor
Quote:
-Kevin |
Re: Speed Sensor
Quote:
For example, in the interrupt service routine for EasyC you connect the A channel to pins 1-6. When the interrupt on the A channel happens, the code reads the B channel to decide whether to count up or down. It doesn't matter if the B channel is actually connected to an encoder - it only sets the count direction. If you decide to use EasyC it has built-in encoders that only look at a single input. Brad |
Re: Speed Sensor
Quote:
-Kevin |
Re: Speed Sensor
Quote:
Quote:
|
Re: Speed Sensor
This maybe a little of topic but can a PIC output a analog value directly?
It would make life a lot simpler. |
Re: Speed Sensor
You can use onboard PWMs or software/timer generated PWMs to create a make shift ADC. Simply feed the output to a small capacitor connected to an analog input with a resister between the capacitor and the analog input that leads to ground.
Take a look at this: http://www.piclist.com/techref/sceni...pwm/pwm_vp.htm |
Re: Speed Sensor
Just use a DAC. big deal.
DACs arnt very hard to make, you could even just take a reference esign from TI or AD |
| All times are GMT -5. The time now is 17:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi