I have been searching for 50K Digital POT but it seems to be costly 5-7$ + Shipping to India. I have idea how it would be if i use PWM based LED light and use LDR as Digital Resistor ? Can i use it ? any draw backs ?
Don't want to argue if it's very non-linear or just non-linear, but there also temperature dependency and a certain memory effect. So for higher accuracy requirements, a multi-channel LDR with a compensation element for feedback is strongly suggested.
You cant use caps to smooth your PWM signal , you will just peak detect. Use an RC circuit to give you the PWM -> DC.
50% duty cycle = 50% of peak PWM value. Should be a linear relationship.
LDR won't be linear , but you could always create a look-up table to translate PWM / resistance required.
Then why did you bring it up? I realize very non-linear is a none specific term but there certainly is a large difference between the slight non-linearity of, say a digital pot's output, and the larger non-linearity of a logarithmic type response which is characteristic of an LDR.