A hand-held spectrometer and method of operation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-21
- Publication Date
- 2026-08-11
AI Technical Summary
这种“非黑即白”的判定逻辑,在面对脐橙等生物组织时存在固有缺陷:外部强光可能穿透果皮,在组织内部发生散射(即漫透射现象),这部分由样品自身特性导致的光信号会进入检测腔并被漏光传感器捕获
本发明通过采用非对称偏置于贴合界面处的漏光检测传感器并结合自适应报警阈值算法,有效解决了现有固定阈值法无法区分“真实物理缝隙漏光”与“生物组织漫透射假漏光”的难题,能够基于被测物的光学特性动态容限正常的漫透射光,仅对超出容限的真实漏光进行报警,从而显著减少了在检测脐橙等特定农产品时的误报警与流程死锁,极大地提升了户外复杂光线环境下的检测成功率和可靠性,其次,通过将标准白板收纳于主光路之外的暗舱侧壁并在需要时旋转切入光路,实现了全自动、全密闭的内置黑白校准功能,不仅解决了内置校准模块的微型化部署难题,还杜绝了标准白板在户外被灰尘或样品污染的风险,保证了全生命周期的校准精度与免维护性,从而通过主控芯片的逻辑控制,构建了“检漏-校准-测量”的条件触发闭环流程,确保仅在检漏通过后才依次执行暗场校准、白场校准及样品测量,这一硬件与逻辑相结合的前馈互锁机制从根本上杜绝了在漏光情况下使用被污染的基准数据进行校准和测量,确保了最终测得的绝对反射率光谱数据的准确性与可靠性,全面提升了手持光谱仪在复杂现场环境下的自动化程度与数据质量。
Smart Images

Figure CN122545409A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of nondestructive testing instrument technology, specifically relating to a handheld spectrometer and its operating method. Background Technology
[0002] With the miniaturization and portability of spectral analysis technology, handheld spectrometers have been widely used in rapid, non-destructive testing in agriculture, food, and pharmaceutical fields. For example, in scenarios such as agricultural product quality testing (e.g., fruit sugar content and acidity) and early disease screening, operators need to bring the handheld spectrometer close to and attach it to biological samples with irregular surfaces and a certain peel thickness, such as navel oranges and apples, to collect diffuse reflectance spectra.
[0003] To ensure that weak spectral signals are not interfered with by ambient stray light, such devices generally adopt a contact measurement structure, that is, a flexible light-shielding ring at the front of the instrument is closely attached to the sample surface to form a physical light-shielding closed loop. At the same time, in order to eliminate sensor dark current drift and calculate absolute reflectance, black calibration (acquiring a completely dark signal) and white calibration (acquiring a standard white plate signal) must be performed before each measurement.
[0004] However, in practical applications, especially when detecting semi-transparent biological tissues in complex outdoor lighting environments, existing technologies exhibit severe limitations in their anti-interference capabilities, primarily manifested in the failure of the light-blocking judgment logic. Most existing devices employ a fixed threshold method for light leakage detection; that is, when the light intensity sensor reading at the light-blocking ring exceeds a preset fixed value, it is considered light leakage and an alarm is triggered. This "black and white" judgment logic has inherent flaws when dealing with biological tissues such as navel oranges: strong external light may penetrate the peel and scatter within the tissue (i.e., diffuse transmission). This portion of the light signal caused by the sample's own characteristics can enter the detection cavity and be captured by the light leakage sensor. Existing systems cannot distinguish between this type of "false light leakage" caused by sample characteristics and genuine physical "gap light leakage" caused by poor adhesion. The fatal consequences are twofold: First, it can cause frequent false alarms or even process deadlocks when testing specific agricultural products, affecting testing efficiency. Second, and more seriously, if black-and-white calibration is forcibly performed in the presence of "false light leakage" (misjudged as normal by the system) or undetected real light leakage, then both the "dark field signal" and "white board signal" on which the calibration relies will be contaminated by stray light from the environment. Calculating the absolute reflectance of subsequent samples using this contaminated baseline data will produce systematic errors, severely degrading the quality of the measured data and rendering the entire measurement result meaningless. Summary of the Invention
[0005] In order to address the problems existing in the prior art, the purpose of this invention is to provide a handheld spectrometer and its operation method, which improves the anti-interference ability of the handheld spectrometer in complex outdoor environments and the accuracy and reliability of the final measurement data.
[0006] The technical solution of this invention is: A handheld spectrometer includes a spectral probe housing, a main control chip, a miniature spectrometer, a light source, a flexible light-shielding ring for contacting the surface of the sample to form a light-shielding seal, and an isolation window sealed inside the flexible light-shielding ring. The isolation window divides the interior of the housing into a contact isolation cavity and a closed dark chamber. The miniature spectrometer and the light source are disposed in the closed dark chamber. The spectrometer also includes a light leakage detection sensor, a miniature servo motor, a rotating swing arm, and a standard white board. The light leakage detection sensor is asymmetrically biased and disposed in the contact isolation cavity between the inner edge of the flexible light shielding ring and the isolation window, and is used to collect the light signal at the interface between the flexible light shielding ring and the sample to be tested. The micro servo motor is fixed to the side wall of the enclosed dark chamber, and its output shaft is connected to one end of the rotating arm. The other end of the rotating arm is provided with the standard white board. The micro servo motor is used to drive the rotating arm to rotate in a plane parallel to the isolation window, so that the standard white board switches between a storage position that avoids the main optical path of the micro spectrometer and a calibration position located above the main optical path of the micro spectrometer. The main control chip is electrically connected to the micro spectrometer, light source, light leakage detection sensor, and micro servo motor, respectively. It is used to compare the real-time sampling value of the light leakage detection sensor with the adaptive alarm threshold, and only when it is determined that there is no light leakage or the light leakage is within the tolerance, it sequentially triggers the micro spectrometer to perform dark field calibration, triggers the micro servo motor to drive the rotating arm to carry the standard white board to the calibration position to perform white field calibration, and triggers the measurement of the sample to be tested after the rotating arm returns to the storage position.
[0007] Preferably, the rotation center axis of the micro servo motor is offset parallel to the optical path main axis of the micro spectrometer.
[0008] Preferably, the main control chip includes a high-frequency analog-to-digital converter and a pulse width modulation signal generator; The high-frequency analog-to-digital converter is used to sample the output voltage of the light leakage detection sensor in real time at a preset frequency to obtain the real-time voltage value. ; The main control chip is used to... and The logical result of the comparison is used as an enable signal, and the underlying hardware logic and operation are performed based on the enable signal and the output of the pulse width modulation signal generator.
[0009] Preferably, the radius of the light inlet of the micro spectrometer is smaller than the radial distance between the photosensitive center of the light leakage detection sensor and the main axis of the optical path of the micro spectrometer.
[0010] Preferably, it also includes a mode switching unit connected to the main control chip, used to allow the user to select a detection mode corresponding to the type of sample to be tested, so as to realize the retrieval of the corresponding mode from the parameter lookup table. value.
[0011] A method for operating a handheld spectrometer, implemented according to any of the handheld spectrometers described above, includes the following steps: S1. Press the flexible light-shielding ring of the spectral probe firmly onto the surface of the sample to be tested, triggering the measurement command; S2. With the light source turned off, the main control chip collects the real-time voltage of the light leakage detection sensor at high frequency. S3. The main control chip determines whether the real-time voltage of the light leakage detection sensor exceeds the adaptive alarm threshold based on a preset adaptive alarm threshold. If it exceeds the threshold, it is determined to be a real light leakage, an alarm is triggered, and all subsequent processes are terminated. If it does not exceed the threshold, it is determined to be no light leakage or tolerable diffuse transmission light from the sample. S4. Based on the diffuse transmission light results of the sample that is determined to have no light leakage or is within tolerance, control the micro spectrometer to collect dark field spectral data once as a black correction reference. S5. Control the micro servo motor to drive the rotating arm, and rotate and move the standard whiteboard from the storage position on the side wall of the closed dark chamber to the calibration position above the main optical path of the micro spectrometer. S6. Turn on the light source and control the miniature spectrometer to collect the reflectance spectrum data of the standard white board as a white calibration reference; S7. Turn off the light source and control the micro servo motor to drive the rotating swing arm to move the standard whiteboard to the storage position. S8. Light up the light source again, measure the sample to be tested, and calculate the absolute reflectance spectrum of the sample to be tested using the black correction reference and the white correction reference.
[0012] Preferably, steps S4 to S8 should be completed within 0.2 to 0.5 seconds after the determination is completed in step S3.
[0013] Preferably, the diffuse transmission tolerance variable in the adaptive alarm threshold This is an empirical threshold matrix based on statistical analysis of diffuse transmission light intensity of a large number of similar biological tissues under dark field conditions; the main control chip pre-stores multiple sets of values corresponding to different sample types. Parameter lookup table.
[0014] Preferably, the adaptive alarm threshold is determined according to the following formula: , in, Adaptive alarm threshold; This is the baseline dark-field voltage calibrated by the sensor in a completely dark environment at the factory. This is a diffuse transmission tolerance variable preset based on the optical properties of the sample being tested.
[0015] Preferably, in step S3, if it is determined to be real light leakage, the main control chip sends an enable signal to directly cut off the micro servo motor and the micro spectrometer.
[0016] Compared with the prior art, the handheld spectrometer and its operating method of the present invention have the following advantages: This invention effectively solves the problem that existing fixed threshold methods cannot distinguish between "real physical gap light leakage" and "false light leakage from diffuse transmission in biological tissue" by employing an asymmetric light leakage detection sensor biased at the bonding interface and combined with an adaptive alarm threshold algorithm. It can dynamically tolerate normal diffuse transmission light based on the optical characteristics of the analyte, only triggering an alarm for real light leakage exceeding the tolerance. This significantly reduces false alarms and process deadlocks when detecting specific agricultural products such as navel oranges, greatly improving the success rate and reliability of detection in complex outdoor lighting environments. Furthermore, by storing the standard white board on the dark chamber sidewall outside the main optical path and rotating it to cut into the optical path when needed, a fully automatic, fully enclosed built-in black-and-white calibration function is achieved. This not only solves the miniaturization deployment challenge of the built-in calibration module, but also eliminates the risk of the standard whiteboard being contaminated by dust or samples outdoors, ensuring calibration accuracy and maintenance-free operation throughout its entire lifecycle. Through the logic control of the main control chip, a condition-triggered closed-loop process of "leak detection-calibration-measurement" is constructed, ensuring that dark field calibration, white field calibration, and sample measurement are only performed sequentially after the leak detection is passed. This feedforward interlocking mechanism, which combines hardware and logic, fundamentally eliminates the use of contaminated reference data for calibration and measurement under light leakage conditions, ensuring the accuracy and reliability of the final measured absolute reflectance spectral data, and comprehensively improving the automation level and data quality of handheld spectrometers in complex field environments. Attached Figure Description
[0017] Figure 1 This is a front view of the overall structure in an embodiment of the present invention; Figure 2 This is a left view of the overall structure in an embodiment of the present invention; Figure 3 This is a flowchart of the method in an embodiment of the present invention; Figure 4This is a diagram showing the relationship between the main control chip and various devices in an embodiment of the present invention.
[0018] Explanation of reference numerals in the attached figures: 10. Flexible light-shielding ring; 11. Light leakage detection sensor; 12. Isolation window; 13. Standard whiteboard; 14. Rotating swing arm; 15. Miniature servo motor; 16. Miniature spectrometer; 17. Light source. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0020] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0021] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0022] See Figures 1 to 4 As shown, in order to improve the anti-interference capability of handheld spectrometers working in complex outdoor environments and the accuracy and reliability of the final measurement data, and to solve the problem that the fixed threshold method in the prior art cannot distinguish between the "diffuse transmission false light leakage" of biological tissue and the real physical "gap light leakage", as well as the problem that traditional built-in calibration mechanisms (such as porous turntables) cannot be deployed in the extremely compact space of handheld devices due to their large size, this embodiment provides a handheld spectrometer and its operating method.
[0023] See Figure 1 and Figure 2As shown, the device includes a spectral probe housing, a main control chip, a miniature spectrometer 16, a light source 17, a flexible light-shielding ring 10 for forming a light-shielding seal with the surface of the sample under test, and an isolation window 12 sealed inside the flexible light-shielding ring 10. The flexible light-shielding ring 10 is made of rubber, and the isolation window 12 is made of quartz glass. The isolation window 12 divides the interior of the housing into a contact isolation chamber and a closed dark chamber. The miniature spectrometer 16 and the light source 17 are located in the closed dark chamber, and the light source 17 is a halogen lamp. The device also includes a light leakage detection sensor 11, a miniature servo motor 15, a rotating arm 14, and a standard white board 13. The light leakage detection sensor 11 is asymmetrically offset in the "contact isolation and diffuse transmission capture layer," specifically located in the contact isolation chamber between the inner edge of the flexible light-shielding ring 10 and the isolation window 12, and is used to collect the light signal at the interface between the flexible light-shielding ring 10 and the sample under test. A miniature servo motor 15 is fixed to the side wall of the enclosed dark chamber. Its output shaft is connected to one end of a rotating arm 14, and the other end of the rotating arm 14 is equipped with a standard white board 13. The miniature servo motor 15 is used to drive the rotating arm 14 to rotate in a plane parallel to the isolation window 12, so that the standard white board 13 switches between a storage position that avoids the main optical path of the miniature spectrometer 16 and a calibration position located above the main optical path of the miniature spectrometer 16. The main control chip is electrically connected to the miniature spectrometer 16, the light source 17, the light leakage detection sensor 11, and the miniature servo motor 15, respectively. It is used to compare the real-time sampling value of the light leakage detection sensor 11 with the adaptive alarm threshold, and only when it is determined that there is no light leakage or the light leakage is within the tolerance, it sequentially triggers the miniature spectrometer 16 to perform dark field calibration, triggers the miniature servo motor 15 to drive the rotating arm 14 to carry the standard white board 13 to the calibration position to perform white field calibration, and triggers the measurement of the sample to be tested after the rotating arm 14 returns to the storage position.
[0024] This invention utilizes an asymmetrically biased light leakage detection sensor 11 and a main control chip to compare real-time sampled values with adaptive alarm thresholds. This logic enables diffuse transmission tolerance determination based on the optical characteristics of the tested object, intelligently identifying and tolerating "false light leakage" caused by the sample's own characteristics (such as the diffuse transmission of navel orange peel). This effectively avoids frequent false alarms caused by the optical characteristics of biological tissues, ensuring a smooth detection process. More importantly, this invention constructs a "optical-mechanical-electronic cross-dimensional hardware interlock" closed loop from optical analog quantity sampling to mechanical action execution. The main control chip only triggers subsequent calibration and measurement processes when light leakage is determined to be within the tolerance. This interlock is implemented at the underlying hardware level. Once a genuine light leakage is detected, the enable signal of the subsequent execution unit is directly cut off, fundamentally eliminating the possibility of using contaminated signals for black and white calibration in the presence of genuine light leakage or untolerated "false light leakage." This ensures the purity of the black and white calibration references, making the final calculated absolute reflectance spectral data of the sample accurate and reliable. Meanwhile, the "side-wall concealed micro-rotor arm" structure, composed of a micro servo motor 15, a rotating arm 14, and a standard white plate 13, employs a "non-coplanar space reuse" design. This ingeniously achieves fully automatic, fully enclosed built-in black-and-white calibration within the sealed dark chamber of the micro spectrometer 16. In non-calibration mode, the calibration mechanism achieves zero obstruction and zero volume occupation of the main optical path, resolving the contradiction between the compact space of the handheld device and calibration reliability. The standard white plate 13 is stored sealed on the clean dark chamber sidewall for most of the time, eliminating outdoor dust or sample contamination. Thus, this solution forms a complete closed loop from intelligent leak detection, three-dimensional miniaturized topology, hardware feedforward interlocking to efficient space utilization, significantly improving the automation level, anti-interference capability, and accuracy and reliability of the final measurement data of the handheld spectrometer in complex outdoor environments.
[0025] Furthermore, the adaptive alarm threshold is determined according to the following formula: , in, Adaptive alarm threshold; This is the baseline dark-field voltage calibrated by the sensor in a completely dark environment at the factory. This is a diffuse transmission tolerance variable preset based on the optical properties of the sample being tested. The tolerance variable is not a fixed constant, but rather an empirical threshold matrix extracted through statistical analysis of diffuse light intensity from a large number of similar biological tissues (such as navel orange peels of varying thicknesses) under dark-field conditions. This matrix is specifically designed to absorb and shield false alarms caused by internal light scattering due to the semi-transparency of the sample being tested.
[0026] Furthermore, the rotation center axis of the micro servo motor 15 is parallel and offset to the main optical axis of the micro spectrometer 16. When the rotating arm 14 is in the retracted position, its orthographic projection on the plane parallel to the isolation window 12 has no intersection with the orthographic projection of the light-gathering aperture of the micro spectrometer 16. More specifically, the light-gathering axis of the micro spectrometer 16 is defined as the Z-axis, and the plane where the isolation window 12 is located is defined as the XY plane. In the "retracted position" (i.e., the measurement position), the rotating arm 14 and the standard white board 13 are completely retracted into the dark chamber sidewall away from the Z-axis, and their orthographic projection on the XY plane has absolute "zero intersection" with the projection of the light-gathering aperture of the micro spectrometer 16, ensuring no interference with the main optical path.
[0027] Furthermore, the main control chip includes a high-frequency analog-to-digital converter and a pulse width modulation signal generator; The high-frequency analog-to-digital converter is used to acquire the output voltage of the light leakage detection sensor 11 in real time at a preset frequency to obtain the real-time voltage value. The main control chip will and The logical result of the comparison is used as an enable signal, and based on this enable signal, combined with the output of the pulse width modulation signal generator, low-level hardware logic and operations are performed. When At this time, the enable signal is set to invalid to cut off the drive control of the micro servo motor 15 and / or the micro spectrometer 16 at the hardware level. This constitutes the underlying hardware feedforward interception mechanism of "optical analog direct duty cycle (ADC to PWM)", which, unlike loose software flow control, can achieve physical-level flow lock-up at the moment of light leakage detection (millisecond level) to prevent the generation of invalid data.
[0028] Furthermore, let the radius of the light inlet of the miniature spectrometer 16 be R2, and the radial distance from the photosensitive center of the light leakage detection sensor 11 to the main axis of the optical path of the miniature spectrometer 16 be R1, and satisfy R1>R2. This spatial geometric relationship ensures that the sensor is at the "limited peripheral station" where it can exclusively capture light leakage or diffuse transmission light from the outermost edge, without obstructing the main optical path by 100%.
[0029] Furthermore, the handheld spectrometer of the present invention also includes a mode switching unit connected to the main control chip, used to allow the user to select the detection mode corresponding to the type of sample to be tested, so as to realize the retrieval of the corresponding mode from the parameter lookup table. Value. Multiple sets are pre-stored in the main control chip. Parameter lookup table, for example: "Hard opaque mode" (preset) Extremely small, such as 0.01V), "Regular Thick-skinned Fruits and Vegetables Mode" (preset) Medium voltage, such as 0.15V, suitable for navel oranges and apples), "High transmittance fault tolerance mode" (preset) (A larger value, such as 0.30V), to achieve adaptive tolerance for samples with different optical properties.
[0030] See Figure 3 and Figure 4 As shown, based on the above-described handheld spectrometer design, this invention provides a method for operating a handheld spectrometer, comprising the following steps: S1. Press the flexible light-shielding ring 10 of the spectral probe firmly onto the surface of the sample to be tested, and trigger the measurement command; S2. With the light source 17 kept off, the main control chip collects the real-time voltage of the light leakage detection sensor 11 at high frequency. S3. The main control chip determines whether the real-time voltage of the light leakage detection sensor 11 exceeds the preset adaptive alarm threshold. If it does, it is determined to be real light leakage, triggers an alarm, and terminates all subsequent processes. That is, through underlying hardware logic interlocking, the enable signals to the micro servo motor 15 and the micro spectrometer 16 are directly cut off. If it does not exceed the threshold, it is determined to be either no light leakage or tolerable diffuse transmission light from the sample.
[0031] S4. Based on the diffuse transmission light results of the sample that is determined to have no light leakage or is within tolerance, control the micro spectrometer 16 to collect dark field spectral data once as a black correction reference. S5. Control the micro servo motor 15 to drive the rotating swing arm 14 to rotate and move the standard white board 13 from the storage position on the side wall of the closed dark chamber to the calibration position above the main optical path of the micro spectrometer 16. S6. Light up the light source 17 and control the miniature spectrometer 16 to collect the reflectance spectrum data of the standard white board 13 as a white calibration reference. S7. Turn off the light source 17, and control the micro servo motor 15 to drive the rotating swing arm 14 to move the standard whiteboard 13 to the storage position. S8. Light source 17 is turned on again to measure the sample to be tested, and the absolute reflectance spectrum of the sample to be tested is calculated using the black correction reference and the white correction reference.
[0032] Furthermore, steps S4 to S8 must be completed within 0.5 seconds after the judgment is completed in step S3. In order to achieve a fast and efficient fully automatic measurement closed loop, the judgment completion time is generally set to within 0.2 to 0.5 seconds.
[0033] Furthermore, the diffuse transmission tolerance variable in the adaptive alarm threshold This is an empirical threshold matrix based on statistical analysis of diffuse transmission light intensity of a large number of similar biological tissues under dark field conditions; the main control chip pre-stores multiple sets of thresholds corresponding to different sample types. Parameter lookup table.
[0034] Furthermore, in step S3, if it is determined to be real light leakage, the main control chip directly cuts off the enable signals to the micro servo motor 15 and the micro spectrometer 16 through the underlying hardware logic, so as to intercept and stop all subsequent calibration and measurement processes at the hardware level and prevent the generation of invalid data.
[0035] Based on the aforementioned handheld spectrometer and its operation method, the following case study provides a detailed explanation: Case 1 This case study uses the detection of internal quality (such as sugar content) of navel oranges in an outdoor orchard environment as an example to explain in detail the working process of this invention. The peel of navel oranges has a certain thickness and semi-transparency, and under strong external light, it is prone to significant internal light scattering (i.e., diffuse transmission). This part of the light signal caused by the characteristics of the sample itself will be captured by the light leakage sensor, which is a typical scenario that causes frequent false alarms or even process deadlocks of traditional fixed threshold method equipment.
[0036] This case study uses an STM32 series microcontroller as the main control chip. The user selects the "Regular Thick-skinned Fruit and Vegetable Mode" via a physical button on the device. The main control chip then retrieves the appropriate diffuse transmittance tolerance variable for navel oranges from a pre-stored parameter lookup table. = 0.15V. This is based on the fundamental dark field background voltage calibrated at the factory for the light leakage detection sensor. =0.05V, the system automatically sets the adaptive alarm threshold for the current operation. = 0.20V.
[0037] During use, press the flexible light-shielding ring at the front of the spectrometer firmly onto the surface of the navel orange and trigger the measurement. At this time, the light source remains off, and the main control chip acquires the real-time voltage of the light leakage detection sensor at a frequency of 1kHz through its internal high-frequency ADC unit. .
[0038] Scenario 1 (Genuine Light Leakage): If the irregular surface of the navel orange causes the light-shielding ring to not fit tightly in some areas, creating physical gaps, allowing external sunlight to leak in directly, the sensor voltage may rise rapidly. = 1.25V. Since 1.25V > 0.20V, the system instantly determines it to be real light leakage. At this time, the main control chip not only triggers an audible and visual alarm, but its internal hardware logic AND gate will also directly cut off the PWM enable signal flowing to the micro servo motor and micro spectrometer due to the invalid enable signal, forcibly locking all subsequent calibration and measurement processes at the underlying hardware level, effectively intercepting an erroneous measurement.
[0039] Scenario 2 (False Light Leakage Tolerance): After the user re-presses the probe to ensure a proper fit, strong external light penetrates the orange peel and diffuses within the pulp tissue, forming weak scattered light that is captured by the sensor. = 0.12V. Since 0.12V ≤ 0.20V, the system accurately determines that this signal is a tolerable "false light leakage" (actually normal diffuse transmission of biological tissue), and the leak detection passes. The hardware closed loop is established, and the system automatically executes the following sequence: 1) Control the micro spectrometer to collect dark field spectral data once (black correction); 2) The main control chip outputs a PWM pulse with a specific duty cycle (e.g., 7.5%) to drive the micro servo motor hidden in the side wall of the dark chamber to rotate the rotating arm and the standard white board at its end from the "storage position" to the "calibration position" above the main optical path of the micro spectrometer within about 150 milliseconds; 3) Turn on the light source and control the micro spectrometer to collect the reflectance spectrum of the standard white board (white correction); 4) Turn off the light source and drive the servo motor to retract the arm to its original position; 5) Turn on the light source again to perform formal spectral measurement on the navel orange sample, and calculate the absolute reflectance spectrum of the sample using the aforementioned black and white correction benchmark. The entire process is completed efficiently and automatically within 0.5 seconds, completely solving the problem of frequent measurement interruptions caused by false alarms of "false light leakage" in traditional equipment, and significantly improving the efficiency and reliability of outdoor testing.
[0040] Case 2 This case study uses the detection of pesticide residue extract (placed in a cuvette) in a laboratory environment as an example to illustrate the backward compatibility of this invention with high-precision, non-transparent sample measurement.
[0041] The user injects the liquid sample into a standard cuvette with a transparent bottom and presses the flexible light-shielding ring at the front of the spectrometer firmly against the flat top surface of the cuvette. At this point, the user selects the "rigid opaque mode" via the mode switching unit. The system then invokes the minimum diffuse transmittance tolerance variable preset for this mode. = 0.01V, combined = 0.05V, setting the ultimate leakage protection threshold. = 0.06V. Because the cuvette is made of a rigid, opaque material with a smooth surface, as long as the light-shielding ring fits well, there is almost no interference from diffuse light transmitted from the sample itself. The voltage output by the light leakage detection sensor... It can be stabilized at around 0.05V, which meets the requirements. ≤ conditions.
[0042] After the leak detection is passed, the system automatically triggers the built-in sidewall micro-rotary arm mechanism to perform black-and-white calibration, and then completes the accurate measurement of the sample. This embodiment demonstrates that the adaptive threshold algorithm and the miniaturized calibration structure of "non-coplanar space reuse" of the present invention can not only overcome the pain points of on-site detection of complex biological tissues, but also perfectly adapt to the high-precision and standardized measurement requirements of the laboratory level through mode switching, showing a wide range of application boundaries.
[0043] Compared with existing handheld spectrometers, the handheld spectrometer and method provided by this invention, which features light leakage prevention and built-in black-and-white self-calibration, offers the following advantages through a unique system architecture and collaborative control: 1. It effectively solves the problem of false alarms caused by "false light leakage" in biological tissues, and greatly improves the adaptability and reliability of on-site detection of complex samples.
[0044] This invention can dynamically adjust the alarm threshold based on the optical characteristics of the sample (such as radian transmittance), thereby intelligently identifying and tolerating "false light leakage" caused by the sample's own characteristics, and only alarming for genuine physical light leakage. This fundamentally avoids process interruptions or deadlocks caused by false alarms, enabling the instrument to be stably and reliably applied to the outdoor field testing of various complex samples with semi-transparent properties, such as agricultural products and biological tissues.
[0045] 2. Breaking through the space limitations of handheld devices, it achieves a fully automatic, fully enclosed built-in black-and-white self-calibration function, significantly improving the portability and maintenance-free nature of the instrument.
[0046] This invention employs a "sidewall-hidden" structure, where a miniature servo motor drives a rotating arm with a standard whiteboard, fixed to the side wall of a sealed dark chamber. The direct result is that, in non-calibration mode, the calibration mechanism is completely concealed outside the main optical path, achieving zero space occupation and zero optical path obstruction; during calibration, the mechanism can be quickly screwed into the optical path. This ingeniously integrates a fully automatic calibration module within the extremely compact space of a handheld probe. Simultaneously, since the standard whiteboard is stored in a sealed environment within the clean dark chamber most of the time, outdoor dust and liquid contamination are eliminated, ensuring long-term measurement accuracy and achieving true portability and maintenance-free operation.
[0047] 3. A hardware-level closed-loop condition system from leak detection to calibration was constructed to ensure "feedforward error prevention" and high fidelity in spectral data acquisition.
[0048] This invention establishes a mandatory conditional triggering chain through the configuration of the main control chip, with the execution of built-in calibration actions strictly contingent upon leak detection success. This closed-loop hardware logic of "leak detection-judgment-execution" achieves millisecond-level decision-making and interception. Once actual light leakage is detected, subsequent costly calibration and measurement processes are locked at the underlying level, fundamentally eliminating the possibility of acquiring invalid or low-quality spectral data under leaky conditions. This ensures the reliability and validity of every output data point and reduces the risk of data invalidation due to operational errors.
[0049] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A handheld spectrometer, comprising a spectral probe housing, a main control chip, a miniature spectrometer, a light source, a flexible light-shielding ring for contacting the surface of a sample to form a light-shielding seal, and an isolation window sealed inside the flexible light-shielding ring, wherein the isolation window divides the interior of the housing into a contact isolation cavity and a sealed dark chamber, and the miniature spectrometer and the light source are disposed in the sealed dark chamber, characterized in that, Also includes: Light leakage detection sensor, miniature servo motor, rotating swing arm, and standard whiteboard; The light leakage detection sensor is asymmetrically biased and disposed in the contact isolation cavity between the inner edge of the flexible light shielding ring and the isolation window, and is used to collect the light signal at the interface between the flexible light shielding ring and the sample to be tested. The micro servo motor is fixed to the side wall of the enclosed dark chamber, and its output shaft is connected to one end of the rotating arm. The other end of the rotating arm is provided with the standard white board. The micro servo motor is used to drive the rotating arm to rotate in a plane parallel to the isolation window, so that the standard white board switches between a storage position that avoids the main optical path of the micro spectrometer and a calibration position located above the main optical path of the micro spectrometer. The main control chip is electrically connected to the micro spectrometer, light source, light leakage detection sensor, and micro servo motor, respectively. It is used to compare the real-time sampling value of the light leakage detection sensor with the adaptive alarm threshold, and only when it is determined that there is no light leakage or the light leakage is within the tolerance, it sequentially triggers the micro spectrometer to perform dark field calibration, triggers the micro servo motor to drive the rotating arm to carry the standard white board to the calibration position to perform white field calibration, and triggers the measurement of the sample to be tested after the rotating arm returns to the storage position.
2. A handheld spectrometer according to claim 1, characterized in that, The rotation center axis of the micro servo motor is parallel to and offset from the optical path main axis of the micro spectrometer.
3. A handheld spectrometer according to claim 1, characterized in that, The main control chip includes a high-frequency analog-to-digital converter and a pulse width modulation signal generator; The high-frequency analog-to-digital converter is used to sample the output voltage of the light leakage detection sensor in real time at a preset frequency to obtain the real-time voltage value. ; The main control chip is used to... and The logical result of the comparison is used as an enable signal, and the underlying hardware logic and operation are performed based on the enable signal and the output of the pulse width modulation signal generator.
4. A handheld spectrometer according to claim 1, characterized in that, The radius of the light inlet of the micro spectrometer is smaller than the radial distance between the photosensitive center of the light leakage detection sensor and the main optical axis of the micro spectrometer.
5. A handheld spectrometer according to claim 1, characterized in that, It also includes a mode switching unit, connected to the main control chip, for allowing the user to select the detection mode corresponding to the type of sample to be tested, so as to realize the retrieval of the corresponding mode from the parameter lookup table. value.
6. A method for operating a handheld spectrometer, implemented according to any one of the handheld spectrometers described in claims 1-5, characterized in that, Includes the following steps: S1. Press the flexible light-shielding ring of the spectral probe firmly onto the surface of the sample to be tested, triggering the measurement command; S2. With the light source turned off, the main control chip collects the real-time voltage of the light leakage detection sensor at high frequency. S3. The main control chip determines whether the real-time voltage of the light leakage detection sensor exceeds the adaptive alarm threshold based on a preset adaptive alarm threshold. If the limit is exceeded, it is determined to be a real light leak, an alarm is triggered, and all subsequent processes are terminated; if the limit is not exceeded, it is determined to be no light leak or to be a tolerable sample diffuse transmission light. S4. Based on the diffuse transmission light results of the sample that is determined to have no light leakage or is within tolerance, control the micro spectrometer to collect dark field spectral data once as a black correction reference. S5. Control the micro servo motor to drive the rotating arm, and rotate and move the standard whiteboard from the storage position on the side wall of the closed dark chamber to the calibration position above the main optical path of the micro spectrometer. S6. Turn on the light source and control the miniature spectrometer to collect the reflectance spectrum data of the standard white board as a white calibration reference; S7. Turn off the light source and control the micro servo motor to drive the rotating swing arm to move the standard whiteboard to the storage position. S8. Light up the light source again, measure the sample to be tested, and calculate the absolute reflectance spectrum of the sample to be tested using the black correction reference and the white correction reference.
7. The operating method according to claim 6, characterized in that, Steps S4 to S8 must be completed within 0.2 to 0.5 seconds after the determination is completed in step S3.
8. The operating method according to claim 6, characterized in that, The diffuse tolerance variable in the adaptive alarm threshold This is an empirical threshold matrix based on statistical analysis of diffuse transmission light intensity of a large number of similar biological tissues under dark field conditions; the main control chip pre-stores multiple sets of values corresponding to different sample types. Parameter lookup table.
9. The operating method according to claim 6, characterized in that, The adaptive alarm threshold is determined according to the following formula: , in, Adaptive alarm threshold; This is the baseline dark-field voltage calibrated by the sensor in a completely dark environment at the factory. This is a diffuse transmission tolerance variable preset based on the optical properties of the sample being tested.
10. The operating method according to claim 9, characterized in that, In step S3, if it is determined to be real light leakage, the main control chip sends an enable signal to directly cut off the micro servo motor and the micro spectrometer.