Reading PWM Pulses...

Can you read the pulses from another controllers PWM signal, and calculate the frequency, of the modulation, or the an average pulse width? I want to try to read another known good PWM motor, while running, and read the pulse frequency. I know it will be variable, but, there should be a way to average that. That is what I am looking for actually. The average pulse width. It's easy to configure the high and low, after that.

Thanks Ya'll...

Taz...

Use the microcontroller to read the pin controlling the motor looking for the high and low transitions. Look at the "State Change Example" with the IDE. Only instead of counting button presses, you want to know how long these pulses are. So take the value of micros at the start and end of each pulse and you got it.

I would recommend either the FreqCount or FreqMeasure libraries.

https://www.pjrc.com/teensy/td_libs_FreqCount.html

https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

t least enough where I may be able to figure it out without TOO much stress!! lol!!! Naw... I love a challenge. I appreciate anyone's input. The more you tell me, the faster I learn... FUN!!!

THANK YOU!!!!

Taz...