Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Speed Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=41679)

Nitroxextreme 12-01-2006 11:47

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

Mike 12-01-2006 12:24

Re: Speed Sensor
 
What about using a seperate board, and have it communicate to the IFI board via a serial connection?

Shu Song 12-01-2006 13:57

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.

Chriszuma 12-01-2006 13:58

Re: Speed Sensor
 
Quote:

What about using a seperate board, and have it communicate to the IFI board via a serial connection?
Well then you would lose your serial port. What you could do is get one of those fancy 360-degree position sensors (they run about $50 though), because it outputs analog voltages, looping back to zero when it gets to the top of its range. You could take the difference in position to get the speed. You would have to gear it down substantially though, since it would be mighty hard to detect limit resets when it's going half a turn every loop.

Tom Bottiglieri 12-01-2006 14:21

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:

Originally Posted by Chriszuma
Well then you would lose your serial port. What you could do is get one of those fancy 360-degree position sensors (they run about $50 though),

There is also a gyro included in the kit this year.

Alan Anderson 12-01-2006 14:41

Re: Speed Sensor
 
Quote:

Originally Posted by Nitroxextreme
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.

There are six general I/O pins on the Robot Controller which can cause interrupts. We used three encoders on our robot last year, and I know exactly how to modify the interrupt code to handle more. Just how many interrupting devices are you using, anyway?

fowlerm 12-01-2006 14:51

Re: Speed Sensor
 
Quote:

Originally Posted by Chriszuma
Well then you would lose your serial port.

There are two serial ports on the controller that you can use - the TTL level port (USART2) and the RS232 program port (USART1).

Alan Anderson 12-01-2006 15:07

Re: Speed Sensor
 
Quote:

Originally Posted by fowlerm
There are two serial ports on the controller that you can use - the TTL level port (USART2) and the RS232 program port (USART1).

The TTL port is likely to be unavailable for such a custom circuit, since it's the preferred way to communicate with the CMUcam.

kaszeta 12-01-2006 15:22

Re: Speed Sensor
 
Quote:

Originally Posted by Nitroxextreme
I considered encoders/gear teeth sensors but I'm out of interrupts.

Out of interrupts? How many are you using? Coming from someone whose team had 4 interrupts running at once last year, be very, very, careful.

lupjohn 12-01-2006 15:27

Re: Speed Sensor
 
Quote:

Originally Posted by Nitroxextreme
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

Hi all;
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.

Kevin Watson 12-01-2006 16:49

Re: Speed Sensor
 
Quote:

Originally Posted by Tom Bottiglieri
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...

Actually, I've got updated encoder code that can use any of the interrupts. The first two are just like last year's (optimized for velocity control) plus the upper four are optimized for position control, but can also be used for velocity control. I'll have it up after I finish some documentation.

-Kevin

Kingofl337 12-01-2006 17:44

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.

SoftwareBug2.0 12-01-2006 18:38

Re: Speed Sensor
 
Quote:

Originally Posted by Mike
What about using a seperate board, and have it communicate to the IFI board via a serial connection?

Do as Mike says, except have the external processor output a pwm signal which you then have another circuit change into analog, since that's what you're hoping for.

intellec7 12-01-2006 21:04

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?

Tatsu 12-01-2006 21:07

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


All times are GMT -5. The time now is 21:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi