Hi,
I was wondering what is the "best" way to measure duty cycle from a 100 Hz signal. The signal is square wave and the peak voltage varies between 12 and 15 volts. The duty cycle varies between 0 - 100 %.
My first thought was to use a simple voltage divider with 5M ohm and 10M ohm resistors and pulseIn() funtion but is there a smarter way? Using a compator etc?
For the accuracy my goal is to keep the error at +-1.