Pages: [1]   Go Down
Author Topic: Frequency measurement of a low voltage AC sine wave  (Read 1438 times)
0 Members and 1 Guest are viewing this topic.
Upstate NY
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



I need to measure the frequency  of a low voltage AC sine wave:

the voltage varies from ~ 50mv to a couple volts  (magnet spinning in a coil)

the maximum frequency is only a few hundred Hz

microcontroller input pins only change states at 1/2 of VCC and won't sense any waves under 1.65v

(if VCC is 3.3v)

thanks

rh

Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Was there a question in here?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Texas, land of the free, home of the stupid
Offline Offline
Sr. Member
****
Karma: 5
Posts: 268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe something like: feed it to a low voltage rail to tail op amp to amplify/clip the signal at the rail voltage (preferably something like 3-5 VDC), then peak it with a diode to ground, feed that to a comparator and count the comparator's transistions with your arduino?

Was there a question, or an answer, in there somewhere?
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1405
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like your input is configured as a Digin, suggest you set input status to analogue then look for time intervals between maximum and minimum to calculate frequency

Bear in mind that input resolution is 1024 so at best your minimum signal resolution will be 5mV
Logged

Texas, land of the free, home of the stupid
Offline Offline
Sr. Member
****
Karma: 5
Posts: 268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Jackie, me boy, you make life too simple......

My compliments on an elegant reduction of the solution.
Logged

Upstate NY
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



thanks

I'll try the ADC


rh
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will have a much better chance of success if you wire the sensor output to a op-amp type comparator circuit and then wire to a arduino as a digital input signal. You can then use standard frequency measuring software methods of which there are several avalible depending on the maximum frequency and your resolution requirements. Trying to measure the frequency using the analogRead() function is fraught with peril.

Lefty
Logged

Upstate NY
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



lefty,

could you point me to a suitable circuit or a specific op amp ?

can I use a 741 ?

if so, how do I set the low(<50mv) reference voltage for the comparator ?

can I use a pull down resistor to ground ?

the programming aspect I can handle, but I'm a noob at the electronics

thanks

rh
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



lefty,

could you point me to a suitable circuit or a specific op amp ?

can I use a 741 ?

No, that's a hopelessly outdate general purpose op-amp. A popular comparitor is a LM339 chip.

if so, how do I set the low(<50mv) reference voltage for the comparator ?

No need for a reference really, just wire it as a zero crossing detector with the - input grounded and the + input wired to one side of your magnetic pickup and ground the other side of the pick-up

can I use a pull down resistor to ground ?

Not needed, but sometimes comparitors have a high resistance feedback from output to input to add a little hystrisis to the circuit to deal when there is a zero rpm condition and you don't want false pules due to circuit or wiring noise. Best to read the datasheet and get ideas for best solutions and methods.

http://www.ti.com/lit/ds/symlink/lm339-n.pdf

Lefty


the programming aspect I can handle, but I'm a noob at the electronics

thanks

rh
Logged

0
Online Online
Shannon Member
****
Karma: 222
Posts: 12737
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to re-iterate the comment on the 741.  This was state of the art in 1967 or so.  It wants a supply of +/-10V or more to perform, and it performs poorly by today's standards.  It is only sold as replacement parts for existing circuits, it is not the right choice for new designs!

For low voltage circuits a "single supply rail", "rail to rail" op amp is the requirement.

Here a comparator is appropriate because we are detecting one voltage passing another.  An opamp normally has both its inputs at the same voltage in a negative feedback configuration.  A comparator has its input voltages different (most of the time!) and uses positive feedback to provide some hysteresis.  Its output is a logic signal, not a linear voltage.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: