How do you mesure time???
krazyideas
Posts: 119
Hello
I want to mesure time. How would you do that?
Would you or could you get the clock count when a pin went high and then get it again when it went low and subtract them to get how many clock cycles passed??
And if you need really accurate measurements from something spinning mechanicly, would it be better to find a decoder wheel with perfectly cut marks and then use light shows, or use hall effects or what?? How would you measure the RPM and what could you use??
any help would be very appreciated, cuz I don't have much of an idea
Thanks
I want to mesure time. How would you do that?
Would you or could you get the clock count when a pin went high and then get it again when it went low and subtract them to get how many clock cycles passed??
And if you need really accurate measurements from something spinning mechanicly, would it be better to find a decoder wheel with perfectly cut marks and then use light shows, or use hall effects or what?? How would you measure the RPM and what could you use??
any help would be very appreciated, cuz I don't have much of an idea
Thanks
Comments
Reprap foundation sell kits of these that should be reasonably easy to interface to the propeller (I have 3 but need to build them) or Austria Microsystems may still allow you to order 3 free from their website as samples.
At least this is how I intend to measure rotation in my project!
Cheers
Keith
Other options include projecting an infra-red beam at a piece of reflective tape stuck to the rotating object. There are sensors that are great for this, such as the OPB700TX http://www.optekinc.com/datasheets/OPB700TX.pdf
In your original post, you mentioned measuring time as well as measuring RPM. Measuring the CNT at the start of the condition and again at the end of the condition will give you a pulse duration. That doesn't directly give you RPM though. For RPM, consider measuring the time between the start of each pulse. Divide 1 second (in clock cycles) by this interval between pulses (in clock cycles) and multiply by 60 to get RPM. You can determine RPM after just two pulses this way. And then update the RPM every pulse afterwards. You could build a counter to count the number of pulses in a certain amount of time, but that will give you a slower update rate.
Joel-