Hello everyone!
I’m trying to use the teensy 3.2 with PaulStoffregen’s library (https://github.com/PaulStoffregen/FreqCount) to count the number of partial discharges.

#include <FreqCount.h>
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 9, d5 = 8, d6 = 7, d7 = 6;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

unsigned long count = 0;
unsigned long prior_count=0;

void setup() {
  lcd.begin(16, 2);

void loop() {
  if (FreqCount.available()) {
    count = count + FreqCount.read();
    if (count != prior_count) {
      lcd.setCursor(0, 1);
      prior_count = count;
Example signal (frequency not higher than 300 kHz):

Click image for larger version. 

Name:	example.png 
Views:	53 
Size:	7.4 KB 
ID:	20114

The problem is, that the amplitude of the signal is very low (about 100-200 mV), so the Teensy doesn’t count it.

I want the teensy to count the signals in some kind of ‘intervals/periods’ (not longer than 0,02 s) in which counted will be only peaks with an amplitude more than the trigger (set on 100 mV for example). And if in this period the teensy find 1 or more peaks higher than a trigger level, it should mark is as a ‘positive’ and add one to the counted pulses.

It is possible to do it with this library?