Appendix A
Figure A1 presents an experimental setup for the simulation analysis of an electromechanical control system for an automatic bread machine.
Figure A1.
Experimental setup—schematic diagram. 1—single-phase asynchronous electric motor; 2—starting capacitor; 3—belt drive; 4—stirring mechanism; 5—viscoelastic load (bread dough); 6—container in which the dough is kneaded.
Figure A1.
Experimental setup—schematic diagram. 1—single-phase asynchronous electric motor; 2—starting capacitor; 3—belt drive; 4—stirring mechanism; 5—viscoelastic load (bread dough); 6—container in which the dough is kneaded.
Figure A2 shows the settings of the electric motor and load generation unit. The first part of the figure shows the settings of the single-phase asynchronous motor used in this paper. The motor is bipolar and equipped with a starting capacitor that provides the necessary starting torque. It is configured for a rated apparent power of 105.3 VA, an operating voltage of 220 V, and a frequency of 50 Hz. The model includes the electrical parameters of the main and auxiliary windings, such as their resistances and inductances, as well as the mechanical characteristics of the motor, including its inertia. A capacitor with a capacitance of 4 μF and a resistance of 100 Ω is used during start-up. The auxiliary winding and the capacitor are automatically disconnected once the motor reaches approximately 75% of its synchronous speed, which improves efficiency during steady-state operation. The second part of the figure illustrates the load-generation block that simulates the viscoelastic behavior of the dough during the kneading process. The implemented functional unit reproduces a combined load consisting of viscous friction and a time-dependent farinograph-type torque profile. The viscous component is continuously present and is proportional to the angular velocity of the motor shaft. The farinograph-like component reaches a maximum torque of 1.2 Nm and varies over time to emulate a realistic kneading cycle: it increases linearly during the first 5 s, remains constant for 20 s, and then decreases linearly over the following 15 s before returning to zero. The total load applied to the motor is the sum of these two components, enabling the simulation of a dynamic and realistic viscoelastic load characteristic of dough mixing, where resistance depends both on rotational speed and on the phase of the working process.
Figure A2.
Settings of the electric motor and load generation unit: (a) settings of the electric motor; (b) code in the functional block for the load generation unit in the electromechanical system.
Figure A2.
Settings of the electric motor and load generation unit: (a) settings of the electric motor; (b) code in the functional block for the load generation unit in the electromechanical system.
Table A1 presents the algorithm for determining the operating point of an AC and DC electric motor. The symbols in the table are as follows:
N, rpm—speed of the electric motor;
ω, rad/s—angular speed;
U, V—supply voltage;
I, A—total current of the electric motor, including active and reactive components;
Ia, A—current creating torque in the AC motor;
cos(
φ)—power factor;
Iact, A—active component of the current;
Ir, A—current in the rotor creating torque;
f, Hz—frequency of the supply voltage;
p—number of poles of the electric motor;
Ns, rpm—synchronous speed of the electric motor;
ωs, rad/s—synchronous angular speed of the electric motor;
S, a.u.—slip of the electric motor;
Pn, W—nominal power;
ωn, rad/s—nominal angular velocity;
Tn, Nm—nominal torque;
Tmax, Nm—maximum torque;
Tmot, Nm—torque of the electric motor;
Tload, Nm—load torque, linearized load model;
I, a.u.—gear ratio (ratio) of the belt drive;
ωmix, rad/s—angular speed after the belt drive;
Tmix, Nm—torque after the belt drive;
ωwp, rad/s—angular speed at the operating point;
Twp, Nm—torque at the operating point;
a and
b are coefficients of the load characteristic equation.
Table A1.
Algorithm for determining the operating point of an AC electric motor.
Table A1.
Algorithm for determining the operating point of an AC electric motor.
| Stage | Name | Equation | Number |
|---|
| 1 | Conversion of revolutions into angular velocity | | (A1) |
| 2 | Active current (active component) | | (A2) |
| 3 | Rotor current | | (A3) |
| 4 | No load speed (synchronous speed) | | (A4) |
| 5 | No load angular velocity (synchronous angular velocity) | | (A5) |
| 6 | Nominal angular velocity | | (A6) |
| 7 | Nominal torque | | (A7) |
| 8 | Stall torque (maximum torque) | | (A8) |
| 9 | Mechanical characteristic | | (A9) |
| 10 | Slip | | (A10) |
| 11 | Load characteristic | | (A11) |
| 12 | Operating point | | (A12) |
| 13 | After belt drive | | (A13) |
| 14 | Mechanical characteristic after gearing | | (A14) |
| 15 | Operating point after gearing | | (A15) |
Table A2 presents the hardware used to build a device for determining the characteristics of an electromechanical system of an automatic bread machine. The Mega 2560 single-board microcomputer is used to execute programs for controlling electronic components, while the Nextion Intelligent 4.3” NX4827P043-011 touch display visualizes data and accepts commands by touch. The Vemark VGX-4825DA TRIAC switch is used for contactless switching of electrical circuits, and the HM-550 (MAX6675) digital amplifier converts an analog signal from a thermocouple into digital temperature data. The power supply unit converts the mains voltage from 220V AC to 5V DC for powering electronic devices. Capacitors 470 µF, 16V DC MKP10 and Vemark 4 µF ±5% stabilize the voltage and filter electrical signals. The CBM-6511 automatic bread machine was used as the basis for creating the experimental model of an electromechanical system. The ACS712 5A current sensor measures the electric current in the electric motor circuit, and the frequency sensor F249 monitors its rotation speed.
Table A2.
Technical specification of the selected hardware.
Table A2.
Technical specification of the selected hardware.
| Model | Type of the Device | Manufacturer | City, Country |
|---|
| Mega 2560 | Single-board microcomputer | Sunfounder Inc., Shenzhen, China | https://www.sunfounder.com (accessed on 10 February 2025) |
| Nextion Intelligent 4.3” NX4827P043-011 | Touch-sensitive display | ITEAD Intelligent Systems Co., Ltd. | Shenzhen, China |
| Vemark VGX-4825DA | TRIAC switch (SSR) | Vikiwat Ltd. | Plovdiv, Bulgaria |
| HM-550, based on integrated circuit Max6675 | Digital thermocouple amplifier | Chipskey Technology Co., Ltd. | Shenzhen, China |
| 220V AC to 5V DC, 2A | Power supply unit | Penghan New energy Co., Ltd. | Wenzhou, China |
| 470 µF, 16V DC MKP10 | Capacitor | WIMA GmbH & Co. KG | Mannheim, Germany |
| Vemark 4 µF ± 5% | Capacitor | Vikiwat Ltd. | Plovdiv, Bulgaria |
| CBM-6511, 600 W | Automatic bread machine | Crown | Shanghai, China |
| ACS712 5A | Current sensor | Allegro Micro Systems, Inc. | Worcester, MA, USA |
| F249 | Speed sensor | DAOKI | Shenzhen, China |
The circuit of the voltage sensor is presented in
Figure A2. The voltage of 200 V AC is reduced to 6 V AC by a transformer. A voltage divider with 1 kΩ resistors is used. The 1N4007 rectifier diode cuts off the lower half-wave of the sinusoidal signal. The 470 µF capacitor smooths the resulting voltage signal. The Zener diode limits the voltage to 5 V DC. The output from the sensor is connected to an analog input of a single-board microcomputer.
Figure A3.
Voltage sensor—electrical diagram.
Figure A3.
Voltage sensor—electrical diagram.
The analog input of the single board computer is 10 bit. For this reason, the 0–5 V DC signal is represented as 0–1023 bit. It is necessary to calculate the V/bit ratio, according to the following formula:
where
b is the value (0–1023) obtained from the ADC of the single-board microcomputer.
The conversion of the signal from the sensor is performed by calculating the effective value of the input voltage (
Urms). It is calculated from the peak value of the voltage (
Umax) according to the following formula:
Table A3 shows in tabular form the algorithm of the software support of an electromechanical system control system. The algorithm implements the control and monitoring of an electromechanical system using a microcontroller that measures and processes physical quantities such as temperature, voltage, current, and revolutions (RPM); then, it calculates power, torque, and derivative value tmix; and the results are visualized through a connected Nextion display. In the initial phase, the initialization of pins and serial connections is performed. In the main cycle (loop), the sensors provide data on temperature, voltage, and current, and the calculations are used to determine the current parameters of the system. The data are sent to the display in both text and graphical form. The algorithm monitors commands from the user (such as “start motor” or “stop”), processes them, and controls the motor and PID control to maintain a set temperature.
Table A3.
Algorithm of software for an electromechanical system control system.
Table A3.
Algorithm of software for an electromechanical system control system.
| № | Function | Description |
|---|
| Input Data | I, A; U, V; N, rpm; Display Button Status |
|---|
| 1 | Initialization (setup) | Setting pins, starting serial communication with: Serial, Serial2 (Nextion), Serial3 |
| 2 | Determine RPM | With the help of calculateRPM(), by input from pin 7 |
| 3 | Measure temperature | From MAX6675 thermocouple via .readCelsius() |
| 4 | Measure voltage | readVoltage()—via analog input A0 |
| 5 | Measure current | readCurrent()—via analog pin A5 with conversion calculations |
| 6 | Calculate power (W) | power = voltage × current |
| 7 | Calculate torque | calculateTorque()—uses RPM and power |
| 8 | Calculate tmix | tmix = torque × 0.105 |
| 9 | Send to display | Sends all measured values to the Nextion display via sendToNextion() |
| 10 | Send commands to graph | Visualization commands (“add 5,2,” and “add 5,0,”) |
| 11 | Process input commands | Accepting commands from Nextion (via Serial2) when 0xFF is received 3 times |
| 12 | Call processCommand | Analysis of display commands (startmotor, stopmotor, start, stop) |
| Output data | P, W; T, Nm; Tmix, Nm; text and graphic visualization on the display |
The input data entry and the calculation of the output variables are implemented in the form of subroutines.
Table A4 lists these subroutines. The subroutines in the algorithm ensure the modular and efficient operation of the system by performing specific control, measurement, calculation and visualization tasks. They process input commands (processCommand, continuous), control the operating mode of the electric motor (mix), implement communication with the display (sendToNextion), and perform measurements from voltage, current and speed sensors (readVoltage, readCurrent, calculateRPM). Calculations for torque and (Tmix) are performed by (calculateTorque), and PID temperature control is implemented by the function (pid), which controls the heater via a PWM signal.
Table A4.
Subroutines in the software of an electromechanical control system.
Table A4.
Subroutines in the software of an electromechanical control system.
| Function | Description |
|---|
| processCommand() | Registers commands from the display: start/stop of the electric motor (with or without timer) |
| mix(uint32_t d1) | Interval start of the electric motor for a set time (in minutes). Controls icons on the Nextion display |
| continuous(cmd) | Starts the PID controller and starts the electric motor continuously until it receives a stop command |
| sendToNextion() | Sends values to the display in the required format with terminators 0xFF |
| readVoltage() | Reads an analog signal and calculates voltage (calibrated with coefficients) |
| readCurrent() | Converts analog input to the effective value of the current using the appropriate formula |
| calculateRPM() | Reads pulsations from the speed sensor and converts them to revolutions per minute (every 4 s) |
| calculateTorque() | Calculates the electric motor torque T, Nm and the agitator torque Tmix, Nm |
| pid(Setpoint) | PID temperature controller: regulates the PWM of the heater (HEATER_PIN) relative to a set value |
Using the Nextion Editor programming system, a graphical user interface (HMI) of software for controlling the electromechanical system of an automatic bread machine has been developed. This HMI consists of four screens (
Figure A4).
Figure A4.
Graphical user interface of software for controlling the electromechanical system of an automatic bread machine: (a) main screen; (b) screen “mixing”; (c) data acquisition screen; (d) help screen.
Figure A4.
Graphical user interface of software for controlling the electromechanical system of an automatic bread machine: (a) main screen; (b) screen “mixing”; (c) data acquisition screen; (d) help screen.
From the main screen, the necessary function for controlling the electromechanical system is selected. The temperature in the kneading chamber is visualized on the “Mixing” screen as well as the switching on and off of the electric motor. It operates cyclically, its operation being visualized by means of round indicators “On” and “Off”, respectively. The electric motor is started and stopped by the “Start” and “Stop” buttons.
On the data recording screen, the change in the electric motor torque is observed in graphic form. The values of the main characteristics of the electromechanical system are presented, which are measured in real time. The electric motor is started and stopped by the “Start” and “Stop” buttons. The “Help information” screen presents guidelines (instructions) for working with the electromechanical control system.
When operating the electromechanical system of an automatic bread machine, it is necessary to maintain the water temperature at around 30 °C, as this provides appropriate conditions for dough preparation. For this purpose, a PID controller has been implemented as a subroutine in the control software.
Figure A5 shows the method used for L-a approximation of the object. The temperature object is assumed to be self-regulating, and for this reason, the Ziegler–Nichols L-a approximation method has been used.
Figure A5.
Determining the PID controller settings by the transient characteristic of the controlled object.
Figure A5.
Determining the PID controller settings by the transient characteristic of the controlled object.
The PID controller settings are implemented using the following formulas:
where
L and
a are the time and temperature, which are determined with the L-a approximation;
Kp is the proportional coefficient of the controller;
Ti is the integration time;
Ki is the integration coefficient;
Kd is the differentiation coefficient;
α is the filter coefficient of the differential part of the controller; and
Ts is the time interval for each temperature measurement.
Figure A6 shows in graphic form how the parameters for setting the PID temperature controller are determined.
After smoothing the transient characteristic, a tangent is drawn to it. At the intersection points of the tangent to the horizontal and vertical axes, an L-a approximation is made.
Figure A6.
Determining the parameters for tuning a PID temperature controller using L-a approximation.
Figure A6.
Determining the parameters for tuning a PID temperature controller using L-a approximation.
The parameters of the PID temperature controller are determined.
Table A5 shows the calculated settings of the controller and those obtained after fine tuning. K
p is increased by 1.2 times, K
i is increased by about 1.6 times, K
d is reduced by 1.4 times, and α is reduced by 0.3. From this, it follows that the calculated and fine-tuned parameters of the controller have a minimal difference.
Table A5.
PID controller settings.
Table A5.
PID controller settings.
| Parameter | Calculated Value | Set Value |
|---|
| a | 0.225 | - |
| L | 71 | - |
| Kp | 5.33 | 6.5 |
| Ti | 142 | - |
| Ki | 0.007 | 0.011 |
| Kd | 35.5 | 25 |
| α | 0.24 | 0.21 |
Figure A7 shows the result of the operation of the PID temperature controller. The peaks in the measured values are due to the fact that the object is not sufficiently polished by the environment, and interference occurs. The averaged characteristics show that the controller can maintain the set temperature of 30 °C.
Figure A7.
Transient process of a closed temperature control system.
Figure A7.
Transient process of a closed temperature control system.
Figure A8 shows dough prepared in an automatic bread machine. The dough from type 500 flour shows classic gluten network behavior. At low hydration (52%), the structure is stiffer and has high deformation strength, which correlates with a higher measured torque. Medium hydration (58%) leads to a balance between elasticity and plasticity, while at 63%, the dough becomes softer and viscous, which reduces the resistance to mixing and, accordingly, the torque.
Wholemeal dough made from 1850 flour has a higher water-holding capacity due to the presence of fiber and bran. This results in a weaker and more tearable gluten network, a higher initial density and greater mechanical resistance at low hydration. At 52%, the dough is the stiffest and generates the highest torque of the three flour types, while at 63% it becomes more plastic, leading to a distinct reduction in the load on the electric motor. Rye–wheat dough has a dominant viscous behavior due to the limited formation of the gluten network. It absorbs more water but remains sticky and with lower elasticity. This results in moderate torque values at low hydration and a smoother reduction in load as the water content increases. The visually stickier and denser structure at 52% corresponds to higher mechanical resistance, while the softer consistency at 63% correlates with distinctly lower torques.
Figure A8.
Dough prepared in an automatic bread machine with an electromechanical system driven by a single-phase asynchronous electric motor—general view: (a) water 52%; (b) water 58%; (c) water 63%; W—dough made from white flour; WW—dough made from whole wheat flour; RW—dough made from rye–wheat flour.
Figure A8.
Dough prepared in an automatic bread machine with an electromechanical system driven by a single-phase asynchronous electric motor—general view: (a) water 52%; (b) water 58%; (c) water 63%; W—dough made from white flour; WW—dough made from whole wheat flour; RW—dough made from rye–wheat flour.