Development of a Depth Sensing Device and a Utility Software for a Dynamic Penetrometer

A system for sensing depth of penetration of a dynamic penetrometer was developed. It contained an ultrasonic distance sensor working together with a microcontroller capable of sensing and recording distance of penetration and field data necessary for the construction of the penetration resistance (PR) profile. The system was equipped to the conventional dynamic penetrometer of the Department of Soil Science, Kasetsart University at Kampangsan. The depth sensing system was found to work properly. Depth validation by means of t-test yielded t value of 0.1713 as compared to 0.9800 of t-table under two-tailed test. In addition the RMSE and the MAPE values were 1.2625 and 3.3473 %, respectively. Validation test on depth of penetration showed satisfactorily insignificant difference between depths read by the invented device and by standard measurement. A computer program for manipulating field data for PR calculation was constructed. The program was written in Microsoft Visual Basic and imbedded into Microsoft Excel spreadsheet capable of accessing the field data being recorded in an SD card of the ultrasonic distance sensing system. The data was manipulated by means of a user interface that enabled the user to construct the PR profile with ease.


Introduction
The dynamic penetrometer developed by the Department of Soil Science, Kasetsert University at Kampangsan, Thailand, is a robust and reliable device (Verasan et al., 2006).However, there are some drawbacks during measurement; for an instance, the user has to manually read the scale of depth of penetration marked on penetrometer shaft in an uncomfortable manner since the scale mark is only few centimeters above the ground.In addition, in practice 2 persons are required to operate the device; while one works on the hammer the other reads the scale and records data.Moreover calculation following field data acquisition is time-consuming even though the spreadsheet software is at hand.Such drawbacks pointed that improvement of the device performances to achieve automatic reading of penetration depth as well as automatic recording of the data essential for force and pressure calculations are necessary.The improvement of the device performances also extended to the construction of a computer program capable of handling field data being recorded to generate the soil penetration resistance profile so that the user can further manipulate the result of soil strength with ease.Apairee (2005) reviewed the formulae proposed by several researchers to calculate the resisting force of the soil in response to impulsive force of the dynamic penetrometer developed by the Department of Soil Science.She suggested that the formula proposed by Stolf and Reichardt (2005) as shown in equation (1) gave the correct results.
In this equation m 1 and m 2 are masses of the hammer and the penetrometer, respectively, h is the dropping distance, S is the depth increment of the probe per blow, and g is gravity.The penetration resistance (PR) of the soil in pressure unit can then be calculated from (1) as: Where A is the cone base area.Wongsawat ( 2011) made a comparative study on the penetration resistance profile measured with the static penetrometer Daiki-rica model DIK 5500-SR2 and the dynamic penetrometer of Soil Science Department.The tests were done in the field on adjacent sites at several locations using 1 and 2 kg hammers and falling distances of 30 and 50 cm.The author used equations ( 1) and ( 2) to calculate force and penetration resistance, respectively.The prototype of commands were written and imbedded in Microsoft excel spreadsheet to help user to make PR profiles.It was concluded that the two devices under different methods of measurement yielded the same PR profiles at the same site.Kees (2005) also made a comparative study on measurement of PR profile using static penetrometers from 3 companies; Rimic CP40, Eijkelkamp Penetrologger, and Spectrum Field Scout SC-900 as well as a dynamic penetrometer.The first 3 devices measured resistance force with load cells and penetrating depth by ultrasonic distance sensors.The author reported that different devices measured the same PR profiles.
The objectives of this study were to develop an ultrasonic distance measurement system connected to the microcontroller to monitor the depth of penetration of the dynamic penetrometer and record the data in an SD card and also to develop a computer software that can access the stored data in the memory card, making calculations and generating the PR profiles via a user interface.

Calibration of the Ultrasonic Module
An ultrasonic module HC-SR04 (Figure 1) operated at a frequency of 40 kHz was used.It requires power supply DC 5V, 15 mA current, and measurement range of 2-200 cm can be attained.The ultrasonic sensor module is designed to work in collaboration with a microcontroller.It emits ultrasound wave at a frequency of 40 kHz and receives the reflected wave and sends back a signal to the microcontroller to record time of flight.The distance between the sensor and the sound reflector is then calculated by the microcontroller using an equation: Where s is the distance between the ultrasonic sensor module and the sound reflector, v is the velocity of sound in air (340 m/s) and t is the time of flight.The command program was written to instruct the microcontroller to perform sequential interactive operations as follows; 1) As soon as the user turns on the power switch, the SD card module opens a new data file with the running number up to the maximum of 100 files.The program assigns the first counting number for blow as -1 in order that the first press on the momentary switch (blow No. 0) is used as the reference distance.The depth of penetration is calculated by subtraction of the followed distance measured from the reference distance.
2) To start the measurement the user puts sound reflector in place on penetrometer shaft and the microcontroller reads the time of flight of sound wave and calculates the distance between the sensor and the sound reflector every 25 ms.
3) Before the first blow right after placing the sound reflector in place on the shaft, the distance will appear on the monitor by the command in 2).The microcontroller halts further execution, waiting for the user to press the momentary switch as an instruction to save the blow number 0 and the reference distance.
4) The user commits the first blow and so on and presses the momentary switch after each blow.The data on distances and numbers of blow are recorded sequentially until the final depth is reached (about 100 cm of penetration).The user turns off the power switch to close the current file.

Depth of Penetration Validation Test
Validation test on depth of penetration was done in the fields in three locations of different soil hardness.The actual distance was read manually from the scale marked on penetrometer shaft in accordance with the recording distance.After field operation ended, the data were analyzed for the difference between the means by t-test method (Rowell, 1994).The data comprised of 387 total observation points.Also the point-to-point error of measurement was calculated by means of Root Mean Square Error (RMSE) (Van Donk et al., 2004) and Mean Absolute Percentage Error (MAPE) (Makridakis, 1993) as shown in equations ( 4) and ( 5), respectively: Where n is the number of observation, and are the observed and the predicted values, respectively

Development of a Computer Program to Access the Data in SD Card and to Construct a PR Profile
A computer program was written in Microsoft Visual Basic and imbedded in Microsoft Excel spreadsheet to execute the following operations sequentially; 1) Accessing data file in the SD card.
2) Calculating the depth of penetration by subtracting the recorded distance for each blow from the reference distance read before the first blow (i.e. at blow number 0) 3) Calculating the depth of penetration per blow (S in equation 1) for every 2.5 cm interval till the final depth, then compute resistance force and penetration resistance (PR) of the soil from equations ( 1) and ( 2), respectively.
4) Drawing the PR profile showing variation of PR with soil depth.

Calibration of the Ultrasonic Distance Sensor
The result on calibration of ultrasonic sensor was presented in Figure ( 8).    3).Then it transforms the calculated distance to the correct distance by using equation ( 6).The process continues in loops repeatedly every 25 ms waiting for the user to switch on the momentary switch, by then x is not equal to zero, the microcontroller then adds one count to the total number of blow and records the current number of blow together with the corresponding distance in the created file in the SD card.

Depth of Penetration Validation Test
Result on validation test of penetrating depth in the field was presented in Figure (11).The data points were pooled from 3 test sites.The actual values manually read from the scale on penetrometer shaft were plotted against the measured values obtained from ultrasonic distance sensing system being developed (the corrected distance).It can be observed that the two values were highly correlated in the range of measurement (0-100 cm) and the values were very close to each other.
The statistical analyses on the difference between the distances measured by the two methods were presented in table (1).The two-tailed t-test indicated that the two methods of distance measurement yielded insignificant difference of the results as indicated by 0.1713 of calculated as compared to 0.9800 of table t-values.The point-to-point errors as measured with the RMSE and the MAPE were comparatively low.Both statistics showed that measurement error was smaller than 5%.The evident pointed out that the ultrasonic distance sensing system developed in this experiment could be used with confidence to assess the penetrating depth of the dynamic penetrometer.13) demonstrated the outputs of the computer program in accessing the data in the SD card, calculating the PR, and drawing the PR profile, all were shown respectively in Excel formats.As the user transfers data files from the SD card into the created folder the command program is then automatically opened.The program will call for the file to generate PR profile.The user selects the file and presses the load new data button, the program then uploads the data of the numbers of blow and the distances from the SD card into the computer.As the user presses the calculate depth button the program will calculate penetrating depth by subtracting the distances measured after each blow from the reference distance at number of blow equal to zero.The user then inputs the parameters relevant to the penetrometer; namely, mass of the hammer, the falling distance, mass of the penetrometer, and cone base area, and presses the calculate PR button.The program, after executing equations ( 1) and (2), will return the penetration resistance and the graph showing the PR profile.In this version the program also predicts the draft requirement of a tractor as it draws a single chisel plow to break hardpan provided that the user inputs depth of plowing and width of the plow.In present time the authors did not take the geometry of the plow and the traveling velocity into account.So the predicting values of draft were to be further adjusted.

Conclusion
A system of distance measurement by means of an ultrasonic sensing device was developed and equipped to the dynamic penetrometer of the Department of Soil Science, Kasetsart University at Kampangsan.The distance calibration of the system was done against the measuring tape to the accuracy of 1.0 mm.The calibration equation was then incorporated into the command program to convert the measured values to the corrected values.Validation test for depth of penetration was performed in the field.The results indicated that there was a strong correlation between the actual and the measured values, and both methods of measurement yielded statistically the same results.The system was capable of storing field data needed for penetration resistance calculation up to 100 observation sites in an SD card that was easy to access.The computer program was developed to help the user construct PR profiles and was imbedded into Microsoft Excel spreadsheet together with the user's interfaces to facilitate the communication between the user and the computer.The system is robust, user-friendly, and low-cost.It requires parts that are domestically available.

Figure 1 .
Figure 1.The ultrasonic sensor module HC-SR04 (a) rear view and (b) front view The microcontroller used is Arduino Mega 2560 R3 as shown in Figure(2).

Figure 4 .
Figure 4. Configuration of the devices during calibration of the ultrasonic sensor

Figure 5 .
Figure 5.The SD card module from LC Studio

Figure 7 .
Figure 7. Wiring diagram of the electronic devices

Figure 8 .
Figure 8. Calibration result of the ultrasonic distance sensor

Figure 9 .
Figure 9.The finished ultrasonic distance sensing system (a) and field assembly to measure depth of penetration of the dynamic penetrometer (b)

Figure 10 .
Figure 10.Flow chart demonstrating sequential execution of the command program for the ultrasonic sensor

Figure 11 .
Figure 11.Validation test on depth of penetration as measured by the developed ultrasonic distance sensing system

Figure 12 .
Figure 12. Results on accessing the data in the SD card and calculating depth of penetration

Table 1 .
Results of the statistical tests on the difference of the distance measured by the two methods