Continue to Site

# analog differentiator vs digital

Status
Not open for further replies.

#### gary36

##### Full Member level 4
I simulated a analog RC diffrentiator for a ramp input and the output settles to value corresposnding to slope at 5RC time constant. But the same slope evaluated using micro controller would generate the requisite slope at RC time and not 5RC. Would that be wrong?

Hi,
But the same slope evaluated using micro controller would generate the requisite slope at RC time and not 5RC. Would that be wrong?
I guess the digital processing works well, but your assumption is wrong.
(since we don´t see: your analog circuit, code, your expectation, your digital results)

In the analog world you have
* volts
* and time

in the digital world
* volts are converted to binary code (LSBs) by the ADC. --> you need to know the conversion factor for LSB/Volt.
* time is given by the ADC sampling frequency. --> You need to know the sampling frequency. It needs to be meaningful, fixed and stable. (you may also work with sampling period time, which is 1/fs)

For high dV/dt you may simply use dV/dt = val(t) - val(t-1)

For low values you should consider to use dV/dt = (val(t) - val(t-n)) / n.
Where n should be 10 or higher. Maybe even 1000. But mind you need to use a ring buffer to store all the values.
This gives you less noisy and more smooth output.

Klaus

Hi KlausST

As you described, digital diffrentiator would predictably compute the slope within the dt period. Say a ramp sloping up at constant rate 1V/s, digital version would compute 1V/s. My question is what should be choice of RC for analog version such that the output stabilizes to 1V in 1 second(similar to digital)?

I simulated a analog RC diffrentiator for a ramp input and the output settles to value corresposnding to slope at 5RC time constant. But the same slope evaluated using micro controller would generate the requisite slope at RC time and not 5RC. Would that be wrong?
Did you consider the fact that such a simple RC circuir is NOT a "differentiator"? It is a passive highpass which has differentiating properties (90 deg phase shift for sinusoidal signals) only for frequencies far below the 3dB corner frequency.

Hi,

In post#2 I wrote that we don´t have enough information. This did not change.
Please give complet information.

Klaus

Status
Not open for further replies.