Analysis of the Deviation in a Low-Cost System for Stepless Digital Control of Conventional Lathe Spindle Speeds

: A conventional manual lathe electric motor drives the multi-stage gearbox transmitting torque to the spindle so that the workpiece makes contact with the machine tool at a given speed. The cutting speed is proportional to both the diameter of the workpiece and the spindle speed, however, the increments in spindle speed are limited. Manual lathe machines cannot be regulated at the optimum cutting speeds for all diameters. An innovative modernization of the main driveline of a TSB16 manual lathe is proposed in this paper, allowing for a cost-effective system for digital control of spindle speeds using an inverter. The inverter is controlled using an 8-bit AO (analog output) converter with special software developed with Visual Basic. The results of the analysis and various test runs with this new system for automated control of spindle rotation, showed that the required cutting speed can be achieved for any workpiece diameter. The deviation of cutting-speed of the upgraded system for any turning diameter is greatly reduced in comparison with the deviation of cutting-speed of a manual lathe. Finally, tests on this versatile system demonstrated a cost-effective method for modernizing the drive system of conventional lathe machines.


Introduction
Technological advances have led to the modernization of both the control and the power train systems installed in a range of machinery. In many cases, the drive speeds may be regulated by the system, significantly increasing the machining capacity and workable tool life.
The market share for numerically controlled machine tools continues to expand. Computer numerical control (CNC) machine tools are demonstrably of higher accuracy and efficiency than conditions. Tanikić and Marinković [16] used regression analysis for modeling surface roughness in dry single-point turning and for its optimization. They demonstrated the decreasing tendency of surface roughness at increasing cutting speeds and decreasing feed rate and cutting depth. Using an artificial intelligence approach and statistical method, Mia and Dhar [17] developed prediction and optimization models for the average surface roughness parameter. The behavior of the surface roughness parameter was justified by analytical relationships. Rao et al. [18] estimated the effects of cutting parameters (speed, feed, nose radius) on workpiece vibration, machined surface roughness, and the volume of metal removed in steel boring operations (AISI1040). Günay and Yücel [19] optimized the cutting speeds, feed rates and depth of cut values for minimizing the surface roughness during the turning of Ni-hard materials with ceramic and cubic boron nitride (CBN) tools. Mia [20] employed a machine learning approach to solve the optimization problem for surface roughness in turning hardened steel under sustainable cooling condition.
In a study by Khan et al. [21], tool wear was monitored when employing various insert shapes and geometries, using low policrystaline cubic boron nitride (PCBN) inserts and tool-edge preparation, tool coatings, fluid pressure, cutting speeds, and feed rates in the finish turning of Inconel 718.
Özbek et al. [22] studied the impact of the tool-nose radius on residual stress and flank wear over time at various cutting speeds and feed rates in the face turning of Inconel 718. Zou et al. [23] studied the impact of cutting speed, feed rates, and depth of cut on tool life and surface quality in the turning of Ti(C7N3)/WC/TaC cement cutting tools. Jurkovic et al. [24] also made the comparison of three machine learning techniques for prediction of Ra, cutting force (formula presented), and tool lifetime (T) during high speed turning. Orra and Choudhury [25] built an adaptive feedback linear control system to check the variation in cutting force signals to improve tool life. They discussed the use of the transfer function approach for improving mathematical modelling and adaptive control of the process dynamics of turning operations. Mia et al. [26] performed turning experiments on Ti-6Al-4V alloy under dry and high-pressure cooling conditions. The cutting inserts used were coated carbides and the surface quality (in terms of speed and feed) as well as tool wear (in terms of machining time) was discussed. Abbas et al. [27] calculated the Pareto frontier for surface roughness, Ra, and the minimal machining time of a unit volume, T m , of a finished high-strength steel workpiece using an artificial neural network model that was subsequently used for determining the optimal cutting speed v c , feed rate, f, and depth of cut, a p . Rogante [28] presented a tool condition monitoring study on the dry cutting process using observations of the tool life supported by the Taylor tool life model.
Babouri et al. [29] investigated the condition of tools in terms of wear phenomenon and tool-life transition. The experiments consisted of turning operations on AISI D3 steel using a tool coated with a ceramic intermediate layer (TiCN/Al 2 O 3 /TiN). Mikołajczyk et al. [30] presented a study on the automatic prediction of tool life in turning operations. Aramesh et al. [31] investigated the remaining useful tool life under different values of cutting parameters in the turning of Ti-MMC using the actual tool wear value of the worn tool as the input data. Maximum flank wear length at the transition point between the second and third state of tool wear was chosen as the failure criteria.
All of the above studies have demonstrated that cutting speed has the highest influence on tool life. Most of these works applied CNC machines to select different spindle speeds that would achieve the required cutting speed for tools/workpieces of different diameters. However, commercial CNC machines are generally very costly and sometimes machine stability is compromised in an effort to reduce costs. It is worth recalling that many micro-and small-scale machining industries in various countries still utilize conventional machine tools with limited options for controlling spindle speed to produce machined components of different shapes and sizes. The massive size of conventional machines ensures the stability of the machining process. However, limited regulation of spindle speeds can only be obtained in conventional machines with belt drives and gear trains. Under such conditions, it is as difficult to achieve optimum cutting speeds for different diameters of workpiece/tool as it is to achieve the desired productivity. The upgrading of conventional machine tools that are still in good condition is a convenient way of improving productivity. The modernization of such machines can Appl. Sci. 2019, 9, 12 4 of 18 be done through improvements in the drive system and the use of a numerically controlled feed rate. Of course, the economic and technical feasibility of such a process should be carefully considered in each case. The use of an inverter to upgrade the drive is a particularly easy and cost-effective means of modernization [32].
In view of the above facts, the purpose of this paper is to present a versatile system for controlling the spindle speed of a conventional lathe and to demonstrate its benefits by establishing the optimal cutting-speed settings for different workpiece diameters.
This article is presented in three sections: • First, the materials and methods (Analysis of analog output (AO) influence on deviation, conventional and proposed drive system of lathe) are presented, • Second, the results of analysis speed errors using conventional and new systems of drive are presented and the results are discussed, • Third, the conclusions of the study are made.
The study was performed by using an inverter controlled by a computer system to achieve a continuously variable speed control. Furthermore, the analysis of error using digital control system of inverter is presented.

Materials and Methods
In this section we present:

•
The analysis of the effect of AO converter resolution on the deviation of output voltage, • The conventional drive system of a lathe, • Lathe-drive regulation with an inverter.

Analysis of the Effect of Analog Output Converter Resolution on Deviation of Output Voltage
The conceptual basis of stepless control through the use of an inverter can be outlined as follows. A standard inverter was equipped with a manual control to adjust frequency with an analog potentiometer. Each inverter may be adjusted using an external signal. Both voltage (mV) and current (mA) signals may be used and the signals can be received using an AO (analog output) converter connected to a microcomputer. This interface may be used at various resolutions, as both 8-bit and higher resolutions are possible ( Table 1). The typical AO output is 5000 mV. A minimal step in the voltage was calculated at this stage for other resolutions of the AO interfaces. For example, minimal steps of 19.608 mV and 4.888 mV were achieved at resolutions of 8 and 10-bits, respectively. This is an absolute error of output voltage. On the basis of Table 1, the deviation r e of the voltage signal generated by the AO converter for the 8, 10, and 12-bit transmission rates were estimated using the following equation: The values of r eAO decrease significantly with the voltage growth ( Figure 1). The graph ( Figure 1) displays a range of up to 1000 mV or 20% of the maximum value of a voltage of 5000 mV.  Figure 1 shows the low deviation at higher voltages and particularly high deviation values within the low voltage range, especially for the 8-bit resolution of AO. This error is much lower at higher resolutions of AO, due to the step changes in the voltage of the AO converter, especially at low voltage output.

The Conventional Drive System of a Lathe
A TSB16 metalworking lathe (ZSZ Gorlice, Poland) in the workshop is shown in Figure 2. It houses a three-phase electric motor (P = 0.8 kW) combined with a two-stage belt drive and removable wheels that can be operated at 18 speeds. Key data for the lathe are shown in Table 2 (data for threading and lathe fasteners is omitted).    Figure 1 shows the low deviation at higher voltages and particularly high deviation values within the low voltage range, especially for the 8-bit resolution of AO. This error is much lower at higher resolutions of AO, due to the step changes in the voltage of the AO converter, especially at low voltage output.

The Conventional Drive System of a Lathe
A TSB16 metalworking lathe (ZSZ Gorlice, Poland) in the workshop is shown in Figure 2. It houses a three-phase electric motor (P = 0.8 kW) combined with a two-stage belt drive and removable wheels that can be operated at 18 speeds. Key data for the lathe are shown in Table 2 (data for threading and lathe fasteners is omitted).  Figure 1 shows the low deviation at higher voltages and particularly high deviation values within the low voltage range, especially for the 8-bit resolution of AO. This error is much lower at higher resolutions of AO, due to the step changes in the voltage of the AO converter, especially at low voltage output.

The Conventional Drive System of a Lathe
A TSB16 metalworking lathe (ZSZ Gorlice, Poland) in the workshop is shown in Figure 2. It houses a three-phase electric motor (P = 0.8 kW) combined with a two-stage belt drive and removable wheels that can be operated at 18 speeds. Key data for the lathe are shown in Table 2 (data for threading and lathe fasteners is omitted).    The three mechanical and manual feed rates of the lathe propelled by a belt-drive system are shown in Table 3. The three changes to the spindle drive speed of the lathe limit the choice of suitable cutting speeds with significant consequences for the optimum tool life of the cutting edge [34,35]; also optimum cutting speeds cannot be selected with a graded drive system. The recommended cutting speeds for different tool materials, workpiece materials, and machine tools are all listed in the DTR (technical instruction) of the TSB16 lathe [33]. Table 3. TSB16 lathe kinematic system specifications [33].
Appl. Sci. 2019, 9,12 6 of 19 The three mechanical and manual feed rates of the lathe propelled by a belt-drive system are shown in Table 3. The three changes to the spindle drive speed of the lathe limit the choice of suitable cutting speeds with significant consequences for the optimum tool life of the cutting edge [34,35]; also optimum cutting speeds cannot be selected with a graded drive system. The recommended cutting speeds for different tool materials, workpiece materials, and machine tools are all listed in the DTR (technical instruction) of the TSB16 lathe [33]. As a part of the proposed modernization of existing lathe systems, a continuously variable speed main transmission drive was developed using an inverter. A block diagram of the proposed system is presented in Figure 3. The electric motor of the lathe was regulated with an AFREQVAR 100 (type PC1110) inverter, manufactured by OBR USN (Torun, Poland) with a capacity of 1.1 kW, as shown in Figure 4. This inverter converts 50 Hz AC 230V into three phases (3 × 380 V) with an adjustable frequency within the range of 0-120 Hz. It was manufactured in 2010.
Appl. Sci. 2019, 9,12 6 of 19 The three mechanical and manual feed rates of the lathe propelled by a belt-drive system are shown in Table 3. The three changes to the spindle drive speed of the lathe limit the choice of suitable cutting speeds with significant consequences for the optimum tool life of the cutting edge [34,35]; also optimum cutting speeds cannot be selected with a graded drive system. The recommended cutting speeds for different tool materials, workpiece materials, and machine tools are all listed in the DTR (technical instruction) of the TSB16 lathe [33].

Lathe Power Transmission System Regulated with an Inverter
As a part of the proposed modernization of existing lathe systems, a continuously variable speed main transmission drive was developed using an inverter. A block diagram of the proposed system is presented in Figure 3.

Lathe Power Transmission System Regulated with an Inverter
As a part of the proposed modernization of existing lathe systems, a continuously variable speed main transmission drive was developed using an inverter. A block diagram of the proposed system is presented in Figure 3. The three mechanical and manual feed rates of the lathe propelled by a belt-drive system are shown in Table 3. The three changes to the spindle drive speed of the lathe limit the choice of suitable cutting speeds with significant consequences for the optimum tool life of the cutting edge [34,35]; also optimum cutting speeds cannot be selected with a graded drive system. The recommended cutting speeds for different tool materials, workpiece materials, and machine tools are all listed in the DTR (technical instruction) of the TSB16 lathe [33].

Lathe Power Transmission System Regulated with an Inverter
As a part of the proposed modernization of existing lathe systems, a continuously variable speed main transmission drive was developed using an inverter. A block diagram of the proposed system is presented in Figure 3. The electric motor of the lathe was regulated with an AFREQVAR 100 (type PC1110) inverter, manufactured by OBR USN (Torun, Poland) with a capacity of 1.1 kW, as shown in Figure 4. This inverter converts 50 Hz AC 230V into three phases (3 × 380 V) with an adjustable frequency within the range of 0-120 Hz. It was manufactured in 2010. The electric motor of the lathe was regulated with an AFREQVAR 100 (type PC1110) inverter, manufactured by OBR USN (Torun, Poland) with a capacity of 1.1 kW, as shown in Figure 4. This inverter converts 50 Hz AC 230V into three phases (3 × 380 V) with an adjustable frequency within the range of 0-120 Hz. It was manufactured in 2010.
According to the manufacturer's description, we expect that in the speed range from 30-100%, the electric motor works with a constant torque equal to the rated torque of the electric motor, and in the speed range above the rated, the electric motor works at a constant power which is equal to the rated power of the electric motor.
Nowadays, the cost of a similar inverter LG/LS-1.5 KW 1F is approximately $150 [36]. The inverter AFREQVAR 100 was selected because it has sufficient power for the TSB16 metalworking lathe. A convenient feature of the inverter was that it generates three-phase current from single phase current. This also ensures the possibility of using a machine tool with the developed drive control if there is no access to a three-phase network.
In a conventional setting mode, the knob of the inverter is used to regulate stepless manual speed control (Figure 4). The inverter may also be remotely controlled by using an electric signal -voltage 0-5 V or amperage 0-20 mV ( Figure 5). This was also very important when choosing it for implementation.
Appl. Sci. 2019, 9, 12 7 of 19 According to the manufacturer's description, we expect that in the speed range from 30-100%, the electric motor works with a constant torque equal to the rated torque of the electric motor, and in the speed range above the rated, the electric motor works at a constant power which is equal to the rated power of the electric motor.
Nowadays, the cost of a similar inverter LG/LS-1.5 KW 1F is approximately $150 [36]. The inverter AFREQVAR 100 was selected because it has sufficient power for the TSB16 metalworking lathe. A convenient feature of the inverter was that it generates three-phase current from single phase current. This also ensures the possibility of using a machine tool with the developed drive control if there is no access to a three-phase network.
In a conventional setting mode, the knob of the inverter is used to regulate stepless manual speed control ( Figure 4). The inverter may also be remotely controlled by using an electric signal -voltage 0-5 V or amperage 0-20 mV ( Figure 5). This was also very important when choosing it for implementation. Remote control of the inverter with an electric signal makes it possible to develop a computer control system. A voltage signal using an AO converter was proposed for remote control. The control system uses a computer touch screen (Figure 6), which provides a convenient means of position control. The monitor will be positioned alongside the lathe once the lathe housing has been suitably adapted. The touch screen plays the role of human-machine-interface (HMI). Activation of the display in the upper part of the monitor presents the current lathe spindle speed. The control computer used was a Dell Optiplex GX520, 3.0 GHz with Win XP. This computer is equipped with many USB ports and LPT (local print terminal). This makes it suitable for control purposes. Remote control of the inverter with an electric signal makes it possible to develop a computer control system. A voltage signal using an AO converter was proposed for remote control.
Appl. Sci. 2019, 9, 12 7 of 19 According to the manufacturer's description, we expect that in the speed range from 30-100%, the electric motor works with a constant torque equal to the rated torque of the electric motor, and in the speed range above the rated, the electric motor works at a constant power which is equal to the rated power of the electric motor.
Nowadays, the cost of a similar inverter LG/LS-1.5 KW 1F is approximately $150 [36]. The inverter AFREQVAR 100 was selected because it has sufficient power for the TSB16 metalworking lathe. A convenient feature of the inverter was that it generates three-phase current from single phase current. This also ensures the possibility of using a machine tool with the developed drive control if there is no access to a three-phase network.
In a conventional setting mode, the knob of the inverter is used to regulate stepless manual speed control ( Figure 4). The inverter may also be remotely controlled by using an electric signal -voltage 0-5 V or amperage 0-20 mV ( Figure 5). This was also very important when choosing it for implementation. Remote control of the inverter with an electric signal makes it possible to develop a computer control system. A voltage signal using an AO converter was proposed for remote control. The control system uses a computer touch screen (Figure 6), which provides a convenient means of position control. The monitor will be positioned alongside the lathe once the lathe housing has been suitably adapted. The touch screen plays the role of human-machine-interface (HMI). Activation of the display in the upper part of the monitor presents the current lathe spindle speed. The control computer used was a Dell Optiplex GX520, 3.0 GHz with Win XP. This computer is equipped with many USB ports and LPT (local print terminal). This makes it suitable for control purposes. The control system uses a computer touch screen (Figure 6), which provides a convenient means of position control. The monitor will be positioned alongside the lathe once the lathe housing has been suitably adapted. The touch screen plays the role of human-machine-interface (HMI). Activation of the display in the upper part of the monitor presents the current lathe spindle speed. The control A special Velleman K8055 universal interface, as shown in Figure 7, was connected to the computer control system of the inverter. The interface was equipped with 2 × AO, 8 × DO, 2 × AI, and 5 × DI that cost $21.50. The scheme for using an AO port installed for remote control of the inverter is shown in Figure 4. Other inputs and outputs of the K8055 universal interface can also be used to create feedback control systems. For example, digital inputs can be used to measure the real spindlespeed value and to read the distance of the spindle from the spindle axis. These measurements are useful for adaptive control, which maintains the cutting speeds in proportion with diametrical variations while processing.

Spindle Rotation Using an Electric Power System with an Inverter
By connecting the inverter to the electric motor, stepless control of the speed is possible. The rotational speed may either be decreased or increased. An example of using an inverter for control of the TSB16 spindle is presented in Figure 8. The electric motor power that the inverter regulates is transmitted via the gearing to the lathe spindle drive. The arbitrarily adopted lower limit of the inverter was 20 Hz at an idling electric motor speed with appropriate fan cooling.
In the example that is presented here, the inverter control adjusts the main frequency within the range of 20 to 80 Hz to drive the entire range of lathe spindle rotations with only one gear change (Figure 8) in the electric motor. Fan cooling of the motor axis limits the range of low Hz values. The nominal speed of the electric motor design represents the limit on high speeds. A special Velleman K8055 universal interface, as shown in Figure 7, was connected to the computer control system of the inverter. The interface was equipped with 2 × AO, 8 × DO, 2 × AI, and 5 × DI that cost $21.50. The scheme for using an AO port installed for remote control of the inverter is shown in Figure 4. Other inputs and outputs of the K8055 universal interface can also be used to create feedback control systems. For example, digital inputs can be used to measure the real spindle-speed value and to read the distance of the spindle from the spindle axis. These measurements are useful for adaptive control, which maintains the cutting speeds in proportion with diametrical variations while processing. A special Velleman K8055 universal interface, as shown in Figure 7, was connected to the computer control system of the inverter. The interface was equipped with 2 × AO, 8 × DO, 2 × AI, and 5 × DI that cost $21.50. The scheme for using an AO port installed for remote control of the inverter is shown in Figure 4. Other inputs and outputs of the K8055 universal interface can also be used to create feedback control systems. For example, digital inputs can be used to measure the real spindlespeed value and to read the distance of the spindle from the spindle axis. These measurements are useful for adaptive control, which maintains the cutting speeds in proportion with diametrical variations while processing.

Spindle Rotation Using an Electric Power System with an Inverter
By connecting the inverter to the electric motor, stepless control of the speed is possible. The rotational speed may either be decreased or increased. An example of using an inverter for control of the TSB16 spindle is presented in Figure 8. The electric motor power that the inverter regulates is transmitted via the gearing to the lathe spindle drive. The arbitrarily adopted lower limit of the inverter was 20 Hz at an idling electric motor speed with appropriate fan cooling.
In the example that is presented here, the inverter control adjusts the main frequency within the range of 20 to 80 Hz to drive the entire range of lathe spindle rotations with only one gear change (Figure 8) in the electric motor. Fan cooling of the motor axis limits the range of low Hz values. The nominal speed of the electric motor design represents the limit on high speeds.
The lowest electric motor speed when connected to the inverter was 600 rpm and the maximum

Spindle Rotation Using an Electric Power System with an Inverter
By connecting the inverter to the electric motor, stepless control of the speed is possible. The rotational speed may either be decreased or increased. An example of using an inverter for control of the TSB16 spindle is presented in Figure 8. The electric motor power that the inverter regulates is transmitted via the gearing to the lathe spindle drive. The arbitrarily adopted lower limit of the inverter was 20 Hz at an idling electric motor speed with appropriate fan cooling.
In the example that is presented here, the inverter control adjusts the main frequency within the range of 20 to 80 Hz to drive the entire range of lathe spindle rotations with only one gear change ( Figure 8) in the electric motor. Fan cooling of the motor axis limits the range of low Hz values. The nominal speed of the electric motor design represents the limit on high speeds.
The lowest electric motor speed when connected to the inverter was 600 rpm and the maximum was 2400 rpm.

Machining Optimization Methodology
The use of the developed power system using an inverter was elaborated by a special methodology based on the limitations of the inverter control with the use of AO (Figure 1). To set the technological parameters, we needed to know the value of the cutting speed vc. This value is determined on the basis of the catalog information from the tool manufacturers for selected materials. The aim of the developed methodology was to optimally utilize the capabilities of the developed propulsion system, taking into account both the power supply of the motor by the inverter and the construction of a conventional drive system. The essence of the proposed hybrid drive system, considering it includes both a continuously variable speed control system for the electric motor and the existing gear ratios of the machine tool, was to ensure the possibility of machining at a wide range of cutting speeds and workpiece diameters. The basic assumption was to obtain a drive system with minimal use of the necessary gear changes. An algorithm written with specialized system-control software is presented in Figure 9.
The technological process data were applied in the algorithm to calculate both the cutting speed, vc, and the spindle rotation speed, ns, as well as to assess changes in the electric motor speed, when signals are sent to the inverter through an analog output control. If a signal is not sent, the system will eventually change gear.

Machining Optimization Methodology
The use of the developed power system using an inverter was elaborated by a special methodology based on the limitations of the inverter control with the use of AO (Figure 1). To set the technological parameters, we needed to know the value of the cutting speed v c . This value is determined on the basis of the catalog information from the tool manufacturers for selected materials. The aim of the developed methodology was to optimally utilize the capabilities of the developed propulsion system, taking into account both the power supply of the motor by the inverter and the construction of a conventional drive system. The essence of the proposed hybrid drive system, considering it includes both a continuously variable speed control system for the electric motor and the existing gear ratios of the machine tool, was to ensure the possibility of machining at a wide range of cutting speeds and workpiece diameters. The basic assumption was to obtain a drive system with minimal use of the necessary gear changes. An algorithm written with specialized system-control software is presented in Figure 9.
The technological process data were applied in the algorithm to calculate both the cutting speed, v c , and the spindle rotation speed, n s , as well as to assess changes in the electric motor speed, when signals are sent to the inverter through an analog output control. If a signal is not sent, the system will eventually change gear.
The voltage value U is controlled on the basis of the initial calibration dependence of the inverter input voltage, following the scheme shown in (Figure 9): where n e is the electric motor speed and c inv is a proportionality coefficient for the inverter. The inverter is controlled using an analog output controlled by an 8-bit converter. Hence the need to calculate the bit value B for sending numbers in the range of 0 to 255. It is calculated using the inverter input voltage U (1): where c AO is an AO proportionality coefficient.

Figure 9.
A simplified algorithm of a cutting-speed control system using an inverter.
The voltage value U is controlled on the basis of the initial calibration dependence of the inverter input voltage, following the scheme shown in (Figure 9): where ne is the electric motor speed and cinv is a proportionality coefficient for the inverter. The inverter is controlled using an analog output controlled by an 8-bit converter. Hence the need to calculate the bit value B for sending numbers in the range of 0 to 255. It is calculated using the inverter input voltage U (1): where cAO is an AO proportionality coefficient. However, due to the design of the electric motor and to avoid damaging the object, the maximum voltage that was applied equaled 3333 mV, which was sufficient to reach a current frequency of 80Hz and an electric motor speed of 2400 rpm.

Special Software for Control System Using Inverter
To control the developed system, the authors used an especially elaborated in Visual Basic (VB6) own software, Speed Control. The software that was developed uses objects that facilitate control over the computer interface. A screenshot of this software is shown in Figure 10. It is also possible to However, due to the design of the electric motor and to avoid damaging the object, the maximum voltage that was applied equaled 3333 mV, which was sufficient to reach a current frequency of 80 Hz and an electric motor speed of 2400 rpm.

Special Software for Control System Using Inverter
To control the developed system, the authors used an especially elaborated in Visual Basic (VB6) own software, Speed Control. The software that was developed uses objects that facilitate control over the computer interface. A screenshot of this software is shown in Figure 10. It is also possible to enter the cutting speed value manually. The size of the panel was adapted to the resolution used by the touch screen (768 × 1000 pixels).
The software contains the data from the lathe instructions, permitting the selection of cutting speeds for specific conditions including: processing method (turning, boring et al.).
These data should be indicated in the input panel of the processing conditions. The software is equipped with information on the lathe gears ratios according to the kinematic diagram ( Table 3). The actual sets of gears should be marked as first gear or second gear. Hence, for easier notation (Table 3, Figure 8) for the electric motor gearing is: Appl. Sci. 2019, 9, 12 11 of 19 enter the cutting speed value manually. The size of the panel was adapted to the resolution used by the touch screen (768 × 1000 pixels). The software contains the data from the lathe instructions, permitting the selection of cutting speeds for specific conditions including: processing method (turning, boring et al.).
These data should be indicated in the input panel of the processing conditions. The software is equipped with information on the lathe gears ratios according to the kinematic diagram ( Table 3). The actual sets of gears should be marked as first gear or second gear. Hence, for easier notation (Table 3, Figure 8) for the electric motor gearing is: The index and the designation determine the location of the V-belt (along the spindle) from left to right. Gear ratios are stored in a data file (.csv) of the Speed Control software. Each change produces an updated record. There is also another database associated with the properties of the workpiece materials and the cutting edge that could be used. These alternatives are convenient because of steady progress in the field of materials for turning tools and their manufacture. The The index and the designation determine the location of the V-belt (along the spindle) from left to right. Gear ratios are stored in a data file (.csv) of the Speed Control software. Each change produces an updated record. There is also another database associated with the properties of the workpiece materials and the cutting edge that could be used. These alternatives are convenient because of steady progress in the field of materials for turning tools and their manufacture. The machine must be properly supported at the time of each (gear) change following the relevant software command.

Results and Discussion
Practical applications of the software confirmed the usefulness of the experiment. Here, we present:

•
Test results for the spindle speed control system, • Analysis of deviation in the conventional power system, • Analysis of deviation in the inverter-based power system, • Discussion of the results.

Tests of the Spindle Speed Control System
A calibration test was performed to control the electric motor speed using a voltage signal ( Figure 11). It confirm proposed relation (2). The software program signals a gear change in order to obtain the desired cutting-speed control. An analog voltage signal is sent to the inverter control system combining the AO of the K8055 interface with the accuracy of an 8-bit converter (0 to 255 level). An example of the software answer for another input of d value and gear setting is presented in Figure 12. A single cutting-speed value, v c = 150 m/min was analyzed to compare the two solutions for the lathe power system: the conventional one and the inverter-based innovation.
The Speed Control software sends a signal to determine the inverter control voltage for the appropriate speed (Figure 12a). It also verifies the situations in which the gear ratio was not adapted (Figure 12b). After the system makes the proposed change of gear we get the message, "setting Ok" (Figure 12c).
Practical applications of the software confirmed the usefulness of the experiment. Here, we present:

•
Test results for the spindle speed control system, • Analysis of deviation in the conventional power system, • Analysis of deviation in the inverter-based power system, • Discussion of the results.

Tests of the Spindle Speed Control System
A calibration test was performed to control the electric motor speed using a voltage signal ( Figure 11). It confirm proposed relation (2). The software program signals a gear change in order to obtain the desired cutting-speed control. An analog voltage signal is sent to the inverter control system combining the AO of the K8055 interface with the accuracy of an 8-bit converter (0 to 255 level). An example of the software answer for another input of d value and gear setting is presented in Figure 12. A single cutting-speed value, vc = 150 m/min was analyzed to compare the two solutions for the lathe power system: the conventional one and the inverter-based innovation.
The Speed Control software sends a signal to determine the inverter control voltage for the appropriate speed (Figure 12a). It also verifies the situations in which the gear ratio was not adapted (Figure 12b). After the system makes the proposed change of gear we get the message, "setting Ok" (Figure 12c).

Analysis of Deviation in the Conventional Power System
The analysis of deviation (Figures 13 and 14) was done using real data on gearing and the abovementioned vc value. In Figure 13, the influence of the workpiece diameter on the cutting-speed value that can be achieved using the conventional power system with gears is shown. There are significant relative-error values that show incremental changes because the gear ratios are conventional with a limited number of degrees. These results were compared with the new solution for the power system.

Analysis of Deviation in the Conventional Power System
The analysis of deviation (Figures 13 and 14) was done using real data on gearing and the above-mentioned v c value. In Figure 13, the influence of the workpiece diameter on the cutting-speed value that can be achieved using the conventional power system with gears is shown. There are significant relative-error values that show incremental changes because the gear ratios are conventional with a limited number of degrees. These results were compared with the new solution for the power system.
The results show that a change of gear in the electric motor is necessary in many cases to change the spindle speed of the lathe when using the conventional drive system. Using this solution, we obtain a significant difference between the optimum cutting speed and the cutting speed that is obtained in practice ( Figure 14). The error is introduced at the time of the gear change that is needed at a given point in time to achieve the required v c .

Analysis of Deviation in the Conventional Power System
The analysis of deviation (Figures 13 and 14) was done using real data on gearing and the abovementioned vc value. In Figure 13, the influence of the workpiece diameter on the cutting-speed value that can be achieved using the conventional power system with gears is shown. There are significant relative-error values that show incremental changes because the gear ratios are conventional with a limited number of degrees. These results were compared with the new solution for the power system.
The results show that a change of gear in the electric motor is necessary in many cases to change the spindle speed of the lathe when using the conventional drive system. Using this solution, we obtain a significant difference between the optimum cutting speed and the cutting speed that is obtained in practice ( Figure 14). The error is introduced at the time of the gear change that is needed at a given point in time to achieve the required vc.

Analysis of Deviation in the Inverter Based Power System
As the inverter is controlled using an 8-bit converter, the accuracy of the electric motor speed control will depend on the output voltage. The minimal value of a step is 19.608 mV for each bit, as presented in Table 1. The graph presented in Figure 15 is based on the relation between the deviation of the electric motor speed controlled using the AO converter and its deviation is dependent on the value of the controlled voltage. It was shown ( Figure 15) that due to the use of digital inverter control, the error depends on the output voltage for lower voltage values and the deviation increases up to 8%. However, for speeds above 600 rpm, the error value will drop below 4% and obtain a value below 2% for a nominal speed of 1500 rpm and for speeds of 2400 rpm 1%.

Analysis of Deviation in the Inverter Based Power System
As the inverter is controlled using an 8-bit converter, the accuracy of the electric motor speed control will depend on the output voltage. The minimal value of a step is 19.608 mV for each bit, as presented in Table 1. The graph presented in Figure 15 is based on the relation between the deviation of the electric motor speed controlled using the AO converter and its deviation is dependent on the value of the controlled voltage. It was shown ( Figure 15) that due to the use of digital inverter control, the error depends on the output voltage for lower voltage values and the deviation increases up to 8%. However, for speeds above 600 rpm, the error value will drop below 4% and obtain a value below 2% for a nominal speed of 1500 rpm and for speeds of 2400 rpm 1%.
presented in Table 1. The graph presented in Figure 15 is based on the relation between the deviation of the electric motor speed controlled using the AO converter and its deviation is dependent on the value of the controlled voltage. It was shown ( Figure 15) that due to the use of digital inverter control, the error depends on the output voltage for lower voltage values and the deviation increases up to 8%. However, for speeds above 600 rpm, the error value will drop below 4% and obtain a value below 2% for a nominal speed of 1500 rpm and for speeds of 2400 rpm 1%. A further example of using the inverter system for electric motor speed control is presented in Figure 16. Machining within the full range of lathe speeds, presented as the diameters of the lathe workpiece, was done with only two gears (G1-D3 and G1-D2). The thicker the diameter, the lower the electric motor-speed values, hence, the deviation increased with the diameter as shown in the graph presented in Figure 17. A further example of using the inverter system for electric motor speed control is presented in Figure 16. Machining within the full range of lathe speeds, presented as the diameters of the lathe workpiece, was done with only two gears (G1-D3 and G1-D2). The thicker the diameter, the lower the electric motor-speed values, hence, the deviation increased with the diameter as shown in the graph presented in Figure 17.

Discussion
The developed low-cost control system enabled the use of stepless speed control with the accuracy as indicated in the analysis.
The results showed that the use of an automated spindle rotation control provides a stable

Discussion
The developed low-cost control system enabled the use of stepless speed control with the accuracy as indicated in the analysis.
The results showed that the use of an automated spindle rotation control provides a stable cutting-speed. In conventional systems, there is sometimes a need to reduce the cutting speed by 20%.

Discussion
The developed low-cost control system enabled the use of stepless speed control with the accuracy as indicated in the analysis.
The results showed that the use of an automated spindle rotation control provides a stable cutting-speed. In conventional systems, there is sometimes a need to reduce the cutting speed by 20%. By using an inverter for speed control of the electric motor, it was possible to achieve stepless control of the spindle rotation.
As shown in Figures 16 and 17, machining within the full range of lathe speeds was done with only two gears (G1-D3 and G1-D2). The deviation increased with the diameter, as shown in the graph presented in Figure 17.
The deviation in accuracy was only in excess of 4% at low electric motor speeds of 600 rpm, due to the 8-bit converter controller. The error value dropped below 4% to reach a value below 2% for a nominal speed of 1500 rpm and for speeds of 2400 rpm 1%.
This level of error reduces the processing efficiency and significantly changes the cutting conditions, which may in turn have an impact on the surface condition and cutting-edge durability.
Further improvements in the present system can be made by applying feedback loops to enable maintenance of the set speed based on the actual spindle speed.
In addition, automatic measurement of the workpiece diameter or the distance of the tip of the cutting edge from the center of rotation is advisable for automatic selection of the speed for a previously established cutting-tool material and a workpiece with a preset optimum cutting speed.
It should also be mentioned that further improvements to these machines can be introduced through modernization of the feed systems with a servo-drive type or by using a step motor; the servo-drive is especially convenient due to its low cost.
The cost of the control system, without taking into account the cost of the computer was approximately $ 175 with power of 1.5 kW [36]. The ATMEGA microprocessor may also be used instead of a computer. Only the price of the inverter changes with a higher drive power. For example, the cost of LG/LS-7.5 KW 3F, SV075IG5A-4 inverter is $ 465 [37]; far less expensive than CNC machines with infinitely variable speed controls.
The stepless speed control enables optimum cutting speeds to be selected based on the material type of the edge and the material to be machined for each workpiece diameter. Reported literature and practice allow us to achieve the desired edge durability [30,32,38] and surface condition [27,39,40]. Achieving a constant cutting speed is particularly desirable in turning faces with a continuous change in the turning diameter. The developed configuration is adapted to the development of continuous on-line control of the machining speed, which requires the equipment to be equipped with a measurement system for the machining diameter.

Conclusions
In this paper, the problem of achieving an optimum cutting speed for each workpiece diameter with a conventional lathe was approached by coupling an inverter to the lathe-drive system. The method that has been presented can achieve infinitely variable cutting speeds by remodeling the propulsion system. The proposed low-cost system is simple and intuitive to use, and is manually controlled by the frequency reference using the potentiometer to obtain the desired speed.
An electronic system has been developed for the analysis of the necessary spindle rotation speed and control of the inverter voltage using an electric signal. In turn, optimal tool life and the required surface roughness values can more easily be achieved. Moreover, the system can significantly increase the quality of the cutting process.
The results have shown that the use of automated spindle rotation control provides a stable cutting-speed value. In conventional systems, there is sometimes a need to reduce the cutting speed by 20%. By using an inverter for speed control of the electric motor, it has been possible to achieve stepless control of the spindle rotation.
The deviation in accuracy is only in excess of 4% at low electric motor speeds of 600 rpm, due to the 8-bit converter controller. The error value will drop below 4% to reach a value below 2% for a nominal speed of 1500 rpm and to 1% for speeds of 2400 rpm.
This level of error reduces the processing efficiency and significantly changes the cutting conditions, which may in turn have an impact on the surface condition and cutting-edge durability.
Further improvements to the present system can be made by applying feedback loops to enable maintenance of the set speed based on the actual spindle speed.
In addition, automatic measurement of workpiece diameter or the distance of the tip of the cutting edge from the center of rotation is advisable for automatic selection of the speed for a previously established cutting-tool material and a workpiece with a preset optimum cutting speed.
It should also be mentioned that further improvements to these machines can be introduced through modernization of the feed systems with a servo-drive type or by using a step motor; the servo-drive is especially convenient due to its low cost.
The proposed solution can be interesting to handle legacy and reliable equipment.