Milleton oil drop experiment system based on YOLO model and method for calculating electric charge
The Millikan oil drop experiment system based on the YOLO model solves the problems of manual measurement errors and insufficient instrument automation in traditional experiments. It achieves precise positioning of oil droplets and accurate measurement of charge, improving experimental efficiency and data reliability, and meeting the needs of teaching and research.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV OF TECH & EDUCATION (TEACHER DEV CENT OF CHINA VOCATIONAL TRAINING & GUIDANCE)
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional Millikan oil drop experiments suffer from problems such as large errors in manual measurement, low degree of instrument automation, and cumbersome data processing, resulting in low experimental efficiency and poor reliability of results, making it difficult to meet the needs of teaching and research.
A Millikan oil drop experimental system based on the YOLO model was adopted. The oil drop trajectory was tracked in real time through image processing and machine learning algorithms. The charge was calculated by combining maximum likelihood estimation and the bootstrap method, so as to achieve precise positioning of oil drop and accurate measurement of charge.
It improves the efficiency and accuracy of experimental data collection, reduces human error, enables the rapid acquisition of large amounts of oil droplet data, supports statistical analysis, and enhances teaching effectiveness and students' scientific inquiry abilities.
Smart Images

Figure CN122157079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a Millikan oil drop experimental system based on the YOLO model and a method for calculating charge. Background Technology
[0002] Millikan's oil drop experiment, a significant milestone in the history of modern physics, successfully and quantitatively determined the elementary charge of an electron for the first time by precisely measuring the trajectory of an oil droplet in a uniform electric field. This result not only provides strong experimental evidence for the quantized nature of electron charge but also greatly promotes the establishment and development of quantum theory. The experiment, by controlling the equilibrium state of the oil droplet under the combined effects of gravity, buoyancy, electric field force, and air resistance, achieved accurate measurement of the charge of a single charged particle, marking the beginning of precise measurement of microscopic physical quantities through experimental means. Millikan's innovative experiment not only verified the fundamental property of the indivisibility of electric charge but also laid a solid theoretical and experimental foundation for subsequent in-depth research into the microscopic world, occupying an irreplaceable core position in the classical physics experimental system. In the Millikan oil drop experiment teaching system in universities, the traditional experimental mode of "CCD imaging + manual switching of electric field + manual calculation" has exposed multiple limitations in teaching practice and scientific research, seriously restricting experimental efficiency and the achievement of teaching objectives. Specifically, although CCD imaging achieves visualization, its limited resolution results in insufficient accuracy in acquiring data on the movement of tiny oil droplets. More importantly, repeatedly switching the direction of the electric field and observing and recording the rising and falling process of the oil droplet under different voltages not only consumes a lot of class time, but is also prone to human error affecting the reliability of the final result. Moreover, each experiment can only measure the charge of a single oil droplet, which reduces the efficiency of the experiment and makes it difficult for students to deeply understand the core principle of charge quantization.
[0003] In the Millikan oil drop experiment, significant manual measurement errors are a major drawback. The core object observed in the Millikan oil drop experiment—the oil droplet itself—is extremely small, with a diameter on the order of micrometers, making tracking difficult. Brownian motion of the oil droplet further complicates observation. The droplet is susceptible to changes in airflow and temperature, causing random drift. When manually tracking it using a microscope and CCD imaging, hand-eye coordination errors can easily lead to the droplet being lost, requiring re-searching, wasting time, and potentially confusing data from different droplets. Timing relies on manual operation, and reaction delays also contribute to errors. Furthermore, poor data stability and fatigue from repeated measurements can accumulate, especially when the droplet moves slowly. Prolonged observation can lead to distraction, reducing data repeatability and ultimately affecting the accuracy of charge calculations. Large cumulative errors from multiple measurements severely impact the accuracy of elementary charge measurement and reduce experimental reliability. These limitations of manual operation often cause traditional experimental results to deviate from theoretical values, and data from different operators can vary significantly.
[0004] Meanwhile, the lack of automation in the instrument is also a limitation, as oil droplet selection relies on manual operation. The experiment requires manually adjusting the focus to find a suitable oil droplet, a time-consuming and highly random process. Students, especially new to the experiment, often struggle to capture droplets that are too large, too small, or moving too fast, leading to low experimental efficiency. Changing the electric field direction relies entirely on students manually pressing the high-voltage power switch. However, there is a natural time lag between the human eye's judgment of the droplet's position change and the manual operation of the switch, averaging 300-500 milliseconds. Subjective reaction speed introduces human error, especially during the uniform oil droplet phase, where deviations in manually judging the starting and ending points directly reduce the accuracy of charge calculation. Furthermore, the cumbersome and repetitive operation process allows for the measurement of only one oil droplet charge per experiment. From focusing and oil spraying to multiple measurements of different droplets, manual intervention is required throughout. Prolonged operation can lead to fatigue, further increasing data errors and hindering the rapid acquisition and analysis of large volumes of oil droplet data, thus limiting the efficiency of experimental teaching and the depth of research. With a small sample size, it is impossible to meet the requirement of the law of large numbers that "large sample data converges to the true value", and it is also difficult to offset random errors through statistical methods, which further increases the risk that the charge quantization law will be masked by errors.
[0005] Finally, in the traditional operation of the Millikan oil drop experiment, the tediousness and time-consuming nature of manual data processing are significant drawbacks. Students must observe the motion of each oil drop individually, recording its time and distance data at different stages in the electric field. Acquiring each set of valid data requires multiple repeated measurements and calculations, with the measurement and data processing of a single oil drop potentially taking more than ten minutes. This inefficient model often results in only a small amount of sparse data from a few oil drops being collected within the limited teaching time, making it difficult to accumulate a sufficient sample size. However, the core logic of the experiment relies precisely on a large amount of data—the electron charge needs to be derived from the calculation of the greatest common divisor of the charges of multiple oil drops. When the amount of data is insufficient, the accuracy of the calculation of the greatest common divisor will drop significantly, and may even obscure the essential laws of charge quantization due to random errors. More importantly, the traditional model lacks scientific error handling methods, cannot achieve "accumulated sample size to offset random errors" through the law of large numbers, and cannot deduce the amount of electron charge through statistical means. It is difficult for students to clearly establish the quantitative relationship between the motion of oil droplets and electric field force and air resistance from such limited data, which greatly weakens the role of this experiment in understanding the core physical concept of charge quantization.
[0006] These limitations not only reduce the reliability of the experimental results but also make it difficult to reproduce Millikan's oil drop experiment effectively. They fail to meet the needs of university teaching in cultivating students' data analysis skills and deepening their understanding of experimental principles, thus hindering the achievement of ideal teaching results.
[0007] Therefore, making the traditional Millikan oil drop experiment intelligent and digital is an urgent need to improve teaching quality and cultivate students' scientific inquiry abilities. It can fundamentally solve the core pain points of the traditional model, especially addressing the problems of "large inherent errors in the Millikan oil drop experiment and the ease with which random errors can mask patterns," achieving a breakthrough through the mathematical statistical method of maximum likelihood estimation. By calculating the posterior distribution of the oil drop charge using the maximum likelihood estimation method, the problem of the unknown distribution of the oil drop charge is solved. Simultaneously, based on statistical principles, the magnitude of the electron charge and the uncertainty of random errors are obtained. Furthermore, for the maximum likelihood estimation method, based on the bootstrap method with replacement, the mean and uncertainty of the electron charge can be calculated relatively well, improving the scientific and rational requirements for data processing in physics experiment teaching. Summary of the Invention
[0008] The purpose of this invention is to address the technical deficiencies in the prior art by providing a method for calculating charge in the Millikan oil drop experimental system based on the YOLO model.
[0009] Another object of the present invention is to provide the Millikan oil drop experimental system based on the YOLO model.
[0010] The technical solution adopted to achieve the purpose of this invention is:
[0011] A method for calculating charge in a Millikan oil drop experiment system based on the YOLO model includes:
[0012] Step 1: Acquire video of oil droplet motion in the Millikan oil drop experiment;
[0013] Step 2: Optimize the microscopic images of each frame in the acquired oil droplet motion video;
[0014] Step 3: Use the trained YOLOv model to determine the position of the oil droplets and define their bounding boxes.
[0015] Step 4: Based on the determined bounding box of the oil droplet, use the BOTSORT algorithm to assign a unique ID to each oil droplet and continuously record the movement trajectory of each oil droplet;
[0016] Step 5: First, the recorded motion trajectory is smoothed by convolution to reduce the impact of noise; then, the features of the abrupt change points of the motion trajectory are amplified by difference operation to obtain the enhanced motion trajectory sequence.
[0017] Step 6: Based on the abrupt change points of the enhanced motion trajectory sequence, the PELT algorithm is used to divide the motion trajectory into rising and falling segments to quickly locate the time period of oil droplet motion state switching.
[0018] Step 7: Calculate the velocity of the oil droplets in the rising and falling segments based on their trajectories. Combine this with the voltage applied to the oil droplets to calculate the charge of each droplet. Perform viscosity correction to obtain multiple sets of oil droplet charge data. Calculate the elementary charge and its uncertainty using statistical methods.
[0019] In the above technical solution, the method also includes an automatic voltage regulation module, which uses STM32 and ST-link as the core and works with relays to achieve rapid voltage switching with a response delay controlled within 10ms. By adjusting the electric field strength and voltage switching time interval, it can ensure that most oil droplets are easy to observe and data to acquire.
[0020] In the above technical solution, the method further includes a hardware control module that executes voltage regulation commands to control the magnitude of the voltage applied to the oil droplet during the rising section.
[0021] In the above technical solution, the data preprocessing module includes:
[0022] Grayscale conversion: Use OpenCV's cvtColor function to convert the microscopic image to a grayscale image;
[0023] Binarization processing: A fixed threshold binarization algorithm is used to convert the grayscale image into a black and white binary image using the cv2.threshold function, highlighting the oil droplet bounding box features.
[0024] In the above technical solution, the YOLOv11 model is initially trained as follows: the oil droplet position in each frame of the binarized video is identified by a traditional search algorithm based on depth-first or breadth-first search, and a 5×5 pixel square bounding box is established with the oil droplet position as the center as the original training set of the YOLOv11 model. The training is terminated when the loss function of the YOLOv11 model on the validation set no longer decreases for several consecutive cycles, thus completing the initial training of the YOLOv11 model.
[0025] In the above technical solution, the overlapping oil droplets are reinforced during training: the overlapping oil droplet data is manually re-labeled to ensure that the bounding box of each oil droplet is clear, resulting in an overlapping dataset. The overlapping dataset is then mixed into the original training set for training the YOLOv11 model. Data augmentation strategies such as translation, mosaic, cropping and mixing, and flipping are adopted. The bounding box localization accuracy of the oil droplets is enhanced by introducing the DIoU loss function. When the false negative rate of overlapping oil droplets is significantly reduced, the training of the YOLOv11 model is completed.
[0026] In the above technical solution, in step 7, the motion speed is calculated by linear fitting, as shown in the following formula:
[0027]
[0028] Where: k is the trajectory slope (pixels / frame) calculated by np.polyfit(x, y, 1), fps is the video frame rate (frames / second, default 16fps), dpmm is the pixel density (pixels / millimeter, default 508) (i.e., the number of pixels corresponding to 1 mm), and v is the motion speed in millimeters / second.
[0029] In the above technical solution, in step 7, the charge of each oil droplet is calculated using the following formula:
[0030] ,in, For the upward phase speed, For the descent phase speed, This represents the uncorrected oil droplet radius. Where is the viscosity coefficient and g is the acceleration due to gravity. , These represent the oil droplet density and air density, respectively, where b is a correction factor, and E = U / d E is the electric field strength, which is the voltage U between the upper and lower plates and the distance d between the two plates, which is the voltage applied to the oil droplet in the Millikan experiment, and p is the air pressure.
[0031] In the above technical solution, in step 7, the statistical method is maximum likelihood estimation and bootstrap method. Based on multiple sets of oil droplet charge data, the statistical value and uncertainty of the electronic charge are calculated by maximum likelihood estimation and bootstrap method, and the quantization characteristics of the calculated charge are verified.
[0032] Another aspect of the present invention includes a Millikan oil drop experimental system based on the YOLO model, comprising: a computer, a CCD micro Millikan oil drop apparatus connected to the computer, and an STM32 microcontroller embedded inside the CCD micro Millikan oil drop apparatus.
[0033] The computer includes an image preprocessing unit, a data acquisition module, a data processing module, and a statistical analysis module. The data acquisition module includes an image acquisition unit and an oil droplet detection and tracking unit. The data processing module and the statistical analysis module include a data smoothing and boundary detection unit, an oil droplet parameter calculation unit, and a multi-set experimental data statistical processing unit. The image acquisition unit is used to perform the action in step 1. The image preprocessing unit includes image grayscale conversion and binarization, and is used to perform the action in step 2. The oil droplet detection and tracking unit includes the YOLOv11 model and the BOTSORT algorithm, and is used to perform the actions in steps 3 and 4, respectively. The data smoothing and boundary detection unit includes the convolutional difference enhancement algorithm and the PELT change point detection algorithm, and is used to perform the actions in steps 5 and 6, respectively. The oil droplet parameter calculation unit is used to perform the action in step 7.
[0034] The STM32 microcontroller executes step 6, responsible for switching the electric field state. The CCD microscopic Millikan oil drop instrument includes an oil drop box, a CCD television microscope as a data acquisition module, a circuit box, and a monitor. The CCD television microscope acquires video of oil drop movement to achieve visual recognition. The oil drop box includes upper and lower electrode plates. The oil drop to be tested is placed between the upper and lower electrode plates for the Millikan experiment. The multi-set experimental data statistical processing unit includes a maximum likelihood estimation and bootstrap method that executes step 7. It is responsible for calculating the magnitude and standard deviation of the elementary charge based on the maximum likelihood estimation by statistically analyzing the charge of the oil drop, and calculating the uncertainty of the elementary charge using the bootstrap method.
[0035] Compared with the prior art, the beneficial effects of the present invention are:
[0036] 1. This invention addresses the errors of manual measurement by using a data acquisition module, a preprocessing module, and a data processing module to track the trajectory of oil droplets in real time, and optimizes the accuracy and speed of oil droplet image recognition to accurately capture the shape and position of oil droplets. It can accurately measure the displacement of oil droplets, avoiding visual fatigue, oil droplet loss, and subjective judgment bias during human observation. At the same time, the YOLOv11 model is trained using a large number of original training sets and overlapping oil droplet datasets, enabling it to accurately determine the position of oil droplets and perform real-time tracking of oil droplet positions.
[0037] 2. This invention, through improvements based on the YOLO model, greatly improves the efficiency of acquiring experimental data, increasing the number of data points from one every ten minutes or so to dozens per minute, thus providing a data foundation for observing the quantization of oil droplet charge and statistically calculating the amount of electron charge.
[0038] 3. This invention improves the efficiency and depth of data analysis by calculating key parameters such as the charge of oil droplets, enabling rapid calculation of the charge carried by the droplets. Simultaneously, using maximum likelihood estimation and the bootstrap method, it verifies the quantization law of charge based on statistical principles and provides the magnitude and uncertainty of the electron charge. This "real-time tracking + automatic control + intelligent analysis + statistical testing" model not only reduces labor costs but also allows students to focus more on understanding experimental principles and cultivating scientific thinking. Attached Figure Description
[0039] Figure 1 This is a schematic flowchart of the method of the present invention.
[0040] Figure 2 This is a charge distribution histogram of the experimental data obtained in this invention. Detailed Implementation
[0041] The present invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0042] like Figure 1 As shown, a method for calculating charge in a Millikan oil drop experimental system based on the YOLO model includes:
[0043] Step 1: Acquire video of oil droplet motion in the Millikan oil drop experiment;
[0044] Step 2 involves optimizing the microscopic images of each frame in the acquired oil droplet motion video to provide standardized input data for subsequent analysis. Addressing the low contrast of the oil droplet microscopic images, this process includes: Grayscale conversion: Using OpenCV's `cvtColor` function to convert the microscopic image to a grayscale image, eliminating interference from color information in subsequent processing. Binarization: Employing a fixed threshold binarization algorithm, the grayscale image is converted to a black-and-white binary image using the `cv2.threshold` function, highlighting the bounding box features of the oil droplets. The binarization threshold of the black-and-white binary image can be dynamically adjusted via the user interface (default value 30) to adapt to image quality under different lighting conditions.
[0045] Step 3: Based on traditional algorithms such as depth-limited or breadth-first search, the number of pixels outside the bounding box can be dynamically adjusted (default value 5). Construct the original training set and train the YOLOv11 model using the early stopping method. When the loss function of the YOLOv11 model on the validation set no longer decreases for several consecutive cycles, the training is terminated. Then, the trained YOLOv11 model is used to detect and identify oil droplets in the preprocessed microscopic image in real time, determine the position of the oil droplets, and determine the bounding box of the oil droplets.
[0046] Furthermore, the overlapping oil droplets are reinforced during training: the overlapping oil droplet data is manually re-labeled to ensure that the bounding boxes of each oil droplet are clear, resulting in an overlapping dataset. This overlapping dataset is then mixed into the original training set used to train the YOLOv11 model. Data augmentation strategies such as translation, mosaic, cropping and blending, and flipping are employed to enhance the adaptability of the YOLOv11 model to complex scenes. The DIoU loss function is introduced to improve the accuracy of oil droplet bounding box localization, especially for the detection of overlapping targets. When the false negative rate of overlapping oil droplets is significantly reduced, the training of the YOLOv11 model is complete.
[0047] Step 4: Based on the determined oil droplet bounding box, use the BOTSORT algorithm to assign a unique ID (oil droplet number) to each oil droplet, continuously record the movement trajectory of each oil droplet, ensure the continuity and integrity of the trajectory in complex scenarios such as multiple oil droplets coexisting, partial occlusion, or temporary loss, reduce ID switching phenomenon, and store the movement trajectory in CSV.
[0048] Step 5: The convolutional differential enhancement algorithm is used to first smooth the recorded motion trajectory through convolution to reduce the impact of noise; then, the differential operation is used to amplify the features of the abrupt change points of the recorded motion trajectory to obtain the enhanced motion trajectory sequence.
[0049] Step 6: Based on the abrupt change points of the enhanced motion trajectory sequence, divide the motion trajectory into rising and falling segments to quickly locate the time period when the oil droplet's motion state changes. For example, when the electric field is turned on, the instant when the oil droplet's velocity changes from a uniform descent to a uniform ascent is a point of abrupt change.
[0050] Step 7: Calculate the velocity of the oil droplet during the rising and falling segments, respectively. The velocity is calculated using linear fitting, as shown in the following formula:
[0051]
[0052] Where: k is the trajectory slope (pixels / frame) calculated by np.polyfit(x, y, 1), fps is the video frame rate (frames / second, default 16fps), dpmm is the pixel density (pixels / millimeter, default 508), and v is the motion speed in m / s.
[0053] Based on the Millikan experiment principle and related formulas, and considering the oil droplet velocity, the voltage switching cycle was adjusted to ensure that most oil droplets moved at a moderate speed. The charge of each oil droplet was calculated, and viscosity correction was applied to obtain a set of oil droplet charge data. This set of charge data was compared with the elementary charge e, and then rounded to obtain the charge multiple. The charge error (i.e., abs()) was calculated. -integer multiples The error was used as the physical error of the actual charge amount observed for each oil droplet, thus reflecting the data accuracy. The identified motion trajectory was linearly fitted, and the "horizontal error" was automatically calculated to assist in the analysis of motion stability and detection accuracy. Table 1 was obtained and saved as a CSV file as a dataset for subsequent statistical analysis of multiple sets of experimental data.
[0054]
[0055] Multiple sets of experimental data (more than 5 sets, with data from hundreds of oil droplets) were collected in CSV files. Statistical analysis was performed on these sets of data. First, a statistical histogram of oil droplet charge was plotted to observe the distribution of charge. The presence of multiple equally spaced peaks in the charge distribution verified the quantization characteristics of charge. Then, the statistical values and uncertainties of the electron charge were calculated using maximum likelihood estimation and the bootstrap method.
[0056] The charge on each oil droplet can be calculated using the following formula:
[0057] ,in, For the upward phase speed, For the descent phase speed, This represents the uncorrected oil droplet radius. For viscosity correction, g is the acceleration due to gravity. , These represent the oil droplet density and air density, respectively, where b is a correction factor, and E = U / d E is the electric field strength, which is the voltage U between the upper and lower plates and the distance d between the two plates, which is the voltage applied to the oil droplet in the Millikan experiment, and p is the air pressure.
[0058] like Figure 2 As shown in the charge distribution histogram obtained under the condition dpmm=520, the main peak of the blue curve is high and sharp, and the peak position coincides with the height of the vertical line indicating a certain integer multiple of the electron charge, indicating that the main charge calculated in this invention is consistent with... Consistent with the target peak, the charge quantization characteristics were clearly verified. A secondary peak and a certain degree of negative tail were visible to the left of the main peak, along with some fluctuations in the more negative charge region. This reflects the contribution of factors such as pulse overlap or trigger edge events to the spectral shape, resulting in a slightly larger full width at half maximum (FWHM) than ideal. Although the peak shape is slightly wider, there is no systematic shift in peak position, and the calibration and scaling are generally reliable.
[0059] The automatic voltage regulation module, based on STM32 and ST-link, works with relays to achieve rapid voltage switching with a response delay of less than 10ms. It can adjust the electric field strength and voltage switching cycle according to the oil droplet movement state to ensure that it is within an ideal range for easy observation and data acquisition.
[0060] The hardware control module executes voltage regulation commands to precisely adjust the voltage between the upper and lower plates, meeting the voltage requirements for different oil droplet balancing and lifting operations in the experiment. This avoids reaction delays and operational errors during manual adjustment and also provides stable control voltage for the subsequent rising and falling sections.
[0061] Example 2
[0062] This embodiment provides a Millikan oil drop experimental system based on the YOLO model, including: a computer, a CCD micro Millikan oil drop instrument connected to the computer, and an STM32 microcontroller embedded inside the CCD micro Millikan oil drop instrument.
[0063] The computer includes an image preprocessing unit, a data acquisition module, a data processing module, and a statistical analysis module. The data acquisition module includes an image acquisition unit and an oil droplet detection and tracking unit. The data processing module and the statistical analysis module include a data smoothing and boundary detection unit, an oil droplet parameter calculation unit, and a multi-set experimental data statistical processing unit. The image acquisition unit is used to perform the action in step 1. The image preprocessing unit includes image grayscale conversion and binarization, and is used to perform the action in step 2. The oil droplet detection and tracking unit includes the YOLOv11 model and the BOTSORT algorithm, and is used to perform the actions in steps 3 and 4, respectively. The data smoothing and boundary detection unit includes the convolutional difference enhancement algorithm and the PELT change point detection algorithm, and is used to perform the actions in steps 5 and 6, respectively. The oil droplet parameter calculation unit is used to perform the action in step 7.
[0064] The STM32 microcontroller executes step 6, responsible for switching the electric field state. The CCD microscopic Millikan oil drop instrument includes an oil drop box, a CCD television microscope as a data acquisition module, a circuit box, and a monitor. The CCD television microscope acquires video of oil drop movement to achieve visual recognition. The oil drop box includes upper and lower electrode plates. The oil drop to be tested is placed between the upper and lower electrode plates for the Millikan experiment. The multi-set experimental data statistical processing unit includes a maximum likelihood estimation and bootstrap method that executes step 7. It is responsible for calculating the magnitude and standard deviation of the elementary charge based on the maximum likelihood estimation by statistically analyzing the charge of the oil drop, and calculating the uncertainty of the elementary charge using the bootstrap method.
[0065] oil droplet radius is The quality is Air is a viscous fluid, so the moving oil droplet is subject to viscous drag in addition to gravity and buoyancy. According to Stokes' law, viscous drag is directly proportional to the velocity of the object.
[0066] Assume the oil droplet travels at a velocity... If falling at a constant speed, then...
[0067]
[0068] Here For the same volume of air as the oil droplet, This is the proportionality coefficient. This is the acceleration due to gravity. The forces acting on the oil droplet in the air and in the gravitational field are as follows: Figure 1 As shown.
[0069] If this oil droplet carries a charge of and is in the field of strength In a uniform electric field, let the electric force be... The direction is opposite to the direction of gravity, such as Figure 2 As shown, if the oil droplets move at a speed of... If it rises at a constant speed, then...
[0070]
[0071] Eliminate by equations (1) and (2) The solution can be found for
[0072]
[0073] As can be seen from equation (3), to measure the charge carried on the oil droplet They need to be measured separately. Physical quantities.
[0074] Due to the radius of the small oil droplets sprayed by the sprayer It is on the order of micrometers, and its mass can be directly measured. It is also difficult, and for this reason, we hope to eliminate it. Instead, we use easily measurable quantities. Let the densities of oil and air be respectively... Therefore, the radius is The apparent weight of the oil droplets is
[0075] According to Stokes' law, the resistance of a viscous fluid to a spherical moving object is directly proportional to the object's velocity, and its proportionality constant is... for , here The viscosity coefficient, Let be the radius of the object. Therefore, we can substitute equation (4) into equation (1) to get...
[0076] therefore
[0077]
[0078] Substituting this into equation (3) and rearranging, we get
[0079] Therefore, if measured , The macroscopic quantity can be obtained. value.
[0080] Considering that the diameter of oil droplets is comparable to the spacing between air molecules, air can no longer be considered a continuous medium, and its viscosity... Corresponding corrections are required. , here Air pressure, To correct the constant, (6.17× Therefore (mcmHg)
[0081] When high precision is not required, approximate calculation methods are often used to first... Substituting the value into equation (6) yields the result.
[0082] Then this Substitute value In the middle, and with Substituting into equation (7), we get
[0083] In experiments, the distance the oil droplet travels is often fixed, and the distance is measured by measuring the distance the oil droplet travels. The required time for movement is used to determine its velocity, and the electric field strength is also calculated. , The distance between the parallel plates. Given the applied voltage, equation (10) can be written as follows:
[0084] Select the quantities related to the experimental apparatus and conditions in formula (11): , , and Use instrument constants to measure it The representative, equation (11) is simplified to
[0085] Therefore, measuring the charge on an oil droplet is only reflected in the voltage. Falling time time of ascent Different. For the same oil droplet, same, and The difference indicates the difference in electric charge.
[0086] Furthermore, the computer is equipped with a Python-based NiceGUI framework to build a web-based GUI interface. The GUI interface supports multiple functions of the CCD micrometer Millikan oil drop instrument: a video management module for video loading and switching and multi-view display; a parameter control panel for precise configuration of key parameters (oil drop velocity and voltage); a monitoring function that can provide real-time feedback on processing progress; and a data display module that uses Plotly to visualize oil drop trajectory and analyze charge distribution.
[0087] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for calculating charge in a Millikan oil drop experiment system based on the YOLO model, characterized in that, Includes the following steps: Step 1: Acquire video of oil droplet motion in the Millikan oil drop experiment; Step 2: Optimize the microscopic images of each frame in the acquired oil droplet motion video; Step 3: Use the trained YOLOv model to detect and identify oil droplets in the preprocessed microscopic image in real time, determine the location of the oil droplets, and define the bounding boxes of the oil droplets. Step 4: Based on the determined bounding box of the oil droplet, use the BOTSORT algorithm to assign a unique ID to each oil droplet and continuously record the movement trajectory of each oil droplet; Step 5: First, the recorded motion trajectory is smoothed by convolution to reduce the impact of noise; then, the features of the abrupt change points of the motion trajectory are amplified by difference operation to obtain the enhanced motion trajectory sequence. Step 6: Based on the abrupt change points of the enhanced motion trajectory sequence, the PELT algorithm is used to divide the motion trajectory into rising and falling segments to quickly locate the time period of oil droplet motion state switching. Step 7: Calculate the velocity of the oil droplets in the rising and falling segments based on their trajectories. Combine this with the voltage applied to the oil droplets to calculate the charge of each droplet. Perform viscosity correction to obtain multiple sets of oil droplet charge data. Calculate the elementary charge and its uncertainty using statistical methods.
2. The method according to claim 1, characterized in that, The method also includes an automatic voltage regulation module, which uses STM32 and ST-link as the core and works with relays to achieve rapid voltage switching with a response delay controlled within 10ms. By adjusting the electric field strength and voltage switching time interval, it can ensure that most oil droplets are easy to observe and collect data.
3. The method according to claim 1, characterized in that, The method also includes a hardware control module that executes voltage regulation commands to control the voltage applied to the oil droplets during the rising phase.
4. The method according to claim 1, characterized in that, The data preprocessing module includes: Grayscale conversion: Use OpenCV's cvtColor function to convert the microscopic image to a grayscale image; Binarization processing: A fixed threshold binarization algorithm is used to convert the grayscale image into a black and white binary image using the cv2.threshold function, highlighting the oil droplet bounding box features.
5. The method according to claim 1, characterized in that, Preliminary training of the YOLOv model: The oil droplet positions in each frame of the binarized video are identified using traditional search algorithms based on depth-first or breadth-first search. Square bounding boxes are then built with the oil droplet positions as the center, serving as the original training set for the YOLOv model. Training is terminated when the loss function of the YOLOv model on the validation set no longer decreases for several consecutive cycles, thus completing the preliminary training of the YOLOv model.
6. The method according to claim 5, characterized in that, Enhanced training on overlapping oil droplets: The overlapping oil droplet data is manually re-labeled to ensure that the bounding box of each oil droplet is clear, resulting in an overlapping dataset. The overlapping dataset is then mixed into the original training set for training the YOLOv model. Data augmentation strategies such as translation, mosaic, cropping and mixing, and flipping are adopted. The bounding box localization accuracy of the oil droplets is enhanced by introducing the DIoU loss function. When the false negative rate of overlapping oil droplets is significantly reduced, the training of the YOLOv model is completed.
7. The method according to claim 1, characterized in that, In step 7, the motion speed is calculated through linear fitting, as shown in the following formula: ; in: k The slope of the trajectory is calculated using np.polyfit(x, y, 1). fps For video frame rate, dpmm For pixel density, v The velocity is measured in millimeters per second.
8. The method according to claim 1, characterized in that, In step 7, the charge of each oil droplet is calculated using the following formula: ,in, For the upward phase speed, For the descent phase speed, This represents the uncorrected oil droplet radius. Where is the viscosity coefficient and g is the acceleration due to gravity. , These represent the oil droplet density and air density, respectively, where b is a correction factor, and E= U / d E is the electric field strength, which is the voltage U between the upper and lower plates and the distance d between the two plates, which is the voltage applied to the oil droplet in the Millikan experiment, and p is the air pressure.
9. The method according to claim 1, characterized in that, In step 7, the statistical method is maximum likelihood estimation and bootstrap method. Based on multiple sets of oil droplet charge data, the statistical value and uncertainty of the electron charge are calculated by maximum likelihood estimation and bootstrap method to verify the quantization characteristics of the calculated charge.
10. The Millikan oil drop experimental system based on the YOLO model used in the method according to any one of claims 1 to 9, characterized in that, include: A computer, and a CCD micrometer Millikan oil dropper connected to the computer, with an STM32 microcontroller embedded inside the CCD micrometer Millikan oil dropper. The computer includes an image preprocessing unit, a data acquisition module, a data processing module, and a statistical analysis module. The data acquisition module includes an image acquisition unit and an oil droplet detection and tracking unit. The data processing module and the statistical analysis module include a data smoothing and boundary detection unit, an oil droplet parameter calculation unit, and a multi-set experimental data statistical processing unit. The image acquisition unit is used to perform the action in step 1. The image preprocessing unit includes image grayscale conversion and binarization, and is used to perform the action in step 2. The oil droplet detection and tracking unit includes the YOLOv model and the BOTSORT algorithm, and is used to perform the actions in steps 3 and 4, respectively. The data smoothing and boundary detection unit includes the convolutional difference enhancement algorithm and the PELT change point detection algorithm, and is used to perform the actions in steps 5 and 6, respectively. The oil droplet parameter calculation unit is used to perform the action in step 7. The STM32 microcontroller executes step 6, responsible for switching the electric field state. The CCD microscopic Millikan oil drop instrument includes an oil drop box, a CCD television microscope as a data acquisition module, a circuit box, and a monitor. The CCD television microscope acquires video of oil drop movement to achieve visual recognition. The oil drop box includes upper and lower electrode plates. The oil drop to be tested is placed between the upper and lower electrode plates for the Millikan experiment. The multi-set experimental data statistical processing unit includes a maximum likelihood estimation and bootstrap method that executes step 7. It is responsible for calculating the magnitude and standard deviation of the elementary charge based on the maximum likelihood estimation by statistically analyzing the charge of the oil drop, and calculating the uncertainty of the elementary charge using the bootstrap method.