Shop OBEX P1 Docs P2 Docs Learn Events
Derivitive Math Function — Parallax Forums

Derivitive Math Function

TGTG Posts: 36
edited 2005-07-26 07:47 in BASIC Stamp
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?

Comments

  • edited 2005-07-25 08:16
    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.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2005-07-26 07:47
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.