Ephemeral Test Equipment

An ESP32 linked with a PC over WiFi to create unique Ephemeral Test Equipment.
Software on a PC or Laptop (Later Cellphone or tablet) interacting, over WiFi (or Bluetooth), with firmware in the module and either temporary external circuitry or prebuilt modules to perform a specific test and then dismantled until needed again for some other purpose.
Possible measurements include simple multimeter functions like voltage, current, resistance, to frequency counting and duty cycle measurements. More sophisticated testing would include transient functions (how fast can something react), transfer functions (just where does a Schmitt trigger switch), and curve tracing (D2A generating voltages and A2D measuring currents through a transistor) all the way up to what I've nicknamed "Slow-scilloscope" functions.
The software on the PC can save data in various formats, do further processing such as FFT or THD computations and render graphs in formats suitable for publication.
In addition long term measurements can be performed; Perhaps waiting for that elusive glitch that rarely happens, or measuring the performance of a solar power circuit throughout the day (and night).
Possible measurements include simple multimeter functions like voltage, current, resistance, to frequency counting and duty cycle measurements. More sophisticated testing would include transient functions (how fast can something react), transfer functions (just where does a Schmitt trigger switch), and curve tracing (D2A generating voltages and A2D measuring currents through a transistor) all the way up to what I've nicknamed "Slow-scilloscope" functions.
The software on the PC can save data in various formats, do further processing such as FFT or THD computations and render graphs in formats suitable for publication.
In addition long term measurements can be performed; Perhaps waiting for that elusive glitch that rarely happens, or measuring the performance of a solar power circuit throughout the day (and night).
Updates van de auteur
Jim Brannan 7 jaar geleden
Floating instruments (Voltmeter and Frequency Meter) can be opened multiple times and configured to watch various inputs.
Larger instruments can be opened in the main window, only one at a time because they share resources.
Various examples and their output have been added as comments. I hope that doesn't confuse things.
Though the project is not complete, it must be declared done. But in reality a project like this will never really be complete as it will change when more interesting situations present themselves.
I'm not accustomed to having such a powerful module; With the Arduino one usually has to push the computations elsewhere. As I went on I found I could make the ESP32 do more and I suspect that even more of what I've done in Java can be pushed down into the ESP32.
I welcome this module into my collection of microcontrollers.
-- End --
Updated ZIP file with the entire project. (2315kb)
A floating instrument that shows both frequency and duty cycle from a capture channel. (2kb)
Jim Brannan 7 jaar geleden
This example uses an op-amp to increase the current available to test and compare two different LEDs; One red (red line) and one white (black line). Note that DAC.1 drives both op-amps (dual package). In this case the op-amps are just set up as a voltage followers but if wider voltages are needed gain can also be provided.
The blue line shows the relationship between the DAC voltage and each op-amp's output; Solid for the red LED's and dashed for the white one's.
This particular op-amp, LM358, has an output limit of between 1.5V and 2V below it's Vcc. Note also that USB is providing the nominal 5V supply which according to spec can be as low as 4.5V. In this case the op-amps' Vcc is around 4.6V accounting for the leveling off of the blue line. The red LED is drawing more current than the white one so it's op-amp (solid) flattens out sooner than the white one's (dashed).
I have run this with a larger Vcc, but I thought it was more interesting to see the op-amps flatten out than to see higher LED currents.
This instrument averages the results over time so the longer you wait the smoother the curves become.
Voltage vs Current curve for two LEDs. (36kb)
Jim Brannan 7 jaar geleden
This example uses capture events to measure and graph the bounce of a push button; Both when pressed and released.
I had been setting up the capture unit to watch for both edges with one channel and having a bit of computation expressed in the interrupt so that each packet sent contained enough information to determine both the frequency and duty cycle of the waveform.
With this test I learned that that is not always a good idea. A bounce is a brief thing and both edges can occur quite close together. When one channel watches for both edges the interrupt has less time to respond and capture the value. In this test I split the edges between two channels and trimmed down the interrupt to allow the most time to capture data.
One of many captures showing how a button bounces. (27kb)
Jim Brannan 7 jaar geleden
Also illustrated is a white LED serving as a down shifter to 3.3V logic levels.
Two graphs are shown one with the timer at 5V (actually USB provided only about 4.6V) and the other with 9V; The thresholds and output values varied by only a few tenths of volts.
Showing the Hysteresis and output when powered by a nominal 5V (29kb)
Hysteresis and output when powered by a 9V battery (31kb)
Jim Brannan 7 jaar geleden
A 555 timer in astable mode can have it's frequency set with a voltage on the control pin.
Since the discharge phase (low time in orange) is always down to half the voltage it always takes the same time, regardless of control voltage.
The knee in the high time (green) at around 2.2V is interesting, but I have not been able to explain it. My suspicion is that the 555 timer has some junction that is getting forward biased at low control voltages.
Slow-cilloscope was also used to view the charging/discharging of the capacitor. It currently samples around 36.7 k samples/sec. Red dots are actual values with a black line drawn throught them and the green line is the 555's output as sampled through a GPIO pin.
Graph of high, low times and frequency and duty cycle (51kb)
Charge/discharge of capacitor and output pin (35kb)
Jim Brannan 7 jaar geleden
DAC.2 is used to establish a (more or less) constant current on the base while DAC.1 generates a triangle wave for creating a voltage vs current graph of the collector.
Alas the op-amp that I am using has a limit of around 20mA which is a bit small for the collector. If there were time I'd add an emitter follower for a major increase in output current. As it stands because of the gain in the subject transistor I had to reduce the base current to quite small values which were overwhelmed by the overall system noise ultimately requiring longer averaging runs to get clean graphs. Yes just to see what it would look like, this graph was created in more than 6 and a half hours.
The somewhat straight horizontal lines show the base current as measured across sense resistor R2 as DAC.1 sweeps over the range of 0 to 3.3V. A definite rework of the software that attempts to keep the current constant is indicated.
The other curves show the voltage vs current of the collector for each individual base current. It it interesting that even though we are talking about extremity tiny base currents, the collector graphs are the familiar shape.
This is my last instrument and timne has just run out so it will have to stay as it is.
Collector voltage vs current at variious low base currents (62kb)