SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By tadpole
#148198
I want to measure the tension in a bicycle spoke. The frequency that a spokes vibrates is inversely proportional to the length and proportional to the square root of the tension per unit area it the stress in the spoke. Therefore if the resonant frequency is measured accurately the stress can be calculated directly and the tension then calculated by multiplying by the spokes area. The length and spoke area are known quantities. Spokes are resonant in the mid audio range 200 to 2000 Hz.

IF the frequency is measured with a 2 mg gate time variation and plus minus one count error at 1 KHz the total error is about 3000 parts per million - not very accurate. IF the period of one cycle is measured at an accuracy of 1 microsecond than the accuracy improves to about 1001 parts per million and could be increased by measuring the period for multiple cycles of the input signal - for example if you took the average period of 1000 input cycles at a 1 microsecond resolution the accuracy would approach several parts per million. I would like to have enough memory to display the spoke tension in physical units possible even correcting for spoke dimensions.

I am looking at DEV-11021 Arduino Uno-R3 or DEV-10140 Frequency Counter both with ATmega 328 cpu or the UBW32 with a PIC32 CPU. I believe that the PIC with 32 bit timers and the higher clock frequency would be the better choice but have not programmed any of the new chips. Which of these would give me sufficient resolution? What are your recommendations? Please explain your recommendation, i.e. cost, development tool available or?

Thanks
By AndyC_772
#148222
I'd consider using a smaller microcontroller to do the display, serial port or other UI, plus a small CPLD to actually do the timing. A device like an Altera Max II CPLD can count at about 200 MHz, and with a small amount of logic it could easily be made to count the period of (say) 10 complete cycles to that resolution. PIC32 timers will run at about 80 MHz IIRC.

I suspect the difficulty might be the analogue side, getting a clean, accurate signal to measure in the first place. Do you have a transducer in mind?
By Joeisi
#148227
The only issue with using a CPLD is the development time required with it. With a simple microcontroller, like the UBW32 module, built in is a 32 bit input capture module. Don't feel like doing the math to figure error and resolution. I'm sure that will do the job decently. And you have boatloads of computing power left over to do whatever your heart desires.
By fll-freak
#148281
AndyC_772 wrote:I suspect the difficulty might be the analogue side, getting a clean, accurate signal to measure in the first place.
Long long time ago I had this same problem. Needed to measure a sinwave period accurate to less than 500 nanoseconds of error. To get a nice edge to measure on the digital side, the analog signal was passed through a high speed comparator. The problem was that the dither on when the comparator would switch was way more than the 500 nsec. Had to scrap that design and start fresh with a different concept.