FreqCount library for Arduino DUE board

Status
Not open for further replies.

RTUYR816

New member
Hi everyone, I am working on a project about measuring high frequency of quartz crystal microbalance (QCM). I found an opensource for QCM, which is OpenQCM. They use FreqCount library comes from https://www.pjrc.com/teensy/td_libs_FreqCount.html. I have tried it, and it can work well on Arduino UNO and Mega2560 boards. However, I am trying to use it on Arduino DUE which is more accurate than UNO and Mega2560, but it does not work. I do not know why. Who can explain that? One more question, I find UNO and Mega2560 have the specific pin for frequency measurement input, 5 and 47, respectively. Who knows which specific pin for DUE frequency measurement if using the FreqCount library? I hope someone can give me a big favor.

Thank you so much

Dan
 
Who can explain that?

Well, I can, since I'm the author of FreqCount.

It simply doesn't support Arduino Due. FreqCount and FreqMeasure do have a thin abstraction layer to allow porting to other hardware. So far, nobody has done the work to create and test the timer definitions needed to make it work on Due. I an not planning to do that myself, but I'd be happy to merge the code if someone else does it.

Perhaps you should consider trying Teensy 3.2? It's slightly faster & more powerful than Arduino Due and it is very well supported by FreqCount.
 
Frequency

Well, I can, since I'm the author of FreqCount.

It simply doesn't support Arduino Due. FreqCount and FreqMeasure do have a thin abstraction layer to allow porting to other hardware. So far, nobody has done the work to create and test the timer definitions needed to make it work on Due. I an not planning to do that myself, but I'd be happy to merge the code if someone else does it.

Perhaps you should consider trying Teensy 3.2? It's slightly faster & more powerful than Arduino Due and it is very well supported by FreqCount.

Hi,
I am doing one project with freqcont with arduino UNO. I have problem with measuring frequency when is voltage (amplitude) lower than 4.5V. May you help me with library ? How could I rewrite or change it ? Is it possible to measure frequency with 2.5 V for example?
Thank you. :)
 
FreqCount requires the input to be a digital signal.

Whatever board you're using has its own requirements for digital signals, which are a function of the board's hardware, not FreqCount.

For help specific to Arduino's boards, you really should ask on the Arduino Forum.

https://forum.arduino.cc/
 
Basically, this is a potential problem with all MCUs, be their logic voltage 5V, 3.3V or 1.8V. If an input signal is too weak, one has to design an appropriate amplifier. The SN74LVC1404 can be used for that. It contains two unbuffered CMOS inverters which can amplify the signal up to 80 times, and a schmitt-trigger to clean the signal ramps. You'll need a 10nF input coupling capacitor from the signal input to pin3, a 1Meg bias resistor from pin2 to pin3, connect pins 7 and 6 together, connect pins 1 and 8 to +5V, connect pin4 to GND, and connect pin5 to the Arduino's freqcount input pin.
 
Help

Could you draw a schematic for me ? Because I am not sure how to connect SN74LVC1404 on Arduino. And what about the programming ?
Thank you.
 
I did draw the schematics with my words in a way that an experienced technician should be able to understand and to reproduce it, I think. Sorry if I haven’t been clear enough. I’m actually in Switzerland, teaching masterclasses for electronic music, which means that you would have to wait until Monday before I could do a drawing.
 
Ït will be great thanks. But I think that I did not specify my project.
I built this schematic (Colpitts osc.) for coin counter. Nnormal frequency is 210kHz (Ucc=12V, and amplitude is 5V) and when is coin detected (coin near to coil) frequency is changed for example on 234kHz but there is a problem that amplitude of signal decreases on 2.35V for example. So I can measure normal freq. 210kHz with Arduino UNO (its working really good) however when there is a coin I have serious problem with voltage of signal. Screenshot_1.png
I used this program for measuring freq.: https://www.pjrc.com/teensy/td_libs_FreqCount.html
So should I use another circuit or is there any possibility to solve it ? I am 17 y.o. student and I have no much experiences so I need help with this.
Thank you.
 
Status
Not open for further replies.
Back
Top