|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||||
|
|||||
|
Re: Speed Sensor
What about using a seperate board, and have it communicate to the IFI board via a serial connection?
|
|
#3
|
|||||
|
|||||
|
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.
|
|
#4
|
||||
|
||||
|
Re: Speed Sensor
Quote:
|
|
#5
|
|||
|
|||
|
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:
Last edited by Tom Bottiglieri : 12-01-2006 at 14:24. |
|
#6
|
||||
|
||||
|
Re: Speed Sensor
Quote:
-Kevin |
|
#7
|
||||
|
||||
|
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.
|
|
#8
|
|||
|
|||
|
Re: Speed Sensor
Quote:
|
|
#9
|
||||
|
||||
|
Re: Speed Sensor
Quote:
-Kevin |
|
#10
|
|||
|
|||
|
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 |
|
#11
|
||||
|
||||
|
Re: Speed Sensor
Quote:
-Kevin |
|
#12
|
|||
|
|||
|
Re: Speed Sensor
Quote:
Quote:
Last edited by Workaphobia : 13-01-2006 at 13:53. |
|
#13
|
||||
|
||||
|
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. |
|
#14
|
||||
|
||||
|
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 |
|
#15
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| air speed sensor for rc plane | Greg Needel | Technical Discussion | 19 | 07-10-2005 23:43 |
| Speed of banner sensor | Kashi Chan | Electrical | 7 | 06-03-2005 20:00 |
| PID control loops - closed loop feedback | KenWittlief | Technical Discussion | 56 | 26-04-2004 21:27 |
| Quick Optical Sensor Question | zorro | Technical Discussion | 10 | 21-01-2003 06:39 |
| What else do we want? | archiver | 2000 | 63 | 23-06-2002 23:19 |