ATmega328P-based X-Ray Machine Exposure Time Measurement Device with an Android Interface

The purpose of this study was to design an X-ray microcontroller-based ATmega328P microcontroller exposure time measurement device. That can be done by integrating an X-ray detection circuit, analog signal conditioner, ATmega328P microcontroller and Bluetooth module HC-05 to display and control the measurement results on mobile phones Android. The benefits of this research are expected to be able to increase knowledge and expertise in the field of radiology instruments through X-ray machine parameter measurement techniques and assist technicians to calibrate the X-ray exposure time


I. INTRODUCTION
Radiodiagnostic is a medical procedure that utilizes X-ray ionizing radiation to make a diagnosis without surgery. Xrays will be fired at objects and X-ray beams that penetrate the object imaged into x-ray film or processed into digital objects. Aside from having many benefits, dosage errors in performing X-ray irradiation actions are very detrimental, both in terms of patients, operators, technicians and also Xray aircraft themselves. When the dose is lower than what is set on the control panel, the results will be different and difficult to diagnose, so it must be repeated irradiation, and vice versa, if the dose is too high the patient will also receive excessive radiation, and the resulting image is black especially for the light beam -X conventional. In addition, excessive doses of X-ray radiation (ionizing) can cause ionization in the soft tissues of organs and fluids in the human body, which can result in cell damage, gene mutations, free radical formation, cancer cells, etc. In radiology, image quality is a measure of effectiveness for a diagnosis to be made.
In 2004 the International Atomic Energy Agency (IAEA) nuclear power agency conducted integrated research on radiation protection in several countries including Indonesia, that X-ray aircraft suitability tests could reduce radiation doses in patients and reduce the percentage of irradiation repetitions by 50%. The reason for the irradiance is 70% because the film is too dark or too bright. This is influenced by the technical factors of X-ray planes namely the inappropriate voltage of the tube (kV), time (ms) and tube current (mA). The suitability test is intended to ensure that the X-ray plane used in the radio-diagnostic procedure is functioning properly so that the patient does not get excessive radiation exposure. The parameters tested in this suitability test include testing the tube voltage, current accuracy tube and length of X-ray irradiation.
The use of X-Ray for monitoring objects has been widely applied. The acquisition of an optimal X-ray source based on a multi-objective optimization model was studied by Wenhui to achieve calibration of the on-site dose instrument. The research was about the calibration transmission system of the National Standardized Station Secondary Standard Laboratory Position monitor calibration with the aim at environmental dose monitoring instrument using filtered Xrays [1]. The diagnosis of electricity and X-rays in the NSTec 2-MA solid plasma focus system was investigated by Savage by developing and measuring currents and voltages with high fidelity that could be calibrated for comparison with digital simulations. The utilized current and voltage measurements applied to add a general understanding of the behavior of vacuum insulators and the dynamics of the current sheath [2]. The utility and significance of biomarkers used in monitoring the health status of personnel exposed to ionizing radiation were examined by Popescu by reviewing biomarkers used for monitoring the health status of medical personnel exposed to ionizing radiation (IR) from nearly 15 years of follow-up records [3]. An X-Ray ranking procedure for conventional 65-nm CMOS technology was investigated by Kessarinskiy. The solution for radiation hardness assessment procedures utilized a compact X-ray facility, built at the investigation station with an automatic measurement system based on the NI PXI platform [4]. Guided gamma-ray imaging for an automatic aerial monitoring system was investigated by Nakada. The system was essential for ongoing environmental and emergency inspections in severe accidents [5].
Xiao researched the digital X-ray radiography that operated the aero-machine with a universal trigger module.
The digital x-ray radiography system worked to monitor changes in the internal structure of the aero-engine under different rotational speeds [6]. Bloomer investigated the use of a single CVD diamond-crystal X-ray diamond diagnosis for commissioning and operation of the synchrotron beamline at Diamond Light Source Ltd. The researcher utilized a single  [7]. Nidhi researched a DSSC X-ray Imager safety interlock system consisting of four inter-communication sub-systems referred to as the SIB (safety-interlock board) master and three partners SIB [8]. Norlin measured X-ray fluorescence for monitoring toxic metal content in ash from burning municipal solid waste (MSW) [9]. Mishra studied the characterization of radiological imaging biomarkers for the identification of interstitial lung disease (ILD) for developing countries. Interstitial pulmonary disease (ILD) is a group of unspecified diseases and can cause chronic progressive respiratory complications [10].
McNally adopted a B-Spline B-Diffraction Imaging Technique for die warpage and stress monitoring in a fully packed chip. The integrated packaging circuit led to the development of stacked silicon multiple dices [11]. The application of bare commercial CMOS sensors for X-ray fluorescence and X-ray monitoring was investigated by Castoldi to meet the needs of high-resolution and inexpensive radiation beam monitors. The researcher explored the possibility of using commercial CMOS image sensors as Xrays and low-intensity particle ray monitors [12]. Wireless sensor networks (WSN) are important technologies for large scale monitoring, providing sensor measurements at a high temporal and spatial resolution. Magalotti studied personal wireless sensor nodes for Interim Radiological Operations Dosimetry [13]. MA investigated intelligent simultaneous quantification of environmental trace elements with total Xray fluorescence reflection. The total reflection X-ray fluorescence had the advantage of simultaneous multielement detection, the potential for trace analysis, etc. [14]. A lung health monitoring system used simultaneously with electrical impedance tomography was investigated by Sunjoo Hong, applying an electrical impedance tomography (EIT) [15].
A new application of parallel computing techniques in soft x-ray plasma measurement systems for WEST experimental fusion thermal reactors was investigated by Krawczyk using high performance and parallel computing solutions, combined with front-end electronics. The development of special soft X-ray measuring instruments can be scaled for high-scale plasma physics experiments with thermal fusion devices [16]. The void size micro-bump, the new standard of 3D metrology in X-ray computed tomography for accuracy assessment and monitoring, was investigated by Kong using a 3D X-ray Computed Tomography (XCT) as in-line metrology for silicon mold packages and substrates to detect and count cavities in micro lumps [17]. Integrated All-Polymer Circuit for Monitoring History of X-Ray Inspection of Luggage examined by Lai based on low-voltage Organic Field-Effect Transistors arranged to monitor baggage safety checks at airports [18]. Registration of CT images in acute stroke monitoring was investigated by Amelio by presenting a new system based on tracking the temporal evolution of stroke lesions using image registration techniques on CT examinations of patients' brains [19]. The X-ray Polarimetry Explorer (IXPE) Imaging Project is an international collaboration to build and fly X-ray observatories that are sensitive to polarization. Alexander investigated risk management X-ray Polarimetry Explorer (IXPE) [20].
The study aims to measure the X-ray exposure time by using a Light Dependent Resistor (LDR) sensor with a viewer on seven segments. The results of this study indicate that the manufacture of device requires a screen that is used to convert X-rays (invisible light) into visible light. This visible light will be detected by the LDR sensor then the microcontroller processes how long the time is detected by the LDR and displayed on seven segments. However, the lack of use of this screen can cause an afterglow effect where the screen still produces dim visible light before it actually dies even though the X-ray has stopped shining. This dim light is not required in the detection of LDR, so it can cause errors or errors in the processing of the microcontroller.
Therefore, in this study will make an X-ray aircraft exposure time measurement device with indirect data collection methods (non-invasive). This measurement is done by changing the X-ray that is fired into a voltage using a sensor that is sensitive to X-rays namely the photodiode, so as to minimize data processing on the microcontroller. Then the processed microcontroller results will be displayed and controlled on an android mobile phone to make it easier for users to take X-ray exposure time measurements.

A. System work
Installing the battery first as a source of voltage supply, then when pressing power ON, all the circuit blocks on the appliance were supplied by batteries as shown as Figure 1. Furthermore, when X-rays were fired, the photodiode sensor [21], [22] would detect X-ray radiation and then converted it to an electric quantity with a small voltage. The voltage would be strengthened by an analog signal conditioning circuit (amplifier) to be processed by the microcontroller. The results would be displayed on an Android mobile phone [23], [24] via a Bluetooth module [25]- [27] as the sender and receiver of data. In addition, Android phones could also control X-ray exposure time measurement device such as resetting readings or measurements.

B. Testing scheme
In the design of this experiment, the comparison device and the final assignment module were directly exposed to Xrays as shown in Figure 2. 100 cm was the distance between the X-ray source and the two devices. X-ray sources were the anode and cathode in the X-ray tube. For x-ray image formation/film the ideal distance between the film and the focus of the X-ray tube was 90 cm -100 cm.

C. System work flow
The system work flow as shown in Figure 3 describes that initially, the photodiode sensor will detect X-rays, and then, to find the length of time the X-ray irradiation, the results of the detection will be counted by the microcontroller [12], [28]- [30]. Furthermore, the microcontroller calculation data will be sent by the Bluetooth module to the Android mobile to display the measurement results. Then the measurement can be repeated or reset via commands from an Android mobile phone.

D. Data analyze
In this study, data analysis was calculated from three parameters, namely the average, the deviation, and the error. Average is the value or result of the division of the amount of data taken or measured by the number of data retrieval or the number of measurements. Deviation is the difference from the average value of the desired price with the measured value, and Error is the difference between the mean of each data. Reliability is the ability of the measurement process to show the same results from repeated and identical measurements.

III. RESULT AND DISCUSSION
After making the device (Figure 4), it was necessary to test and measure it. The purpose of testing and measurement was to determine the accuracy of each component part of the series of final project modules that had worked according to their functions as planned. Besides testing and measurement also serves to find out how big the measurement error on the device. Comparison between the measurement results and the relevant and traceable comparison device was performed as a reference in measuring and calculating the length of X-ray exposure time in the module. The test was done by measuring the output duration of X-ray aircraft exposure that had been set in a non-invasive manner.

A. Timer test
After conducting the test, the measurement results obtained by the device with a comparator. The time setting value was the exposure time parameter set on the X-ray plane in an MS unit. Comparator values were the result of the exposure time displayed on the comparator, and module values were the results of the exposure time displayed on the device. Table 1 presents the comparison results between the standard and tested devices.

B. Data analysis
The data analysis calculation was used to determine the quality of measurements on the device. The result is shown in Table 2. Based on the results of the data analysis calculation, shows that the measurement results of the device designed by the author do not differ greatly with the comparison device viewed from the values of the deviation, validity, and reliability. The table presents that the deviation value produced by the smallest final assignment module is -0.03 at the time setting of 500ms and the greatest deviation value is -9.73 at the time setting of 240ms. The smaller the results of the deviation value, the better the measurement data. When the validity value is getting smaller, the data from the measurement of the final assignment module is getting better. The smallest validity value is 0.0058% at the 500ms time setting and the highest validity value is 4.83% at the 100ms time setting. The validity value is influenced by the deviation value.
The reliability value is used to determine the level of consistency of measurements repeatedly with the same conditions or circumstances. The smaller the reliability value produced, the more stable the measurement level. A variety of reliability values at each measurement point, a small reliability value is 0.00 located at 240ms time setting, while a high reliability value is 6.89 located at 500ms time setting. It shows that in general measurements at the 500ms time setting have a difference of +6.89 or -6.89 in the measurement. Figure 5 illustrates the system's minimum schematic. It displays the ON/OFF switch to connect or disconnect the supply voltage. The reset button functions to return the system to the default condition without turning off (OFF). The reset pin of ATmega328P works by using 1/high logic to activate the minimum system. If the reset pin gets a trigger (the reset switch is pressed), the reset pin will be connected directly to the ground and get a logic 0/low. The capacitors paralleled with the reset button are to provide delay when resetting. The programmer connector connected to the MOSI, MISO, SCK, and Reset pins helps enter and delete programs on the microcontroller. The Arduino program can only work on 16MHZ crystals. Serial communication is a pin to send or receive data between the microcontroller and another device.

D. Android interface design
The software to program the display on an Android was MIT App Inventor. App Inventor is a web application that allows users to program computers to create software applications for the Android operating system.

IV. CONCLUSIONS
When measuring the device, the photodiode BPW34 must be closed and impermeable to light so that there is no light other than the detected X-rays. The analog signal conditioning circuit utilizes a differential amplifier and a noninverting amplifier. The differential amplifier is used for setting the output voltage towards the non-inverting amplifier, while the non-inverting amplifier is to strengthen the voltage 22 times so that the ATmega328P microcontroller can read the ADC values. The minimum system design utilizes the ATmega328P microcontroller with the Arduino program as the data processor from the series analog signal conditioners and regulates the running of the system for display on Android. In the process of measuring the X-rays exposure time, the Android can display the measurement results behind a radiation protected wall with an effective distance of 6 meters. The results of the data analysis show that the deviation value is directly proportional to the validity value. The smaller the deviation value produced, the better the result data of the measurement.