PWM frequency Max (imp002 and imp004)

Hello I am measuring soil moisture content (see attached drawing).

Currently I use capacitive sensing pulsing 20MHz into a lowpass filter with imp002
If I use higher frequency I get more reliable readings (less influenced by soil salinity)

A pulse of 70-80MHz would be optimal, but everything counts so:
How high frequency can I get from the fastest pulse/PWM pin on imp002 and imp004?

And how do I calculate if the pin can handle the load?

No one - Hugo? :slight_smile:

You’ve seen we’ve got a reference design for this, right? https://electricimp.com/docs/hardware/resources/reference-designs/flora/

Flora generates the PWM using an external oscillator rather than the imp itself.

The actual answer to your question, is that the imp’s PWM only changes state on transitions of the imp’s master 120MHz clock. So at 50% duty cycle, it will go up to 60MHz; at 33% duty cycle, up to 40MHz; at 10% duty cycle, up to 12MHz. Those of course are the digital limits: analogue considerations might mean it won’t actually work at those speeds.

For imp004 it’s not yet clear what the available frequency range is.

Peter