I'm experimenting with PWM and LC filter and I think it works correctly when it comes to smoothing signal, but for some reason voltage on the output is not linear with duty cycle. I use 56uH inductor and 220uF capacitor (from 1 / (2 * PI * sqrt(L * C))
it's 1433Hz). The PWM signal has 20kHz frequency. Smoothing looks like that on the oscilloscope with 50mV/div:
The problem is that the voltage doesn't raise linearly with duty cycle. I use 5V output from arduino with a 1k resistor with an LED, which gives me a little less than 2V going through the LED. After connecting an inductor and a capacitor, the voltage on 100% duty cycle is still little less than 2V and it correctly drops to 0 for 0%. But what happens in between is unexpected. The voltage is almost maximum at about 33% duty cycle and changes only a little when going up to 100%.
Is it something normal? If that's correct, how do I calculate voltage based on duty cycle? If that's not expected, what should I look for in my circuit?
Here is a schematic:
And also an overview of how I connect it to arduino, just in case: