How do you measure the duty cycle of sinus with a arduino uno?

My school project is to measure the frequency output from a buzzer. The manufacture from this buzzer is PUI Audio inc with the type number AI-2604-TT-R. The minimal frequency output specification is 400Hz(+-100Hz) that is located in the datasheet from the buzzer.
Link datasheet: http://datasheet.octopart.com/AI-2604-TT-R-PUI-Audio-datasheet-17019779.pdf

Iam using a microphone to record the sound signals from the buzzer. I am using a pre amplifier circuit to amplify the out coming signal. This signal is the input for the ardruino(Analog input).

Kind Regards,
Dennis

Unkown21:
My school project is to measure the frequency output from a buzzer.

That sounds fun.

What have you done so far?

Unkown21:
My problem what I have got at this moment is I dont know how to write te c code for the software for the arduino uno.

Start here: http://arduino.cc/en/Tutorial/HomePage

Do you mean sine wave? A sine wave, by its nature, is 50/50 duty cycle.

polymorph:
Do you mean sine wave? A sine wave, by its nature, is 50/50 duty cycle.

Yes, but the first line of his post says: "My school project is to measure the frequency output from a buzzer."

A buzzer will produce a complex waveform with a lot of harmonics in it , which will make it difficult to measure
unless you filter out all the harmonics and just leave the fundamental, which will be a sine wave and easy to measure.

His subject line says different, that is what I was answering. If the subject line is inaccurate, it should be changed.

As mauried says, the electrical signal will be a very complex signal. If the original poster wants to measure the duty cycle of -that- waveform, that is a different matter.

Unkown21:
My school project is to measure the frequency output from a buzzer. The manufacture from this buzzer is PUI Audio inc with the type number AI-2604-TT-R. The minimal frequency output specification is 400Hz(+-100Hz) that is located in the datasheet from the buzzer.
Link datasheet: http://datasheet.octopart.com/AI-2604-TT-R-PUI-Audio-datasheet-17019779.pdf

Iam using a microphone to record the sound signals from the buzzer. I am using a pre amplifier circuit to amplify the out coming signal. This signal is the input for the ardruino(Analog input).

Kind Regards,
Dennis

A sinusoidal waveform has a 50% duty cycle.

To measure frequency or duty cycle of other waveforms, look for the zero crossings and measure the time.

Sinus waves are not to be sniffed at.

On the other hand sin waves can be measured. But as has been pointed out they have a 50% duty cycle.
A duty cycle is the ratio of on to off time which in a sin wave can be considered as the positive and negative parts of the cycle.

However a quick google of the term
arduino frequency measurement
gives plenty of examples.

Do you have to use an arduino for this, its not entirley clear from the op.

Grumpy_Mike:
Sinus waves are not to be sniffed at.

My first thought upon seeing the thread title was "heart monitor".