Below is yet another signal input program written in C and GTK, shown with test data:
Here is the numerical output: daq001.log
Next is a plot of the signal derivative (in volts/second) for the first channel (yellow) above.
The different colors correspond to 10 different "frames" (plots) of data. Note that the
derivative is greatest (both plus and minus) near the middle of the signal range, and it goes to zero
at the minimum and maximum voltage values, as is the case with sinusoidal signals:
One of the simplest physical circuits of any interest is a binary oscillator made from a resistor, capacitor, and an inverting
schmitt trigger. The latter is a kind of comparator that takes a
real valued input (from 0-5 V) and produces a binary output (either 5 V or 0 V), and thus acts as a signal rectifier and
By connecting the output to the input, the output will bounce back and forth between 0 and 5 volts:
This circuit is implemented on a breadboard and uses a microcontroller (Sparkfun Redboard AVR) to acquire the signals from
the input and output and send them to the computer:
A plot of the input (yellow) and output (orange) shows the capacitor charging and discharging and the binary nature of the
Numerical output: daq002.log
Here is a plot of the derivative vs. input voltage of this circuit:
Note that the derivative is greatest positive when the capacitor begins to charge up, and greatest negative when the capacitor begins to discharge down. The banding is caused by the integer nature of the microcontroller analog inputs, which go from 0 to 1023 in whole units. Rather than a continuous range of slopes, only a limited number of combinations are possible with integers.
This circuit performs a similar function as the software accumulate-and-threshold component shown last time. However, there are some notable differences between the software and this hardware implementation:
Nevertheless, this circuit provides a simple physical approximation of the software accumulate-and-threshold component (without the pulse trigger). And, as will be shown below, it is fairly easy to modify the software to take these differences into account. My guess is that the exact details of the circuit are not too important to the resulting range of computations, as long as the basic operation is similar.
The frequency of oscillation can be changed by changing the value of the resistor or capacitor. Here is a plot of the input
and output for R = 55 K ohms:
Numerical output: daq003.log
A plot of the derivative vs. input voltage looks similar to that above, with the constant of proportionality being different
(note the different y axis max and min values):
Here is a plot of the input
and output for R = 27.5 K ohms:
Numerical output: daq004.log
A plot of the derivative vs. input voltage:
Next time: 2-threshold inverter (software).