## 4 Measurement  
The measurement was performed with an ultrasonic level sensor with a measurement range of 20-100 mm and a temperature range of 0-150 \({}^{\circ}\)C. The measurement frequency of the sensor is 10 measurements per second. The transverse resonant frequency of the piezo element, which has a value of 10 MHz, is used to excite the ultrasonic signal. Ultrasonic measurement was driven by a Renesas RL78/F13 CPU. The sensor that was tested was driven by a CPU with the experimental circuit described later on, and was mounted inside the test machine for level measurement accuracy testing. The test machine allows to fix the motor oil level and temperature, so it is a proper instrument for the requested experiment. In this study, the synthetic motor oil Shell Helix Ultra Professional AF 5W-30 was used. The measurement was performed by following motor oil levels and temperatures; see Table 1.  
The test machine was used only for modification of the temperature and motor oil level. The sensor was connected to the oscilloscope and via an oscilloscope to the PC that was equipped with the developed measurement software. Measurement data contained 3000 rows, so every row represented an individual measurement under defined conditions. All measurement data had a CSV format. The maximum height of the reference surface is given by the requirements for the construction of the sensor and the minimum measurable height of the oil level. The sensor is placed at the bottom of the oil pan. It must be ensured that the reference surface is always immersed in oil. From the point of view of accuracy, it is advantageous to have the reference surface as far as possible from the source of the ultrasonic signal, i.e., the piezo element. The ultrasonic sensor is designed to measure the motor oil level. It has a reference height to determine the exact value of the speed of sound. The measurement principle is based on ultrasonic reflection from the reference surface and level surface. The reason why the reference level measurement supplements the oil level measurement is mainly related to the actual physical and chemical parameters in the measured oil bath, where the response rate directly depends on these parameters. The speed of sound is changing rapidly based on the temperature of oil and its quality. For that reason, we are using the reference for precise sound measurement speed as we cannot predict the quality changes inside oil during its lifetime. The ultrasonic sensor construction and measurement principle are shown in Figure 3. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Variable** & **Unit** & **Measurement Points** \\ \hline Motor oil level & mm & 20; 30; 40; 50; 60; 70; 80; 90; 100 \\ Temperature & \({}^{\circ}\)C & \(-\)10; \(-\)5; 0; 35; 50; 70; 95; 130 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Overview of measurement conditions. Ultrasonic pulse handling is driven by the CPU. The electronics for ultrasonic pulse handling contain an experimental circuit that is based on ultrasonic pulse energy saturation, which creates a logical value for the CPU. The principal solution for this circuit is shown in Figure 4 and it consists of:  
* **MCU** --Generates a PWM signal, five pulses in total. The MCU output switches a transistor, the signal is in the range of 0-V\({}_{cc}\) and V\({}_{cc}\)-0. * **Duplexer and Resonator--The circuit contains a filter with coils that provide resonance at 4 MHz. * **Amplifier--A simple transistor amplifier with variable gain. * **Detector--Detects the 4 MHz envelopes of the ECHO signal. * **Low-pass filter--Eliminates high frequencies from the signal for better readability of ECHO signals. * **Shaper--Detects ECHO signals using a transistor and threshold and connects V\({}_{cc}\) to the output at that moment. * **MCU--The MCU detects the signal from the shaper, measures the length of the pulses and their number, and sends the data via UART to the LabView application. **  
For this study, measurement was performed using the oscilloscope Keysight MSO-X 2024A.