Development of Noncontact Height Measurement Device Fabricated Using Microcontroller HT 46 R 232 as Foundation

This study presents a low-cost, extremely practical, and easy-to-operate composite instrument for measuring height. This instrument uses the level-, distance-, and heightmeasuring devices typically employed in construction works for further integration. Because most instruments used in construction and architecture are expensive and have only single functions, the system developed in this study combines laser modules, ultrasonic sensors, inertial sensors, and an HT46R232 microcontroller. We also used SolidWorks to design a multifunction construction measurment device that can measure distance and level, and measure height by a noncontact method. This system adds the tangent theorem of trigonometric functions to the microcomputer controller for height calculation. Experimental verification indicated that this system can use sensors to obtain correlation coefficients for measuring height. The tangent theorem of trigonometric functions was used to measure object height. This facilitated noncontact height measurements in the microcomputer controller. Measurement system analysis (MSA) was employed to verify that the measurement system adheres to the QS9000 measurement system specifications.


Introduction
In construction works, few tools exist for measuring height.Commonly employed measuring tools include tape measures and handheld tape measures.Their curl makes measuring height difficult.Therefore, they lack convenience of use.This often forces construction projects to use expensive laser rangefinders as measuring tools.Additionally, construction must not lack level calibration instruments.Whether the construction design is level or not, it influences the household quality of life.It also highly correlates with the interior and exterior appearances of a building.Among the numerous types of level measuring device, the line laser measuring level instrument is the most maneuverable level measuring instrument and marking device for on-site use.Differentiated by functionality, a number of laser level measuring devices have internal automatic level correction or calibration functions.These laser ink lines can project both level and vertical ring lasers at 180 or 360°.Therefore, line laser level measuring devices are extremely accurate and maneuverable.For interior design, they are indispensable for level measuring and marking devices.Their cost is generally higher than that of conventional devices.Line laser level measuring devices with complete functionality typically cost over ten thousand dollars (NTD).However, this system costs about six thousand dollars (NTD).

Ultrasound applications
The scope of ultrasound applications is extremely broad ranging from basic environmental sensing and ultrasonic cutting to medical applications.In applications of extended time-frequency domain average to ultrasonic detection, (1) specific objects or points can be continuously measured and followed.Ultrasound can also be used at fixed rates in air to determine the gas composition in air. (2)Monitoring can be performed at specific sites to ensure environmental and public safety.Ultrasound is most frequently applied to sensors for robots and automated vehicles. (3)The reason ultrasound modules are included in robots and automated vehicles is that it enables them to sense the distance of obstacles.Ultrasound is also used to sense a specific area and establish an environmental map.The various applications of ultrasound are shown in the table below.

Inertial accelerometer applications
Inertial sensors have a wide range of uses today.They can be categorized on the basis of their various processing methods as piezoresistive, piezoelectric, capacitive, thermal, or tunneling accelerometers. (4,5)Inertial sensor micro-electromechanical systems (MEMS) devices are used most successfully in automobiles.When a moving or static vehicle collides or falls, the inertial sensors immediately sense the dramatic changes and deploy airbags.This is the most successful commercial application. (6)A number of navigation companies have added inertial sensors to their products.When equipment cannot obtain a global positioning system (GPS) signal, the inertial sensors can be used to sense moving information and provide signals to navigation equipment to complement and supplement the GPS signal errors. (7,8)Accelerometers can also be embedded in or on the human body (9) to record statistical information of various activities in daily life.These data can be used to provide human metabolic consumption data estimates or to care for patients. (10)They are convenient for long-term monitoring and do not affect patients' daily activities.Accelerators and electromyography (EMG) devices are used to assess gestures. (11)They can also be used for playing games or placed into pens. (12)Wireless transmission systems in the pen combine written numerical data and neural networks to increase the sensor recognition rate of handwritten digits or numbers.Seismic piezoelectric accelerometers can be designed to monitor tremors. (13,14)Table 1 shows these applications.

Height calculation methods
In this study, we used the tangent theorem of trigonometric functions for computation.Then, we designed a method of measuring the distance between any two points.Parameters such as elevation angle and bottom edge length were obtained and matched with those obtained using tangent theorem eq. ( 1) to derive eq. ( 2).These were inputted into the microcomputer controller to calculate height.Figure 1 shows the height measurement schematic.This measurement method is usually performed using optical measurement instruments.In this study, however, we used laser point sensors and inertial accelerometer sensors to determine angle parameters, and used ultrasound ranging to obtain bottom edge length.The values obtained were then used to calculate height.
compiled into where θ is an elevation angle, x the bottom edge length, and y the height.The building height measurement is divided into a top triangle and a bottom triangle.The height of the top triangle is first calculated using eq.( 3): ( The height of the bottom triangle is then calculated using eq.( 4): Finally, the two calculated heights Y 1 and Y 2 are summed to obtain the height of the building.
Today, there are many test methods, with at least four experimental methods: the trialand-error method, a one-factor experiment, full factorial experiment, Taguchi method (15) and measurement system analysis (MSA).After the comparison, MSA was found to be more suitable for this system examined.

System architecture
Figure 2 shows the system architecture.The HT46R232 microcontroller provides 8-channel 10-bit resolution A/D conversion input.This is used to monitor accelerometer analog signals.The pulse width measurement mode function in the timer is used to monitor the ultrasonic ranging module return pulse width.The I/O port is used as a channel for an LCD to display signal transmission.Users similarly employ the I/O port as a channel for button control of signal transmission.
Figure 3 shows the equipment architecture.The front of the device contains two line laser modules.After adjusting the mechanism to a level position, it was used to project horizontal or level and vertical line laser markings.The top of the device comprises a physical bubble level measuring apparatus.This was used as a simple basis for nakedeye observation of the level.The inertial sensor, which measured the level and the angle with respect to the level, and the dot laser were located in the same component.This component was for measuring the level and also primarily employed the point laser as the target-marking point in later procedures.Additionally, the angle between the marking point and the level was also measured.The ultrasound module and the inertial sensor were placed at the same level.In addition to using the dot laser for measuring the distance of the point from the target, the primary reason behind this process was to accommodate the mechanism design during height measurement.The device also contained an LCD module.This module was a 4 × 20 words display screen.

Height calculation process
During the measurement process, the ultrasound continued distance measurements for the test plane.After users adjusted the angle to the required value, the button control was employed and the microcomputer controller substituted the measured distance and angle statistics into the tangent theorem for computation to perform the first part of triangle height calculations.The angle flag was set on the basis of whether the angle was positive or negative.This angle flag was then used for comparison to determine whether the angle flag of the triangle height in the second part was positive or negative.The number flags were summed.The calculated height was then displayed on the LCD screen.The second button confirmation calculated the triangle height for the second part, similarly indicating whether the angle was positive or negative on the angle flag.The number flags were again summed.When the confirmation button was pressed again, the microcontroller judged this as the third measurements on the basis of the number of flags, and the final height calculation was performed.At this time, the microcontroller compared the angle flags from the first two height calculations.When the angle flags are similarly positive or negative, the triangle heights from the first and second parts are summed.By contrast, when the angle flags have opposing signs, the system determines whether the triangle height is larger in the first part or in the second part.Subtraction is then performed.With this simple operation control, the height between any two points of a vertical line on a test plane can be obtained.

Experimental verification
In the height measurement test, the test object was a planar object with a height of approximately 51 cm.After placing the main body of the device at a level position, the inertial sensor component was adjusted to a level position.During the first step, we aligned the laser point with the top of the tested object, which indicated that the distance from the level to the top was 48 cm, as shown in Fig. 4. The laser point was then aligned to the bottom of the test object, which showed that the height from the level to the bottom was 3 cm.Finally, we obtained an actual height measurement of 51 cm, as shown in Fig. 5.After understanding the height measurement method, we began to perform height measurement tests under various conditions.First, we performed top-triangle height measurements of objects of the same height at various distances (Fig. 6).We performed the bottom triangle height test at various distances from objects of the same height (25 cm).Then, we used the top-triangle and bottom-triangle height measurements to measure height at various distances.
To analyze this measurement system more precisely, we performed MSA (Fig. 7).Three persons measured objects with heights of 50, 100, 150, and 200 cm.The sampling and analysis results were as follows: The data sheet indicates that R-bar average = 2.875; X-bar diff (max XBAR − min XBAR) = 1.0415; and R p = 153.333.Reproducibility (E v ) is the variability due to the measurement apparatus, as shown below.
Reproducibility (A v ) is the variability due to persons performing the measurement, as shown below.
Reproducibility and reproducibility (R&R) can be calculated as follows: Partial variation (V P ): Total variation (V T ):   We performed P/T value calculations.Table 2 shows what the P/T values represent.= × 100 = 3.648% P V P T V T (10) QS9000, ISO9001, and ISO9002 are quality management systems.As shown in Table 2, the P/T value of the height-measuring instrument developed in this study was less than 10%.This confirms that the measurements provided by the height-measuring instrument developed in this study are acceptable in QS9000.

P/T value range Assessment results < 10%
Measurement system is acceptable 10 to 30% Possibly acceptable, depending on the company > 30% Unacceptable, reasons must be assessed and improved

Conclusions
The experiment confirmed that the tangent theorem of trigonometric functions can be used to calculate height.However, although ultrasonic ranging modules are convenient for distance measurements, they are restricted by their characteristics and cannot measure objects smaller than 1 cm.Additionally, inertial sensors can be used to calculate the linear range of angles and the accuracy limit, which further restricts the height measurement range and accuracy.Therefore, these devices cannot carry out height measurements more accurately.Although they can perform noncontact height measurements, the measurement results are still slightly different from the actual height.The factors influencing these errors are listed below.
(1) During ranging with ultrasonic modules, distances can only be measured at the centimeter level, not the millimeter level.Thus, the millimeter accuracy of the measured results is insufficient.Distances measured only in centimeters indirectly lead to errors in height calculation results.(2) The tanθ angle can reach only single digits and the HT46R232 instruction space is insufficient to express beyond the first decimal point.Therefore, inertial accelerometers can measure the angle with the level in only single digits and not decimal points.This leads to errors in the calculation results.(3) In the mechanism design, the swing angle was changed manually.This manual operation method still results in errors, regardless of whether the same object height is used every time.(4) Although we used SolidWorks for mechanism design, its size still led to errors during manufacturing.This software created a gap between the program and the mechanism design, resulting in slight disparities in the measured heights.

Fig. 4 (
Fig. 4 (left).Top laser marking of test object and device display.Fig. 5 (right).Bottom laser marking of test object and device display.

Table 1
Inertial sensor applications.