Electronic – Counting DC power pulses per minute

dcfrequencyfrequency-measurementpower

I need to implement a frequency counter (pulses per minute) of a DC circuit that goes up to 20 volts. A little background, I am building a linear power supply 0-20 volts, 0-3 amps for my relative who is a tattoo artist. He wants me to help him build the supply but he has the need to know what frequency the tattoo machine (just a basic doorbell circuit) is operating at. His specialty tattoo machine power supply has this feature and I guess it's helpful for something.

I have found several schematics for DIY frequency counters, I really like the Weeder Tech auto-ranging unit but I cannot figure out a reliable way to interface one with a DC power supply. I have looked into preamp circuits for low voltage signals, but that still presents a question about feeding it up to 20 volts. I am quite certain the full 20 volts will fry the IC's, and honestly I am uncertain if it'll even measure DC pulses because of the capacitors in the signal path of the frequency counter. I have looked into Hall effect current sensors, Zener diodes, voltage dividers and all of that, but I'm lost as to how to simply count how many times a second the circuit is closed by the machine and providing current. I just need a low cost reliable way of making a 0-20 volt DC circuit a logic level signal. Even if it was as simple as an IC or op amp that would go high when any current is flowing, that would seem perfect.

I know this is a rather odd request as usually only AC is interesting frequency wise, but really appreciate any help in finding a solution to this one.

Best Answer

Maxim has an app note showing how to use their high-side current sensor parts. They also show a basic op-amp circuit as the "traditional" way to do this measurement, and this is probably good enough for your application:

Current monitor circuit

The output from this circuit could be run to a comparator to generate a digital '1' whenever the pulse is "on" and a '0' when the pulse is off. Some low-pass filtering may be required between the sensor circuit and the comparator if there is bounce or noise during the on and off transitions of the current pulse.

Then you have some choices.

In a simple digital logic solution, using probably a fairly modest CPLD, the digital pulse could clock a counter. The size (number of bits) of the counter depends on the maximum frequency you want to measure. A clock circuit would be needed to generate a pulse every 7.5 seconds. The 7.5-second pulse would be used to latch the counter output into a second register, while simultaneously resetting the counter. Some additional refinement would be desirable to avoid latching the counter output while it is the middle of rippling up the result of a newly arrived pulse from the comparator. The latched register, multiplied by 8 (left shifted by 3) would give the pulses-per-minute in the previous 7.5 second interval.

The digital pulse could be input to a microcontroller to count pulses and output how many pulses were seen in the past 7.5 seconds (multiplied by 8 to get pulses per minute). Or, count how many seconds are needed before you receive maybe 10 pulses from the comparator. The micro is more flexible than the CPLD in terms of letting you vary the counting interval depending on the actual frequency, averaging over multiple periods to get a smoother display, being able to change the units of the display, etc., etc.

How you display the output is up to you.