|
Re: Photosensor as encoder for bang bang.
Quote:
Originally Posted by Ether
To understand why, you have to do the math.
Using the "period" method, like Mark posted earlier in this thread, the FPGA samples the sensor at 153KHz and records the elapsed time between pulses with a 1MHz clock. For a one-per-rev sensor (like yours) on a wheel spinning at, say, 2000 rpm, that gives you a very accurate and hi resolution signal. See attachment.
The "count" method is very accurate for high speeds with high counts-per-rev sensors like a 360CP encoder. But for a one-per-rev sensor like yours, it's not very good. At a wheel speed of 2000 rpm and sampling every 20ms, you don't get enough counts to accurately determine what the speed is. Sometimes you'll get 1 count, and sometimes you'll get *no* counts. You can't convert that into a useable speed signal.
See attachment.
|
Do you have a good method to use the period method with desired rpm
__________________
Think Outside The Frame
|