View Single Post
  #32   Spotlight this post!  
Unread 28-11-2014, 11:34
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,091
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Swerve questions (Languages, CAN)

Quote:
Originally Posted by bharrison6 View Post
Yes we want to decode it and use it rather than use analog because it will be more precise.
How did you determine that it will be more precise? e.g. Did you consider the tolerances in the encoder datasheet as well as the tolerances in the decoding methods?

Quote:
I think all I need to do is figure out how to read the duty cycle of the PWM input.
"all I need to do"... How do you plan to do that?

Quote:
Since you ask, do you know how to decode the [PWM] signal
I've heard the FPGA sampling frequency will be bumped up from ~153KHz (in 2014) to ~1MHz (in 2015). Maybe the FPGA will be programmed in 2015 to read duty cycle (detect and report consecutive rising-to-falling and falling-to-rising edge pairs). If so, you could decode the PWM quite accurately using that. Otherwise, you'd probably need to use high-priority interrupts to detect and time-stamp the edges. I don't know what the interrupt latency will be in the roboRIO with LinuxRT and WPILib and LabVIEW.

Quote:
just put a low-pass filter on it and run it as analog.
How much filtering would be required to reduce the analog noise to an acceptable level, and how much phase lag would that introduce?

Quote:
will using a pwm w/ low pass filter effect the quality of the analog signal vs just buying a regular analog absolute encoder?
My guess would be yes, but I haven't looked at it in depth.



Last edited by Ether : 28-11-2014 at 11:54.