1 Introduction

BMI is used to calculate body fat, and its value provides information about patients' risk for diseases due to over mass and obesity. Obesity is identified as a cause of risk factor for many non-communicable diseases, such as diabetes, blood pressure, hypertension, cholesterol, triglycerides, and insulin resistance [1,2,3,4,5,6,7,8,9,10,11,12]. The higher BMI value also increases the risk of cancer of the breast, colon, prostate, endometrium, kidney, and gall bladder [13]. Mortality rate increases with increasing degree of over mass, as the measured value of BMI. All over the world, as per World Health Organization (WHO) report, around 2.8 million people die each year due to over mass or obesity. An estimated 35.8 million people (2.3%) of global disability-adjusted life years (DALYs) are caused by over mass or obesity. Apart from the over mass, under mass is also the reason for malnutrition, vitamin deficiencies, anaemia, osteoporosis, a decrease in immune function, growth, and development issues particularly in children and teenagers. In India, children under the age of 5 years, more than 30%, are suffering from malnutrition which is very high [14,15,16,17]. In most of the countries, BMI measuring system is used to identify a person having under mass or over mass. It is widely used due to its fast response and ease of operations. As per WHO recommendation, based on BMI value nutritional status of adults is categorized in Table 1.

Table 1 BMI value for adults as per WHO recommendation [18]

Recently, it is reported that the obese person has a higher risk factor of COVID-19, bacterial and viral pneumonia, acute respiratory distress syndrome (ARDS), and acute respiratory failure after lung transplantation. In some of the studies, it is reported that obesity is more common among patients who require hospital admission for COVID-19, that it may be associated with an increased risk for death. Early reports also suggest that diabetes, hypertension, and cardiovascular disease are associated with invasive mechanical ventilation and death in COVID-19 [19,20,21,22,23,24,25]. In the USA, around 42.4% adult population is obese, and out of that 9.2% are severely obese. The Centers for Disease Control and Prevention lists severe obesity at any age that means a patient having BMI ≥ 40 kg/m2 has a high risk of the condition being affected by COVID-19. Given the high prevalence of obesity, the potential effect of COVID-19 in the US population is higher [26,27,28]. Therefore, it is essential to monitor the BMI of every person and those who are suffering from obesity. It is advisable for these people to take extra precautions and prevention from the COVID-19 in this pandemic time [29,30,31,32,33,34,35,36]. The developed system measures BMI with high precision and accuracy as compared to existing systems [37,38,39,40]. In case of India, the under mass issue is normally applicable for the people below the poverty line where the nutrient and healthy food availability is not always adequate or enough.

The main objective of the present study was to work toward finding the suitable mean for precise, accurate, cheaper, ease in operation and ‘Made in India’ medical device to regularly monitor the vital health parameters of the patients, the high-risk users, and even for the healthier people as a preventive measure. This has more relevance in the current humongous COVID-19 situations. This has motivated us to design and develop an improved, indigenous, and low-cost BMI measuring system. It also provides a simple, fast, and low-cost health assessment of the vital parameters to the users and stakeholders.

2 Working Principle

In the present investigation, the height of an object/person is measured using an ultrasonic sensor (40 kHz). To measure the height, a transmitter is used to transmit ultrasonic waves, which are reflected from the object. The reflected waves are received using a receiver. The time delay between the transmitted and received waves is measured using a microcontroller (ATmega 328). The ultrasonic sensor (HC-SR04) is used in the development of the BMI measuring system which works on the principle of the pulse-echo method of ultrasonic. In the pulse-echo method, ultrasonic pulse is transmitted and when an object comes into its path echo is generated. This echo is received by the receiver of the ultrasonic sensor. So, the distance travel by the ultrasound pulse becomes 2d. Temperature-compensated ultrasonic velocity is determined using Eq. (3). Then, temperature-compensated distance is determined as:

$$ d = \frac{{c\left( T \right) \times t_{d} }}{2} $$
(1)

where d is the height between the platform and the sensor, c(T) is the temperature-compensated ultrasonic velocity in air, and td is the time delay between transmitted and received waves.

The working principle of the ultrasonic distance measurement is graphically depicted in Fig. 1. The ultrasonic velocity in air is found to vary with changes in air temperature. Therefore, any change in the prevailing environment temperature around the place of use of the device will have a significant effect in the measured height. To compensate the effect of temperature in height measurement, a temperature sensor (LM-35) is used. The four load cell sensors, commercially available, have been used to measure the mass precisely. The load cell converts the mass into the form of the electrical signal which is appropriately amplified and displayed. In the developed BMI system, four load cells are mounted beneath a flat platform. The object/person under test is placed /used to stand on the platform. Normally, the placing or standing positions of the object/person are not uniform for providing the equal distribution on load cells. Therefore, the use of four strain gauge-based load cells addresses this issue amicably. The stress or mass generates an electrical output of the load cell is interfaced with a 24-bit analog-to-digital converter (ADC) to achieve higher resolution, and this ADC module is interfaced with a microcontroller which provides the precise value of the mass on a large liquid crystal display (LCD).

Fig. 1
figure 1

The working principle of the ultrasonic sensor along with the timing diagram

3 Design and Development Aspects

A simplified block diagram and the photograph of the developed BMI measuring system are shown in Fig. 2a and b, respectively. The BMI measuring system is comprised of an ultrasonic sensor (HC-SR04), four strain gauge-based load cell sensors, an Arduino development board, a temperature sensor (LM-35), a 24-bit analog-to-digital converter module, and a large (2 × 16 character) (LCD). The ultrasonic sensor has been used to measure the height. The ultrasonic sensor has four pins for interfacing with the microcontroller. Accordingly, the four pins, namely Vcc, Trigger, Echo, and Ground, were interfaced with the microcontroller. The ultrasonic sensor module triggers (connected at digital pin-8 of the microcontroller) the 10 µs pulse and then it transmits the eight cycles of sonic burst which is reflected back when any object comes in the range of its path as shown in the timing diagram in Fig. 1. The echo of the ultrasonic wave is received on the echo pin which is interfaced on the digital pin-9 of the microcontroller. The time delay between the transmitted and received waves is measured using microcontroller. The distance between the ultrasonic sensor and object is determined using Eq. (1). The height of the person (h in m), the difference of the distance between the ultrasonic sensor and platform (d in m), and the distance between sensor and person (y in m). Then, the height of the person h is determined using

$$ h = d - y $$
(2)
Fig. 2
figure 2

a Block diagram of the developed BMI system. b Snap of the developed BMI system when the BMI measurement had performed

The ultrasonic sensor is operated at + 5 V. For the mass measurement, four strain gauge-based load cells have been used. As load cell generates the electrical output in the order of mV, its analog electrical output is converted into digital by using a 24-bit ADC module (HX-711) which finally provides measured values of mass in kg. As mentioned earlier, a temperature sensor (LM-35) is used to compensate the temperature effect in height measurement. The liquid crystal display (LCD) is interfaced with the microcontroller using a four-wire data communication protocol which is used to display the height, mass, and calculated BMI of an person.

The programming of the BMI device is done in the Arduino Integrated Development Environment (IDE). The flowchart of the developed BMI measuring system program code is shown in Fig. 3.

Fig. 3
figure 3

Flowchart of the developed algorithm for BMI measuring system

4 Result and Discussion

For the temperature compensation in the height measurement, the value of ultrasonic velocity as 347.1 m/s (at 25 °C and 50% relative humidity) measured experimentally as well as reported in the literature [41] has been programmed for height measurement [42]. A linear relationship between ultrasonic velocity and temperature is shown in Eq. 3.

$$ c\left( T \right) = 0.622*T + 330.96 $$
(3)

where \(c\left( T \right)\) is the temperature-compensated ultrasonic velocity in m/s and T is temperature in °C. A linear relationship is also obtained between temperature-compensated ultrasonic velocity and the temperature at 50% RH as shown in Fig. 4. Figure 4 clearly shows the evidence for dependence of ultrasonic velocity on environmental conditions. The uncertainty in the height measurement without temperature correction is 2.8 mm (at k = 2) while measuring the height of 738 mm with a temperature variation well within 0.5 °C.

Fig. 4
figure 4

The variation of the ultrasonic velocity with temperature

Fig. 5
figure 5

Comparison of measured height using developed BMI system with and without temperature compensation

The experimental data obtained on the height measurement as a function of temperature as well as without temperature are shown in Table 2. The linear relationship between height measurement with temperature correction and temperature is as follows:

$$ {\text{Height }}\;{\text{in}}\;{\text{ mm}} = 0.2{ }\left( {{\text{Temperature}}\;{\text{ in}}\;^{ \circ } {\text{C }}} \right) + 737.53. $$
(4)
Table 2 Experimental data of height measurement using developed BMI system with temperature compensation and at fixed temperature

The linear relationship between height measurement at fixed temperature, e.g., 25 °C and temperature is as follows:

$$ {\text{Height }}\;{\text{in}}\;{\text{mm}} = 0.88{ }\left( {{\text{Temperature}}\;{\text{ in}}\;^{ \circ } {\text{C}}} \right) + 731.66 $$
(5)

In the linear fitted Eq. (4), the slope is 0.2 which shows that as temperature increases the measurement of height is changed, while in the linear fitted Eq. (5), the value of the slope is significantly higher as compared to Eq. (4), e.g., 0.88 which significantly shows that variation in height measurement is more as compared to Eq. (4) as shown in Fig. 5. This variation in the height measurement comes due to temperature. Therefore, the developed BMI measuring system compensates the temperature effect in height measurement and measures accurate BMI value.

For the testing and performance evaluation of the device, the BMI is measured for a sample set of six persons in the laboratory, and measurements were repeated at least 5 times on each person to calculate the BMI manually. The BMI values obtained using the present system are in close agreement with the values calculated manually as shown in Fig. 6. The maximum variation in the measured BMI value is found to be 0.5 kg/m2 (Table 3).

Fig. 6
figure 6

Comparison of BMI values between developed device and manual calculated

Table 3 The measured value of the BMI using the developed system and manual calculated

5 Conclusion

A simple, low cost and indigenous digital BMI measuring system is designed and developed. The developed system is capable to measure and altogether the values of vital health parameters of a person under test related to height with a resolution of 0.01 m in the range (0–4) m; mass with a resolution of 0.01 kg in the range (0–200) kg; and BMI value with a precision of 0.01. The unique design provides the temperature-compensated height measurements which are first time made available in the present system. The expanded measurement uncertainty associated with height measurement is estimated as 2.8 mm which improves the overall precision of the BMI value to 0.01. The developed system would be highly useful for the hospitals, private medical practitioners, sports associations, and other stakeholders as a low cost and quick solution for assessment of vital health parameters of individuals or community purpose and accordingly planning for the next course of action.