2 Replies Latest reply on Nov 9, 2017 5:40 AM by curr93

# Counting the number of pulses per precise time interval on BeagleBone Black

Dear colleagues,

I'm newcomer in BBB hardware "technology" and I'd like to know is it possible to implement on this device - counting the number of pulses (from any discrete input) for an predetermined time interval, for example 10...50 milliseconds ?

In other words I want to create simple frequency counter in the range of 10...90 KHz (rectangular pulses).

Is it possible to estimate in advance how accurate the frequency measurement will be? And will there be enough resources of BeagleBone Black?

• ###### Re: Counting the number of pulses per precise time interval on BeagleBone Black

All possible, with the BeagleBone and pretty much any decent micro controller.

However, "rectangular" doesn't tell us anything for a pulse, it says that the mark space ratio is not 1:1 (because that's a square pulse" but it doesn't hint if its 1:1000 or 1: 1.0001.

Counting 10kHz pulses in a 10 ms period won't ever be very accurate - there will obviously be a not quite 1% uncertainty.

So sometimes its better to go the other way and measure the time that 100 pulses occupy if you have a 100MHz clock (quite feasible on some micros - don't know for the BBB) you can estimate the time for 100 10kHz pulses to within 1 part in 10,000 which is way better than counting pulses in 10ms.

I've made systems that count both ways and choose dynamically which will give the best answer.

MK

• ###### Re: Counting the number of pulses per precise time interval on BeagleBone Black

I agree with you - your measurement time way is better. Now I just need to understand how to programmatically implement at least on 10 MHz measurement of the time of the incoming one hundred pulses.