I want to calculate the slope of a 0-5 volt signal. This signal will move all through 0-5v. Is there a way to calculate the derivitive of this signal with a STAMP?
I did a post·entitled PID Control Intro with the BASIC Stamp·on the Stamps in Class forum a while back.· It has background on the derivative calculation.· You will also need an analog to digital converter (ADC).· If you do a search for ADC0831 on the Parallax site, you will find the product page and lots of resources on how to use it to measure voltage.
In the simplest form, you measure the voltage at two points in time, and then divide the difference in voltage by the interval. It is particularly easy if the samples are regular intervals, say once per second. Then it is just subtraction of the two voltages.
To be meaningful, the interval has to be short enough that the change in voltage is well approximated by a straight line between the two sample points.
Comments
To be meaningful, the interval has to be short enough that the change in voltage is well approximated by a straight line between the two sample points.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com