Low frequency measurement


bas

Recommended Posts

I'd like to measure the speed of a bicycle wheel, with a magnet and a reed contact, using the labjack and DAQfactory.

The wheel has a frequency of about 2 Hz, and when I use a timing period of 2 sec, the count can be 2,3 or 4, which is not very accurate. (Increasing the timing period reduces the reaction speed)

So what I would like is to measure the time between 2 pulses (the time between two positive flanks)

This would increase the accuracy highly.

Any idea to realise this in DAQfactory ?

Link to comment
Share on other sites

You can gather the data you want much quicker by measuring the interval between the pulses (about one half second) and taking the recriprocal.

Eric

Link to comment
Share on other sites

Actually there is no way to read the precise time between counts on the counter with the LabJack. Other DAQ devices have this ability as a count-down timer, but the LabJack counter is just a pulse count counter. But there are other ways. The best way depends on the precision you need. If you need low precision (pulse measurement with 20ms), you can use the digital inputs and software polled reading. In DAQFactory just create a digital input channel and set the timing to something small (but not smaller than 0.02). If you are doing other things on the LabJack like A to D, remember that those take 20ms too (in groups of 4). Then you just have to detect the change of state. For this you can simply create a sequence that compares the most recent value to the previous value and if it goes from 0 to 1, then record the time. You can then assign this sequence to the channel so it gets called every time a new data point comes in.

The alternative for higher precision is to stream the A to D or IO lines and detect the pulse that way. This will get you much higher precision (1/1200 on one channel), but you'll have to scan the data yourself in a sequence.

For both of these, I'd suggest trying the beta of our next version of DAQFactory. It offers many more programming features in sequences to make scanning rather easy. If you are interested, email me at info@azeotech.com.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.