Name |
---|
NodeMCU ESP8266 |
KY-018 |
White LED |
Jumper wires |
First Generate a step response for the system:
Ref: https://miscircuitos.com/plot-real-time-signal-coming-arduino/
We can model this setup as a 1st order with dead time (PT1-elemet + Time Shift),
Thus there are three important constants:
Gain K (Rise in Output Value by Rise in Input Value)
> K = (151-1003)/(1024-0) = -0.832
Time Constant Tau ( It takes 5 Tau to go from initial point to 90% steady state value.)
> Tau = 1003 - (1003-151)*0.9 = 236.2
> Tau = 20ms (from data)
> Tau = 4ms
Dead Time T = 0ms (from data)