Does ADC in + PWM out = trouble?

The arduino can COUNT at up to 8MHz - which, since 10 bits a/d is 1000:1, is equivalent to sampling to 10 bits at 8kHz.. I repoint you at my schmidt idea..

aha ! ...... it's an EF91.

check specs at EF91 @ The Valve Museum

it's good to 200MHz ... bit overkill for 5k arduino analog sampling, but should give plenty of rattle at 8Mhz +

regards

Allan.