Frequency counter IC

Thread Starter

JCL24

Joined Dec 12, 2019
13
Hi

I want to build some hardware to measure the output of an RPM sensor. The RPM sensor generates 60 pulses per rotation making it too fast for my current system to count the individual pulses with a GPIO (it has to do a bunch of other stuff too). So I am looking for a solution to measure the frequency of the pulses from the sensor with some circuit or IC and periodically read in the results from my MCU.

Can anyone recommend an IC or a simple circuit that can constantly measure the frequency of the pulses and make result available over some form of digital communication (I2C, SPI, UART)?
 

LowQCab

Joined Nov 6, 2012
3,580
Do You want a variable Voltage-Output, or a Digital-Output ?,
What type of Input-Sensor would You like to use, and why ?
.
.
.
 

BobTPH

Joined Jun 5, 2013
8,092
What micro are you using? PICs can run an internal counter from an external signal up in the MHz region. Others likely have a similar feature.
 

Thread Starter

JCL24

Joined Dec 12, 2019
13
Thank you for all your feedback. To answer some of your questions:
1. Do You want a variable Voltage-Output, or a Digital-Output? I want a digital output, as I did mention.
2. What type of Input-Sensor would You like to use, and why? I am using an exiting sensor on a machine which outputs 60 5V pulses per rotation. I cannot change it.
3. What micro are you using? Not really a micro to be honest. I am using a NVidia Jetson Orin Nano. And I cannot change it since I need it for a bunch of other functions of the system. Based on my experience with it, I don't think I can achieve a fast enough loop time to detect each pulse while running all the other code I am at the moment. I guess I could use a PIC as well and have it talk to the jetson, but that adds a layer of complexity that I wish to avoid.

Thanks for the suggestions Mr Chips. The ICM7216 looks promising, but it looks like I will need multiple GPIO's to read the output and I do not have enough available GPIO's left. I guess I could add an 12C IO expander to read the output, but that will also add complexity.

I would just like the simplest solution to reliably measure the frequency and communicate it digitally. Preferable without having to rely on sub millisecond pulse detection directly from the Jetson since I believe that would be hard to reliably maintain even if it is possible. I would appreciate it if any of you have some more suggestions.
 

BobTPH

Joined Jun 5, 2013
8,092
So, not a micro, more like a super-computer.

I cannot believe it does not have the capability of running a hardware counter other than a program loop, but I am not going to research it.

The simplest hardware add-on would be a PIC or other 8–bit micro connecting via UART. Just an 8-pin chip, and one capacitor.
 

LesJones

Joined Jan 8, 2017
4,106
I agree with Bob that adding an 8 bit pic would be a simple solution. It would use an internal 16 bit counter to count input pulses and an 8 bit counter to time the reading of the counter. If you wanted better accuracy than the intenal clock on the PIC you could us external crystal (For this you would probably require a PIC with more than 8 pins. Using the internal USART on the PIC would output the RPM reading either as a few bytes of binary data or in the form of an ASCII character string. I did something similar about 10 years ago using a PIC16F628A.

Les.
 
Last edited:

Thread Starter

JCL24

Joined Dec 12, 2019
13
Thanks for your feedback. It would have been nice if there was a solution where I did not have to program an MCU, but that seems to be the best option. Thanks all.
 
You can configure almost any pin on low-end PIC microcontrollers to trigger an interrupt sub-routine when the voltage changes ex. from digital low to digital high. Implementing a 3kHz counter would be trivial, you'd only need to setup an interupt sub-routine to increment a variable on full rotation, and a timer sub-routine to clear it every second or minute.

I did something similar when I had to decode a NEC signal from an IR remote controller, it's pretty reliable.
 

AnalogKid

Joined Aug 1, 2013
10,778
The ICM7216 looks promising, but it looks like I will need multiple GPIO's to read the output and I do not have enough available GPIO's left. I guess I could add an 12C IO expander to read the output, but that will also add complexity.
Let's get back to "digital I/O". What do you mean by that? On my first read, I thought you meant a display. If so, there are many modules to do this on ebay.

Or are you talking about a device or circuit that has a serial I/O structure, such as an I2C or SPI port? Please clarify how many digits of total value, resolution, update or readout rate, etc.

ak
 
Top