I wanted to simulate an LDR and a specific case where I have a bright LED using PWM.
This is the schematic:
I was changing the resistor as stated here which comes from a previous discussion stackexchange link.
However, this is not producing the same results as show in the first link:
As you can see in the picture there is no linear relationship between the voltage in the pulse and the resistance value (282V doesn't correspond to 282 ohms,etc...) and the resistance value doesn't stay on despite the pulse showing a correct form.
I am trying to simulate the voltage between the capacitor.
Is there any other way to do this? I know about the method of putting the expression on resistor value but as it is a pulse it quite difficult to do this.