1 Introduction
Recently, I have been troubled by various trivial matters, and my mind has been restless. Seeing that members of the “Phyphox Bluetooth Experiment Development Group” WeChat group are releasing new works every day, I was also eager to try. Following the example of Teacher Mei from Beijing, I conducted an experiment to “plot the voltage-current characteristic curve of the power supply” and felt that I gained a lot.
This experiment has completely changed my previous understanding of closed circuit experiments, freeing me from the constraints of traditional instruments such as voltmeters, ammeters, and rheostats.
2 Building the Closed Circuit Experiment
Connect a fixed resistor with a resistance of 10 ohms in series with a potentiometer with a total resistance of 100 ohms, connecting both ends to the 5V power supply pin and GND pin on the ESP32 development board, as shown in the diagram to build the experimental circuit.
3 Code Writing and Uploading
Using pin IO33 to collect the voltage across the potentiometer, as the load voltage; using the difference between the 5V voltage and the voltage across the potentiometer to obtain the voltage across the fixed resistor r, and using Ohm’s law to get the current inside the fixed resistor r, which is the power supply current.
Upload the following Phyphox mobile experiment source code to the ESP32.
/*
Voltage-current characteristic curve of the equivalent power supply.
*/
#include <phyphoxBle.h>
int Pin1 = 33;//Read the load voltage of the equivalent power supply
float It = 0;//Current of the equivalent power supply to be measured
float Vt = 0;//Load voltage to be measured
float r = 10.0; //Internal resistance of the equivalent power supply
void setup()
{
PhyphoxBLE::start(“Phyphox Bluetooth Experiment”);
PhyphoxBleExperiment plotPhotoResistor;
plotPhotoResistor.setTitle(“Plotting the Voltage-Current Characteristic Curve of the Power Supply”);
plotPhotoResistor.setCategory(“Phyphox Bluetooth Experiment”);
plotPhotoResistor.setDescription(“This experiment uses a fixed resistor r in series with the 5V power supply of the ESP32 to form an equivalent power supply, measuring the load voltage and internal current of the equivalent power supply to plot the voltage-current characteristic curve of the power supply.”);
//View
PhyphoxBleExperiment::View firstView;
firstView.setLabel(“MyView”); //Create a “view”
//Graph
PhyphoxBleExperiment::Graph firstGraph;
firstGraph.setLabel(“Voltage-Current Characteristic Curve of the Power Supply”);
firstGraph.setUnitX(“A”);
firstGraph.setUnitY(“V”);
firstGraph.setLabelX(“Current”);
firstGraph.setLabelY(“Voltage”);
firstGraph.setChannel(1, 2);//Enable Bluetooth channels 1 and 2
firstView.addElement(firstGraph);
plotPhotoResistor.addView(firstView);
PhyphoxBLE::addExperiment(plotPhotoResistor);
}
void loop()
{
float iVe = analogRead(Pin1) * 5.0 / 1024.0 / 4.0;//Read the load voltage of the equivalent power supply
if (iVe != 0.0)
{
Vt = iVe;//Calculate the load voltage of the equivalent power supply
It = (5 – iVe) / r ;//Calculate the internal current of the power supply
PhyphoxBLE::write(It,Vt);//Send voltage and current data via Bluetooth
};
delay(50);
PhyphoxBLE::poll();
}
4 Data Collection and Analysis
Connect the smartphone’s Bluetooth to the ESP32, load the experiment into the Phyphox system, run the program, and carefully adjust the potentiometer’s resistance with a screwdriver. The voltage-current characteristic curve of the equivalent power supply will be automatically plotted on the phone screen.
Experimental Image
Full Screen View
Linear Fitting
5 Conclusion
From the data analysis, it can be concluded that the voltage-current characteristic curve plotted from the equivalent power supply indicates that the electromotive force of the equivalent power supply is 5 volts, and the internal resistance is 10 ohms.
The experimental conclusion is completely consistent with the parameters of the equivalent power supply built in the circuit.
6 Reflections
Using the ESP32 and some electronic components, various closed circuit experiments can be built as needed. By using a smartphone equipped with Phyphox, analysis and display can be performed without being constrained by laboratory conditions, breaking the limitations of time and space, allowing experiments and explorations to be conducted anytime and anywhere as needed.
| Maker Jiaozuo |
Henan Maker Jiaozuo is the WeChat public platform of the Maker Education Master Studio in Jiaozuo City, focusing on maker education research, sharing maker cases, explaining innovative methods, inspiring creative design, conducting scientific exploration, organizing social surveys, guiding thesis writing, participating in maker competitions and patent applications, discovering, cultivating, and achieving a group of students with innovative potential.
HenanPublic Number: chuangkejiaozuo
HenanMaster Blog: http://blog.sina.com.cn/updays
Long press to identify, follow, and share
– END –