Exponential decay is very important, so is good to study it thoroughly. As you do not want to do a short-cut, you will need a resistor to charge and discharge a capacitor. At first, let us start using a
Capacitor with a Fixed ValueThe good news is there are internal resistors installed in all analogue inputs, and they can be misused for measuring, you do not need to add an external one. The value of this resistor can be obtained by executing pinMode(A0, INPUT_PULLUP) and connecting an ammeter to A0 and Ground. Mine told me 0.13 mA, so the resistance is 38.5 kOhms. The software attached to this article gives you two ways to study the decay: the Serial Plotter of the Arduino IDE and a TFT display connected to the Arduino. If you do not have that TFT display, you can still use the software and only watch the output on the Serial plotter.
As you probably will know, the exponential function can be converted to a linear one using the log function. The result is shown below.
In order to minimize external hardware, only two buttons were attached: one button to choose different delays between taking samples, and another one to toggle between the linear and exponential diagram. A small circuit board inserted to pin-0 to pin-7 can hold them.
Any capacitors above 1 nF can be used. Connect one leg to A0 and the other to any of A1 to A5, they all are GROUND, depending on the form of your capacitor. For electrolytic capacitors connect the positive to A0. Make sure they are discharged before inserting them.
One inaccuracy must be told: the software actually performs a kind of short-cut and then starts charging the capacitor which is just the inverse of discharging. The values have to be subtracted from the maximum value given by the ADC. Now let us use a
Variable Capacitor and take a close look at its characteristics.Added 18.02.2024
For many decades, variable capacitors were used to tune transmitters and receivers.
As can be seen, it must be extremely difficult to produce the mechanical parts of such a capacitor. That is why such devices had been replaced by other means wherever possible. When used, its voltage is performing a sinusoidal waveform in the range of about 1 MHz. That is slightly too fast to look at. As you probably expected, we are using an ARDUINO UNO R3 to observe what is going on. So the ARDUINO will perform charging and discharging of the capacitor, and continuously register the voltage.
As there is no inductor, the result will be a differential equation of first order, and the solution will be an exponential function rather that a sine function.
For educational purposes two versions had been developed:
The second one with the transparent case was designed for the use with students who do not care touching everything. As a simple replacement for a scope, a 1.8" TFT LCD was used. The software provided offers these options:
- display schematics
- charging - discharging
- discharging - charging
- continuously up and down
- calculation of the properties
Advancing the options is done by pressing the RESET button.
Comments