What I aim to do: To measure the frequency of an AC analog signal generated by an electrodynamic shaker, which has a peak voltage of 10V-- using an Arduino Uno.
What I have tried:
Tried using a circuit similar to an optocoupler (using a 2N2222) transistor to take pulse input, using the
pulsein() function. However the duration is always returning as 0.
- Is this method an acceptable way of measuring frequency?
- What could I be doing wrong such that the time duration is always returning 0?
- Is there an easier way of carrying out this work?
Will put up the code if asked for. However it is basically just defining a few variables (for pins, duration etc), and then using the