Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

problem with duty cycle measurment

Status
Not open for further replies.
Hi. This will measure frequency from 10 Hz to 100 kHz, but won't tell you directly what the duty cycle is. The duty cycle is the percentage of time the signal is high out of the total signal. I imagine this meter is measuring the time from one edge, rising or falling, to the next. This is called the period. The frequency is then found by calculating the reciprocal of the period, that is, freq=1/period. If you know that you programmed the PWM for 50% duty cycle, and the meter reads 10 Hertz (it's low end of the frequency range) then the LED should be flashing five times a second. If you THINK you programmed it for 50% and it's actually one percent, you're not going to see any blinking. This meter is not going to help you in this respect - DIRECTLY. However, you can get a running idea if you put the meter in DC Volts range and see what the reading is. If the frequency is less than a 100 Hz (I'm guessing here) then you'll see the AVERAGE voltage of the signal. This should give you an indication of the duty cycle. If the frequency says 10 Hz, for instance, and the Volts reading is 2.5 Volts AT THE PIN driving the LED (NOT THE LED) then it's PROBABLY 50% duty cycle. For this to work, you will want to set the frequency for the LED blink within the range of the meter, and have the meter volts setting at a range just above the chip's Vcc.

Then again, you can just go online and Google for "sound card oscilloscope". There are a few programs out there that will let you use the PC's audio input to the sound card to study small, slow signals. Say, one Volt pk-pk, up to 20 kHz. This should be plenty fast enough for what you want to do. These sites will//should tell you how to step the signal down to a safe level, and how to make a probe to connect between the pin and the audio connector.

And try turning the LED around first on the chance it is in backwards!

Later!
kenjj
 
hmm... kjennejohn it seems i don't get what you're trying to say...

the multimeter i'm using has Hz/DUTY button. I'm selecting "duty" and
i'm putting the first probe on the output pin of the microcontroller (before the resistor for the led) and the other to the (-) of my power supply and i don't get any reading... the same happens even if i choose "Hz" (the led blinks about 2 times per second)

few minutes ago i tried to measure the output of a 220V/12V transformer and i got surprized because i could measure 49.93Hz and 49.8% duty.

what's going on?
 
the led blinks about 2 times per second
As kjennejohn pointed out, your meter will only read frequencies (and their duty cycles) between 10Hz and 100kHz. Your LED is blinking at 2Hz so your meter won't work. Try flashing the LED at 15 times a second and see if the meter will read it then.
 
kjennejohn said:
If you know that you programmed the PWM for 50% duty cycle, and the meter reads 10 Hertz (it's low end of the frequency range) then the LED should be flashing five times a second.

No! It should be flashing 10 times per second. 10Hz also means 10 full cycles!
 
whiz115 said:
few minutes ago i tried to measure the output of a 220V/12V transformer and i got surprized because i could measure 49.93Hz and 49.8% duty.

what's going on?
The mains isn't a perfect sinewave and your meter won't be that accurate so it's not surprising you got less than 50% duty cycle.
 
still i can't measure duty cycle with my multimeter.

here's what my microcontroller outputs to a software oscilloscope connected with a sound card..

help :rolleyes:
 

Attachments

  • scope.jpg
    scope.jpg
    76.7 KB · Views: 289
ok so.. from the above what i understand? that i can't measure duty cycle and Hz on a circuit which outputs square wave like the case with the microcontroller i'm using?
 
If you can increase the frequency of the square wave without changing the duty cycle... bump up the frequency to one your meter can measure.

If or not you can change the freq without changing the duty cycle depends on the software used to generate it.

Bills suggestion will work in any case.
 
3v0 said:
If you can increase the frequency of the square wave without changing the duty cycle... bump up the frequency to one your meter can measure.

If or not you can change the freq without changing the duty cycle depends on the software used to generate it.

Bills suggestion will work in any case.

yes.i'll have in mind what blueroomelectronics said...

but... about my multimeter how high i should raise the frequency so it can measure it? it is already high enough...this is rediculous! :mad:
 
whiz115 said:
yes.i'll have in mind what blueroomelectronics said...

but... about my multimeter how high i should raise the frequency so it can measure it? it is already high enough...this is rediculous! :mad:

Your meter spec say 10Hz is the low end of it's frequency counter, so at least 10Hz.
The simulator has no such limitation.
 
few posts above i have uploaded a photo... isn't that well over 10Hz?

i guess that the multimeter should be able to measure that frequency and also show duty cycle... but maybe i'm making something wrong? the user's manual says:

Remarks.

* The inputed voltage is sine wave.
* When 10-Hz~10Khz: >1V rms
* When 10Khz!100Khz: >30V rms
 
at first i didn't knew that i can do like you said...

it's just dissapointment that for some reason my multimeter can't measure such things. One reason i bought it is to do such things.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top