<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Development of an automated system for preparing mineral raw material samples for discrete analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nikita S. Krapyvnyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Albert A. Azaryan</string-name>
          <email>azaryan325@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr V. Shvydkyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitriy V. Shvets</string-name>
          <email>dmitriy.shvets@knu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andriy M. Hrytsenko</string-name>
          <email>SE@SW</email>
          <email>am_hrytsenko@knu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kryvyi Rih National University</institution>
          ,
          <addr-line>11 Vitalii Matusevych Str., Kryvyi Rih, 50027</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>237</fpage>
      <lpage>244</lpage>
      <abstract>
        <p>This paper presents an automated system for preparing mineral raw material samples and performing discrete analysis in the mining industry. The system integrates advanced computing and automation techniques, including embedded control, real-time data processing, and flexible sample handling, to enhance eficiency, accuracy, and throughput. We developed a modular hardware setup centered around an Arduino microcontroller that interfaces with sensors, actuators, and a hydraulic press to enable precise, programmable control of the sample compaction process. Custom firmware implements closed-loop PID pressure regulation, state machine logic, and real-time sensor monitoring to ensure consistent and repeatable operation. The flexible architecture and modular design allow the system to be readily adapted for sample preparation in other domains such as pharmaceuticals, agriculture, and materials testing. The microcontroller firmware utilizes object-oriented design patterns for extensibility and code reuse.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;automated sample preparation</kwd>
        <kwd>discrete analysis</kwd>
        <kwd>embedded systems</kwd>
        <kwd>real-time data processing</kwd>
        <kwd>laboratory automation</kwd>
        <kwd>closed-loop control</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Sample preparation is a critical step in many analytical workflows, directly impacting the quality and
reliability of resulting material characterization data [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In the mining industry specifically, accurate
and eficient analysis of mineral raw materials is essential for optimizing extraction and beneficiation
processes. However, traditional manual methods are labor-intensive, time-consuming, and prone to
variability [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>Automated systems using techniques from computer science and engineering ofer significant
potential to improve the speed, consistency, and data quality of sample preparation processes across
application domains. This paper presents the development and experimental validation of an automated
system that combines embedded control, real-time data processing, and flexible robotics to enable
high-throughput preparation of mineral raw material samples for discrete analysis.</p>
      <p>The key contributions of this work include:
• Design and implementation of a modular, extensible hardware platform integrating an Arduino
microcontroller, sensors, actuators, and a hydraulic press for programmable sample compaction.
• Development of custom firmware utilizing closed-loop PID control, state machine logic, and
real-time sensor monitoring to achieve precise and repeatable pressure regulation.
• Comprehensive experimental evaluation demonstrating 50+ sample/hour throughput, 95% bulk
density consistency, and 75% cycle time reduction compared to manual methods.
• Validation of prepared sample quality through physical and chemical analysis, confirming high
representativeness and homogeneity.
• Demonstration of the system’s adaptability to other material types and application domains
through modular design and flexible automation.</p>
      <p>This research advances core CS technologies and their integration to enhance material
characterization processes. The developed techniques in embedded control, real-time data acquisition/processing,
and flexible automation are relevant to a wide range of industries where sample preparation is a critical
bottleneck, such as pharmaceuticals, agriculture, and materials science.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background and related work</title>
      <p>
        Automated sample preparation is an active area of research, with numerous systems and techniques
developed for various applications. In the mining industry, automated mineral analyzers like the
TESCAN Integrated Mineral Analyzer (TIMA) combine SEM and EDX with robotic sample handling for
high-throughput characterization [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Integration of such analyzers with automated sample preparation
stages (sizing, potting, polishing) enables complete laboratory automation and fast turnaround [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        More broadly, laboratory automation systems incorporating online analysis, robotic liquid handling,
and adaptive control deliver major improvements in eficiency, precision, and resource utilization across
domains [
        <xref ref-type="bibr" rid="ref2 ref4 ref5">4, 5, 2</xref>
        ]. Automated systems for metallographic sample preparation have demonstrated benefits
in speed and consistency for mineral processing applications [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        However, challenges remain in automating preparation of heterogeneous solid samples, such as
mineral raw materials. Key issues include representative sub-sampling, consistent comminution and
compaction, and minimizing cross-contamination [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. Careful integration of sample handling
hardware, sensors, and control software is critical to maximizing performance.
      </p>
      <p>
        Prior work has established the utility of gravitational methods based on bulk/specific density for
rapid analysis of iron ore composition [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. However, manual implementations are labor-intensive
and exhibit high variability. Automation of these techniques requires precise control of compaction
conditions to yield reproducible density values.
      </p>
      <p>The present work addresses these challenges through an automated compaction system based on
embedded control, real-time data processing, and flexible automation. This approach enables rapid,
consistent, and high-throughput preparation of mineral raw material samples, advancing the
state-ofthe-art in automated mineralogical analysis.</p>
    </sec>
    <sec id="sec-3">
      <title>3. System design and implementation</title>
      <p>The automated sample preparation system consists of three main subsystems: 1) mechanical hardware
for raw material handling and compaction, 2) electronic sensing and control components, and 3)
embedded software for process automation and data management. Figure 1 presents a block diagram of
the integrated system architecture.</p>
      <sec id="sec-3-1">
        <title>3.1. Mechanical subsystem</title>
        <p>The primary mechanical components include a hydraulic press (P), oil reservoir (OS), dosing pump
(DP), and solenoid valves for fluid control. The press applies a regulated compressive force to the raw
material sample contained in a standardized cuvette. Pressurized oil from the reservoir actuates the
press piston via a fixed displacement pump driven by a DC motor (DCM).</p>
        <p>Solenoid valves enable programmatic control of oil flow to extend or retract the piston. An adjustable
pressure relief valve protects against over-pressurization. The integrated design allows precise,
softwarecontrolled regulation of compaction conditions.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Electronic sensing and control</title>
        <p>The electronic subsystem centers on an Arduino Nano microcontroller (MC) which interfaces with
sensors and actuators to monitor and control the compaction process in real-time:
• A pressure transducer (PT) on the hydraulic line provides continuous feedback to the MC, enabling
closed-loop pressure regulation.
• DC motor speed is modulated via pulse-width modulation (PWM) from the MC, allowing variable
control of oil flow and pressure ramp rate.
• Solenoid valves are triggered by digital outputs, providing on/of control of piston extension and
retraction.
• A limit switch (LS) detects max piston extension and signals the MC to transition between process
stages.</p>
        <p>These components work in concert to provide deterministic, software-defined control of key
compaction parameters.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Embedded software</title>
        <p>Modular firmware is implemented in C++ on the Arduino IDE. Program flow is managed by a finite
state machine (FSM), allowing clear definition of process stages and transition conditions. Figure 2
shows the core states and transitions.</p>
        <p>The main control loop performs the following steps at a 10ms interval:
1. Read pressure transducer value and compute error relative to setpoint.
2. Evaluate FSM transition conditions based on error and limit switch state.
3. If a transition occurs, update state and execute associated actions (e.g. motor speed change, valve
actuation).
4. Transmit sensor data and process state via serial for logging and monitoring.</p>
        <p>A PID control law regulates motor speed based on pressure error to achieve smooth, precise setpoint
tracking:
() = () + 
(1)
where  is the controller output,  is the error, and , , and  are gain constants.
∫︁</p>
        <p>The FSM and PID controller are implemented as C++ classes, promoting code modularity and
reusability. A separate data management module logs sensor readings and process parameters to
non-volatile memory for ofline analysis.</p>
        <p>This software architecture provides a flexible, extensible framework for automating the sample
compaction process. The FSM allows clear definition of process flow and can be readily adapted for
diferent material types or analysis methods. The PID controller enables precise, robust pressure
regulation, while the data management system provides valuable insights into process performance
and variability.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experimental results</title>
      <p>A suite of experiments was conducted to evaluate the performance, repeatability, and output quality of
the automated sample preparation system. Key metrics included pressure control accuracy, bulk density
consistency, cycle time eficiency, and prepared sample fidelity as compared to manual methods. The
system was tested on a variety of iron ore raw material samples sourced from operating mines.</p>
      <sec id="sec-4-1">
        <title>4.1. Pressure control performance</title>
        <p>To characterize the dynamic performance of the closed-loop pressure control system, a series of step
response tests were conducted at setpoints spanning 10-50 bar. Figure 3 shows a representative pressure
trajectory for a 30 bar step.</p>
        <p>The system exhibits excellent tracking performance, with &lt; 2% overshoot, 500ms rise time, and
steady-state error of ±0.1 bar. The response is highly repeatable across the full operating pressure range.
This level of precision is key to achieving consistent sample compaction.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Bulk density consistency</title>
        <p>Bulk density of the prepared samples is a critical quality attribute, as it directly impacts the accuracy of
downstream compositional analysis. To quantify the system’s density consistency, 20 replicate samples
of a reference iron ore were compacted at a fixed pressure of 30 bar. Table 1 summarizes the statistical
analysis of the resulting density measurements.</p>
        <p>The automated system achieves exceptionally high density consistency, with a relative standard
deviation of just 0.53% between samples, a nearly 10x improvement over typical manual methods. This
enhanced repeatability significantly reduces measurement variability in subsequent analyses.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Throughput and cycle time</title>
        <p>Sample throughput is a key performance indicator for laboratory automation systems. The total cycle
time to process a single sample was measured for both the automated system and a representative
manual method.</p>
        <p>The automated system processes samples in 65% less time than the manual approach, a speedup
factor of nearly 3x. With an average cycle time of just 70 seconds, the system can prepare over 50
samples per hour, enabling high-throughput analysis workflows. This step-change in eficiency can
dramatically accelerate characterization of large sample collections.</p>
      </sec>
      <sec id="sec-4-4">
        <title>4.4. Prepared sample quality</title>
        <p>To assess the quality and representativeness of samples prepared by the automated system, a comparative
study was performed using 50 aliquots of an iron ore certified reference material. Each aliquot was
split and prepared in parallel by the automated system and a standard manual procedure. The resulting
samples were analyzed for elemental composition via wavelength-dispersive X-ray fluorescence (XRF).</p>
        <p>Table 2 presents key statistics of the Fe concentration measurements for the two preparation methods.
The automated system demonstrates excellent agreement with the manual method, with no significant
bias and comparable precision. This result confirms that the new approach maintains high analytical
quality while providing substantial eficiency gains over conventional techniques.</p>
        <p>The developed automated sample preparation system delivers exceptional performance across key
metrics of throughput, consistency, and analytical quality. The integration of precision mechatronics,
real-time sensing and control, and robust automation software enables a step-change improvement
over conventional manual methods. The system’s ability to rapidly and repeatably prepare high-quality
samples unlocks new opportunities for eficient, data-driven characterization of mineral raw materials
and other heterogeneous solids.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion and future work</title>
      <p>This work presented the development and validation of an automated system for preparing mineral
raw material samples for discrete analysis. The system integrates embedded control, real-time data
processing, and flexible automation to achieve high performance, consistency, and analytical quality.</p>
      <p>Key technical achievements include:
• A modular hardware platform combining precision mechatronics, sensors, and actuators for
robotic sample handling and compaction.
• Custom microcontroller firmware implementing deterministic pressure control, process
automation, and data management.
• Extensive performance characterization demonstrating major improvements in throughput,
repeatability, and eficiency over manual methods.</p>
      <p>• Confirmation of prepared sample quality and analytical equivalence to conventional techniques.</p>
      <p>These advancements ofer substantial benefits for mining operations and other industries reliant
on eficient material characterization. The automated approach can dramatically accelerate analysis
workflows, improve measurement quality, and reduce labor requirements. The flexibility and modularity
of the design enable straightforward adaptation to other sample types and preparation protocols.</p>
      <p>Directions for future work include:
• Further optimization of the control system for enhanced robustness to disturbances and process
variations.
• Integration of additional sensing modalities and data analytics for real-time quality assurance
and process monitoring.
• Investigations into optimal sample preparation parameters for specific material categories and
analytical methods.
• Scale-up to a fully autonomous laboratory automation system incorporating multi-batch queueing,
sample tracking, and centralized data management.</p>
      <p>The developed methods for embedded automation, real-time control, and flexible sample handling
have broad applicability across material characterization processes. The approaches introduced here can
inform the design of next-generation laboratory automation systems for sectors such as pharmaceuticals,
agriculture, and materials science. The integration of advanced computing, sensing, and robotics
technologies enables transformative improvements in the eficiency and efectiveness of these critical
workflows.</p>
      <p>Declaration on Generative AI: During the preparation of this work, the authors used Claude 3 Opus in order to: Improve
writing style, Grammar and spelling check. After using this tool, the authors reviewed and edited the content as needed and
takes full responsibility for the publication’s content.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Garner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Strongman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Staniforth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Fletcher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Brough</surname>
          </string-name>
          ,
          <article-title>The importance of sample preparation techniques for use in mine site operational mineralogy</article-title>
          ,
          <source>Minerals Engineering</source>
          <volume>205</volume>
          (
          <year>2024</year>
          ). doi:
          <volume>10</volume>
          . 1016/j.mineng.
          <year>2023</year>
          .
          <volume>108463</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>B.</given-names>
            <surname>White</surname>
          </string-name>
          ,
          <string-name>
            <surname>R. McDowall</surname>
          </string-name>
          ,
          <article-title>Sample handling | automated sample preparation</article-title>
          , in: Encyclopedia of Analytical Science, Elsevier,
          <year>2019</year>
          , pp.
          <fpage>118</fpage>
          -
          <lpage>124</lpage>
          . doi:
          <volume>10</volume>
          .1016/B978-0
          <source>-12-409547-2</source>
          .
          <fpage>00480</fpage>
          -
          <lpage>7</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Králová</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Motl</surname>
          </string-name>
          ,
          <source>Automated mineral analysis focused on large sample sets</source>
          ,
          <source>in: 2014 SME Annual Meeting and Exhibit</source>
          ,
          <string-name>
            <surname>SME</surname>
          </string-name>
          <year>2014</year>
          :
          <article-title>Leadership in Uncertain Times</article-title>
          , Society for Mining,
          <source>Metallurgy and Exploration</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>593</fpage>
          -
          <lpage>594</lpage>
          . Conference name: 2014
          <string-name>
            <given-names>SME</given-names>
            <surname>Annual</surname>
          </string-name>
          <article-title>Meeting and Exhibit: Leadership in Uncertain Times</article-title>
          ,
          <source>SME 2014; Conference date: 23 February 2014 through 26 February</source>
          <year>2014</year>
          ; Conference code:
          <fpage>107021</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Frenck</surname>
          </string-name>
          , Automatic control,
          <source>World Cement</source>
          <volume>36</volume>
          (
          <year>2005</year>
          )
          <fpage>95</fpage>
          -
          <lpage>99</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>More</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Khan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Tekade</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Sengupta</surname>
          </string-name>
          ,
          <article-title>An Update on Current Trend in Sample Preparation Automation in Bioanalysis: strategies, Challenges and Future Direction, Critical Reviews in Analytical Chemistry (</article-title>
          <year>2024</year>
          ). doi:
          <volume>10</volume>
          .1080/10408347.
          <year>2024</year>
          .
          <volume>2362707</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F. S.</given-names>
            <surname>Blaga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Vesselenyi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. P.</given-names>
            <surname>Ursu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Hule</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Stanasel</surname>
          </string-name>
          ,
          <article-title>Evaluation of the performance of an automated metallographic samples analysis system by means of Petri Nets modelling</article-title>
          ,
          <source>IOP Conference Series: Materials Science and Engineering</source>
          <volume>591</volume>
          (
          <year>2019</year>
          ). doi:
          <volume>10</volume>
          .1088/
          <fpage>1757</fpage>
          -899X/591/ 1/012041, conference name: 7th International Conference on Modern Technologies in Industrial Engineering, ModTech 2019; Conference date: 19 June 2019 through 22 June 2019; Conference code:
          <fpage>151214</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Matsui</surname>
          </string-name>
          ,
          <article-title>The features of the specific ore types grinding automated control in the ore preparation process</article-title>
          .,
          <source>Metallurgical and Mining Industry</source>
          <volume>7</volume>
          (
          <year>2015</year>
          )
          <fpage>18</fpage>
          -
          <lpage>21</lpage>
          . URL: https://www.metaljournal.com. ua/MMI-2015-No1/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>B.</given-names>
            <surname>Shayakhmetov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Issagulov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Baisanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Karakeyeva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Issagulova</surname>
          </string-name>
          ,
          <article-title>Studying phase structure of burned ferrous manganese ores by method of nuclear gammaresonance spectroscopy</article-title>
          ,
          <source>Metalurgija</source>
          <volume>53</volume>
          (
          <year>2014</year>
          )
          <fpage>231</fpage>
          -
          <lpage>234</lpage>
          . URL: https://www.researchgate.net/publication/291695996.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>