Introduction

The development of nanotechnology can be traced back to a 1959 proposal by Nobel Prize winner Richard Feynman [1]. He claimed that humans could use nano-sized materials to demonstrate more novel applications, and he proposed that large datasets could be recorded in small pins. The concepts of nanobiology, nanomaterials, nanomachines, and nanoelectronics were proposed in 1990 during the International Conference on Nanometer Scale Science and Technology and the International Academic Conference on Scanning and Transmission Microscopy in the United States. The United States officially announced the National Nanotechnology Initiative at the California Institute of Technology in 2000, triggering an industrial revolution that facilitated major advances in the development of nanotechnology [2, 3]. The preparation method of nano-Ag colloids generally adopted chemical method [4,5,6]. The suspending agent added in the process of this preparation method would cause the colloid to contain other derivatives, so the application of nano-Ag colloids should be limited to some special fields. When Electrical Spark Discharge Method (ESDM) was applied to the preparation of nano-Ag colloids, the aforementioned problems would not be encountered. Therefore, the colloid prepared by this method could be applied in various fields, and would make a great contribution to the application in the field of biomedicine in the future. Another advantage of ESDM applied to the preparation of nano-Ag colloids was that the process environment does not present the problem of dust escape, so this method was a method that conforms to the green energy-saving process.

Electrical discharge machining (EDM) refers to the unconventional concept of discharge machining, which was initially adopted in the mid-twentieth century and has been widely applied in the aviation, automobile, mold production, and medical precision parts manufacturing industries [7,8,9]. The origin of EDM can be traced back to 1770, when Joseph Priestley, a British chemist, discovered the corrosive effect of electrical spark discharge. In 1943, in the Soviet Union, Lazarenko from the Moscow State University used the destructive characteristics of EDM to process materials by evaporating their metal surfaces. Relevant studies have also been conducted in Japan following the 1948 proposal of EDM by Seizaburo Ho, a scholar from the University of Tokyo. By the 1980s, the development of computer numerical control (CNC) greatly enhanced discharge machining operational efficiency, indicating that future EDM technology had entered the era of digital control [10]. In recent years, wire-cut EDM has enabled the cutting of any shape through CNC digital control. EDM can do a lot of work and machining many things but the “traditional” EDM is large and the costly which make the EDM process not suitable for making product, for example nano-scale particles.

Nanocolloid preparation was previously conducted using conventional industrial EDM tools involving the use of the Electrical Spark Discharge Method (ESDM) [11]. However, because of equipment costs, large size and maintenance inconvenience, the present study developed a set of micro-EDM (m-EDM) that integrated physical circuit design with real-time monitoring capability; these greatly reduced equipment costs and equipment size. Operators were able to set the proportional-integral-derivative (PID) parameters of the motor and duty cycle of the output voltage pulse to adjust discharge efficiency. Because the physical circuit was self-designed, defects were easily identified and optimized, thereby facilitating high nanometal colloid preparation efficiency.

Material and Methods

Principle of the Electrical Spark Discharge Method

EDM technology uses thermal principles to make various materials instead of mechanical principles. The preparation method of this colloid is a physical method, and the preparation process does not need to add chemical protective agents to obtain uniform and dispersed high-quality nano silver colloid which is called the Electrical Spark Discharge Method (ESDM) [12, 13]. ESDM uses periodic spark discharge to melt and vaporize electrode materials immersed in dielectric fluid. The aforementioned vaporized electrode material is rapidly cooled by the dielectric fluid and then becomes nano-particles. [14]. The process is detailed as shown in Fig. 1.

  1. a.

    Discharge preparation: A direct current (DC) power supply is connected to the electrodes. The electrodes should be kept a small distance apart and be immersed in the dielectric liquid; the electrodes are insulated and the current does not pass through them.

  2. b.

    Discharge trigger: The upper electrode is moved slowly towards the lower electrode. When the distance between them is very small, the electric field between the electrodes is strong enough to cause a few molecules of the dielectric fluid to show ionization. The aforementioned results will reduce the resistance between the electrodes, and the cathode will emit electrons toward the anode due to the decrease in the resistance between the electrodes.

  3. c.

    Ionization: Under the action of the electrical field, a large number of dielectric fluid molecules will be collided by electrons at a high speed and present a collision and dissociation phenomenon. The aforementioned results will increase a large number of electrons and cations between the electrode gap in a very short time. And these electrons and cations respectively travel towards the opposite electrode. The process will create ion channels between the electrodes, so the current between the electrodes will increase rapidly.

  4. d.

    Electrical spark melting: When electrons and cations collide with the opposite electrode at high speed, on the one hand, there will be sparks at the collision; on the other hand, the high-temperature heat energy converted by the kinetic energy of the high-speed collision will melt or vaporize the material on the electrode surface, and finally the aforementioned melting/vaporization material is condensed by the dielectric liquid into nano particles.

  5. e.

    Discharge cutoff: When the power pulse ends at the Ton period, both the current and voltage will drop, and the nano particles will be suspended in the dielectric fluid.

  6. f.

    Insulation restoration: During the Toff period of the power pulse, small particles are washed away from the electrode gap and suspended in the dielectric fluid. The insulation performance between the electrodes will gradually return to a state of high resistance during this period.

Fig. 1
figure 1

ESDM process: a discharge preparation, b discharge trigger, c ionization, d electrical spark melting, e discharge cutoff, and f insulation restoration

In this study, nano-Ag colloids were prepared at normal temperature and pressure. The dielectric liquid used was 150 mL of deionized water. Both electrodes were silver wires with purities of 99.9%; the diameters of the cathode and anode were 1 mm and 2 mm, respectively. The preparation time of nano-Ag colloids using the ESDM was 120 s. Table 1 shows the preparation parameters. In this study, deionized water was used as the dielectric liquid. During discharge, high-energy sparks melted the solid Ag electrode into liquid Ag, after which the liquid Ag was atomized through continual evaporation. Finally, the catalysis of the electric field caused the Ag atoms to lose their electrons and generated Ag+. The intensity of this electric field was equivalent to 500 kV/cm (a discharge gap of 20 μm and a discharge voltage of approximately 100 V). The molecules were decomposed into Ag0, Ag+, and e, and the periphery (OH) was bonded to Ag+.(OH), in which negatively charged OH and water molecules formed molecular aggregates through the mutual attraction of hydrogen bonds [15]. Figure 2a and b show the disassociation mechanism of Ag+ and suspension mechanism of nano Ag, respectively.

Table 1 Preparation parameters
Fig. 2
figure 2

Nano-Ag preparation: a disassociation of Ag+ and b suspension of nano-Ag

m-EDM Circuit Design

In contrast to the vertical discharge mechanism of conventional industrial EDM, the m-EDM mechanism used horizontal discharge, which had the advantages of utilizing electrodes more efficiently and extracting products easily. The m-EDM consisted of an electronically controlled platform hardware circuit and monitoring and control (MAC) system. The electronically controlled platform entity graph was shown in Fig. 3a. In this study, a lifting table was used to control the vertical height, and the vertical position was precisely adjusted during the preparation process. The two electrodes were fixed using chucks to reinforce their structure. One of these electrodes was fixed on the roller bearing slider to control the electrode gap, whereas the other electrode was secured in a fixed position on the left acrylic fixture by using a fixed weight to prevent the fixture from shaking. The sliding table was powered by a DC servo motor. The distance of the electrode gap could be controlled by controlling the DC servo motor. If the electrode gap maintained at a small distance, the m-EDM obtained good spark discharge characteristics. The position of the sliding table was obtained using an optical encoder to facilitate the reading and provision of signals by the computer software. The two electrodes were connected to a pulse power supply, and nanometal particles were generated using the ESDM and collected in a container. A stirring bar was placed at the bottom of the container, in which magnetic stirring was performed to evenly disperse the nano particles in the solvent.

Fig. 3
figure 3

Micro-EDM a Electronically controlled platform entity graph b real circuit c schematic of the discharge circuit and d actual oscillogram

The hardware circuit of the m-EDM included a discharge circuit was shown in Fig. 3b. It include a discharge circuit, a logic judgment circuit, and a motor feedback circuit. The functions of the hardware circuit included the power control of the electrode gap, the distance control of the electrode gap, and the monitoring of the discharge state. Figure 3c shows the discharge circuit. The m-EDM used a transistor-type discharge circuit, whose efficiency was superior to that of a capacitive-type discharge circuit. The discharge circuit consisted of a power transistor (IRF740); an optical coupling (6N137); a protection circuit; a LED; resistors R1, R2, R3, and RS; and a 100 V DC power supply. The DC power supply was switched through the ON/OFF state of the IRF740 to provide the pulse voltage required for the electrode gap. The computer would output the corresponding pulse signal according to the set Ton-Toff parameters. This pulse signal was transmitted to the gate of the IRF740 via the buffer and optocoupler. Finally, the IRF740 would switch the state according to the pulse signal. The resistor RS acted as the current-limiting resistance for the LED, which was illuminated during operation. The resistor R1 was 1Ω. The voltage of this resistor was equal to the current. Since R1 was connected in series with the electrode, the voltage signal of R1 could be used as the current signal through the electrode. During the pulse Toff, the resistors R1, R2, R3 and the electrode gap formed a discharge loop, and the energy stored in the electrode gap could be discharged through this loop. The foregoing discharge could improve the insulation of the electrode gap before the next discharge. Figure 3d showed the actual oscillogram of the discharge circuit. The PWM curve was the pulse signal output by the computer, and Vgap and Igap were the voltage and current of the electrode gap, respectively.

The logic judgment circuit was used to determine the discharge efficiency of the m-EDM. The main purpose of this process was to transmit the discharge success signal, which was judged by the logic circuit, to the computer software to calculate the discharge success rate. The voltage signal (Vgap) and current signal (Igap) of the discharge circuit were received by the logic circuit. The judgment was based on the principle that Vgap decreased and the Igap increased during successful EDM discharge. The logic judgment circuit is composed of multiple comparators, logic gates and optocouplers. Figure 4 show the oscillogram for the Vgap and Igap judgment ranges, respectively. When the Vgap signal was within the range of the upper and lower limits of the voltage, the output value of the comparator for determining the Vgap signal was 1; otherwise, it was 0. In Fig. 4b, when the Igap signal was greater than the lower limit of the current, the output value of the comparator for determining the Igap signal was 1, otherwise, it was 0. The output signals of the above two comparators were sent to an AND logic gate. The Vsuc signal was the output of the AND logic gate. When the Vsuc signal was 1, the discharge was successful. Finally, the Vsuc signal was sent to the computer through optocouplers, and the computer software calculated the discharge success rate according to the cumulative value of the Vsuc signal.

Fig. 4
figure 4

Oscillograms for the judgment ranges of a Vgap and b Igap

One of the requirements for EDM to obtain good discharge characteristics was to maintain the electrode gap in the distance range suitable for spark discharge. Since the distance of the electrode gap was proportional to the electrode voltage (Vgap), the electrode gap distance could be controlled through the feedback Vgap signal. The motor feedback circuit captured the Vgap signal and generated a feedback signal to control the electrode gap. The motor feedback circuit consisted of differential amplifier, RC integrator circuit, and isolation amplifier (ISO122P). First, the electrode voltage (Vgap) signal was transmitted to the feedback circuit, where it was stabilized and reduced by a differential amplifier. The signal then underwent digital-to-analog conversion through the RC integrator circuit, after which it was subjected to isolation protection by the isolation amplifier (ISO122P) and transmitted to the computer. The computer's PID controller transmitted signals to control motor movement. The optical encoder monitored the moving position of the sliding table and returned relevant information to the software to be displayed on the screen. The computer software provided a voltage of − 2.4 to 2.4 V for the motor. The motor rotated clockwise when the voltage was 0–2.4 V, and the sliding table moved forward; conversely, the motor rotated anticlockwise when the voltage was − 2.4 to 0 V, and the sliding table moved backwards.

Because the discharge frequency of this system was set between 0 and 50 kHz, recordings were made tens of thousands of times per second after 1 MHz quantization. Taking such recordings using an electronic circuit required considerable costs and occupied considerable space; therefore, software with a field-programmable gate array function was used to monitor the m-EDM and display the relevant information on the computer screen in real time. The MAC system was built into the computer. Its function was to provide the output/input signal processing between the computer and the hardware circuit. It also displayed the relevant information about the system operation on the screen. The MAC system consisted of VisSim software and RT-DAC4/PCI card [16, 17]. The MAC system would output a signal to switch the ON/OFF state of the discharge circuit according to the set Ton-Toff parameter. This system would output a signal to control the motor speed according to the signal from the hardware circuit. In addition, this system would also display information such as Vgap, Vsuc signal, encoder signal, PID controller parameters, and discharge success rate on the computer screen.

Application of a PID Closed-Loop Controller to Control Discharge Gap Voltage

The PID control algorithm is widely used in related industries for controlling small components and monitoring drones, and its advantages include simple calculation and clear parameter definitions [18,19,20,21]. In this study, this approach was used principally for motor control The PID control algorithm features three basic constants (proportional-integral-derivative), which can be optimized through parameter adjustment. First, the proportional control constant (Kp) is described as follows: If the command value is A and the actual value is B, then the error value e is represented as A-B; by multiplying Kp by e, the steady-state error can be improved. Moreover, Kp affects system stability. If Kp is very high, the steady state can be achieved more rapidly, but a greater oscillation is produced. Conversely, an overly small Kp value results in a smaller oscillation and a longer time required for reaching the steady state. The integral control constant Ki is represented as Kp/Ti, and its purpose is to control the steady-state error in the control process; however, a very high Ki causes system instability. The differential constant Kd, which is represented as Kp × Td, suppresses the oscillation generated during the control process. An excessively high Kd may cause instability or sudden movements in the system.

The m-EDM featured three discharge states, namely gap discharge, short circuit, and open circuit. The potential value of Vgap integrated through the RC integrator circuit indicated three discharge states. The electrode gap voltage of this system is sampled by an amplifier and converted into an analog signal by an RC integrator. Finally, the electrode gap voltage signal of the aforementioned analog signal is transmitted to the personal computer of m-EDM through the isolation amplifier. The m-EDM program can determine the discharge status of m-EDM based on the aforementioned signal. In this system, the gap discharge is considered successful when the electrode gap is kept at a small distance. The Vgap in the distance range of the electrode gap is called Vsuc. Vsuc is a voltage range, that is, Vgap will be in the range of Vsuc when the gap is discharged.

Figure 5 shows the motor control process. First, the Vgap signal was captured through the feedback circuit and integrated by the RC integrator circuit, after which it was transmitted to the computer for comparison with the command value. When the Vgap signal was lower than the command value, the two electrode ends were too close; thus, the motor was moved backwards to avoid a short circuit. A Vgap value higher than the command value indicated that the two electrode ends were too far apart; thus, the motor was moved forward to maintain the system discharge. When the Vgap signal was equal to the command value, the motor remained stationary. Because the distance between the two electrodes of the m-EDM must be maintained at a micron distance to sustain the gap discharge, the electrodes were constantly consumed during the discharge process. To maintain normal discharge, the PID controller, hardware, and software were used in conjunction with the system to achieve the control function. Vgap is an analog signal. VG is the product of Vgap and the feedback gain, which is adjusted according to the duty cycle. The gain was 1 when the duty cycle was 50%. Vcom was the VisSim command value set by the system; Verr was the voltage error signal between the electrode gaps (i.e., Verr = Vcom − VG). The Verr signal was sent to the PID controller for computation, and after that it was sent to the motor feedback circuit to maintain the electrode gap. The process was repeated for continual control.

Fig. 5
figure 5

Motor control process

Preparing Nano-Ag Colloids by Using the m-EDM with Different PID Control Models

In this study, five different types of PID control (i.e., Z-N CLASSIC PID, Z-N Pessen Integral Rule, Z-N with less overshooting, Z-N without overshooting, and Tyreus–Luyben tuning formula) were employed to prepare nano-Ag colloids with the same preparation and parameter environment using the m-EDM [22,23,24,25]. The PID parameters were fine-tuned through various PID adjustment methods. To determine the properties of the prepared nano-Ag colloids, this study adopted ultraviolet–visible spectrometry (UV–Vis, Thermo-Helios Omega, Thermo Fisher Scientific Inc, Waltham, MA, USA) and Zetasizer instruments (Zetasizer, Nano-ZS90, Malvern Zetasizer, Worcestershire, UK) to analyze the absorbance spectrum intensity, suspension stability, and particle distribution of the colloids [26,27,28]. In UV–Vis, the wavelength is from 190 to 600 nm. The scanning speed is 240 nm/min and the interval of it is 1 nm. In Zetasizer, the light source is a 633-nm He–Ne laser light. The scattering angle is 90 degrees. The temperature of water is set 25 °C. The zeta potential represents the suspension stability of particles in a fluid [29, 30]. Additionally, transmission electron microscopy (TEM, JEM-2100F, JEOL Ltd, Japan) was employed to observe particle size, shape, and components. By comparing the particle sizes, zeta potentials, and absorbance values, the most suitable PID adjustment method for m-EDM was selected. Table 2 shows the control parameters of each PID adjustment method.

Table 2 Control parameters of each PID adjustment method

Results and Discussion

Fine-Tuning Optimization of the m-EDM Circuit and PID Parameters

Figure 6a shows the overall schematic of the hardware system designed in this study. It includes various connections between the discharge circuit, logic judgment circuit, and motor feedback circuit. The functions of different circuits can be intuitively understood through this system. Because numerous test points were installed on the circuit, fault points could be identified quickly when the hardware failed, enabling rapid repair and reducing labor costs. The left side of Fig. 6a is the VisSim display interface on the computer screen, and the enlarged result is shown in Fig. 6b. Figure 6b shows the display interface of VisSim on the computer screen. After fine-tuning the PID parameters, the voltage at both electrode`s ends (Vgap) and the discharge success rate signal were stable without any fluctuation. The motor voltage and encoder signal indicated whether the discharge was stable enough to control the motor to move forward at a constant speed. According to the experiment results, a discharge success rate of approximately 25% was obtained when the voltage at both ends of the electrodes (Vgap) was unstable and fluctuated greatly; when the Vgap remained stable at approximately 2 V, a discharge success rate of approximately 50% was achieved. The results demonstrated that a stable circuit voltage effectively improved the discharge success rate and overall discharge efficiency.

Fig. 6
figure 6

a Circuit connection diagram, b VisSim display interface on the computer screen of the m-EDM

In this study, five types of PID control (i.e., Z-N CLASSIC PID, Z-N Pessen Integral Rule, Z-N with less overshooting, Z-N without overshooting, and Tyreus–Luyben tuning formula) were used to prepare nano-Ag colloids under the same environment. The optimal PID parameters were derived from previous studies, and the discharge success rate, particle size, zeta potential, and absorbance of the nano-Ag colloids produced using these parameters were compared to determine the optimal PID adjustment method. Figure 7 shows the relationship curves for the different PID adjustment methods and their related characteristics. Table 3 shows the five PID adjustment methods. The nano-Ag colloids produced under the same environment were compared using precision instruments to determine their success rates, particle sizes, zeta potentials, and absorbance values. The values of 1–5 in the table represent the ranking of the nanoparticle characteristics. According to the table, the nano-Ag colloid prepared using the Z-N CLASSIC PID method exhibited optimal characteristics; thus, this method was the optimal method for the m-EDM.

Fig. 7
figure 7

Relationship curves for PID adjustment methods: a discharge success rate, b particle size, c zeta potential, and d absorbance

Table 3 Ranking of the characteristics of the PID adjustment methods

Nano Characteristics Analysis

Nanometal particles are defined as those with a size less than 100 nm, with visible light wavelength usually between 400 and 700 nm. The Tyndall effect refers to the scattering effect generated when light passes through a stable suspension of a colloid containing metal particles. According to this principle, light scattering occurs in the light irradiation when the size of the metal particles is lower than the wavelength of the incident light; conversely, reflection occurs when the size of the metal particles is higher than the wavelength of the incident light. The Tyndall effect is a light scattering effect, and a preliminary judgment of whether nano metal particles in stable suspension are present can be obtained by observing whether light scattering is displayed when a laser light is irradiated at the colloid. Figure 8a compares the Tyndall effects of deionized water and nano-Ag colloid. The figure shows that only the nano-Ag colloid exhibited light scattering.

Fig. 8
figure 8

a Tyndall effects of deionized water and nano-Ag colloid b Transmission electron microscopy image of nano-Ag and its lattice lines in 20 nm c enlarge part of (b) and (d) Ultraviolet–visible spectroscopy original spectrum

Figure 8b and c shows the transmission electron microscopy image of nano-Ag and its lattice lines. Figure 8b is the enlarged part of the Fig. 8c. Figure 8b shows the image analysis of the nano-Ag colloid at a 5 nm scale. The black elliptical nano-Ag particles and irregularly shaped lattice lines can be clearly observed in the image. The distance between the lattice lines indicates the nano-Ag lattice width, and the width of each layer was measured as approximately 0.2 nm, which is consistent with previous findings regarding nano-Ag width. Figure 8d is the ultraviolet–visible spectroscopy original spectrum of the nano-Ag colloid. It showed that the peak of the absorbance is 0.139 at wavelength around 398 nm. Energy-dispersive X-ray spectroscopy is a subsystem technique that uses the characteristic X-rays of the electron beam rays to analyze the chemical composition of samples. Because different elements have different spectral characteristics, this method was employed for analysis. Table 4 shows the analysis results; oxygen and silver accounted for 56.92% and 43.08% of the overall components, respectively.

Table 4 Energy-dispersive X-ray spectroscopy analysis of nano-Ag particles

Conclusions

In this study, an m-EDM was integrated with a real-time monitoring system to identify problems such as Vgap instability, potential fluctuations, insufficient output, and unfavorable discharge success rate. After modifying the hardware circuit based on these problems, Vgap was successfully stabilized and the discharge success rate was enhanced. The PID adjustment methods (Z-N CLASSIC PID, Z-N Pessen Integral Rule, Z-N with less overshooting, Z-N without overshooting, and Tyreus–Luyben tuning formula) were employed to reduce the probability of short circuits and improve overall discharge efficiency. Finally, through ultraviolet–visible spectroscopy and Zetasizer analysis, this study verified that the deionized water contained nano-Ag particles. The contributions of this study are as follows:

  1. (1)

    The m-EDM mitigated the mechanism counterweight problems, improved the discharge success rate, stabilized the voltage at both ends of the electrode (Vgap), reduced voltage fluctuation, and displayed the values on the VisSim monitoring software.

  2. (2)

    This study identified the probability of short circuits by designing a logic judgment circuit and using various PID closed-loop adjustment methods to determine the optimal PID values. This effectively reduced the probability of short circuits.

  3. (3)

    In five PID methods, the optimal PID adjustment method was Z-N CLASSIC PID, and the optimal nanoparticle characteristics (success rate, particle size analysis, zeta potential, absorbance) were obtained by fine-tuning the PID values. The approach effectively reduced the probability of short circuits, enabling the acquisition of optimal nano-Ag colloid properties.

  4. (4)

    A nano-Ag colloid with a discharge success rate of 50.54%, a particle size of 7.482 nm, a zeta potential of 39.7 mV, and an absorbance of 0.145 was acquired using the ESDM with the self-designed m-EDM. Transmission electron microscopy analysis was used to measure the width of each layer, which was approximately 0.219 nm, and the particle size was determined to be nano level.