Skip to main content

Little help with PWM


MariaBailey

Hi !

I have been using pin 9 for PWM and require at least a range of  4 octaves .

I'm using a linear 100k pot to analog pin A0 to vary the frequency.

The ADC is 10 bit and has a resolution of 1024.

the results are as follows.

110hz = 0volts

220hz = 0.625volts

440hz = 1.25volts

880hz = 2.5volts

1760hz = 5volts.

That's as expected .

This is exponential and causes very small changes in the second half of the pots travel.

In short a PITA when trying to tune a lower  frequency.

This is more like hertz/volt.

Is there some way i can make the ADC deliver a 1volt/octave response?

Thanks for listening.

DesignSpark Electrical Logolinkedin