Why engine, why washing machines?
Well, at least because the engines from washing machines are great for many homemade products, and getting them is easy. You can extract it from your own washing machine that has expired, or you can buy it on Avito for ridiculous money! For those who prefer to see once than read ten, the accompanying videos from my channel will serve as a bonus to the article.
Tachometer. What kind of animal and why is it needed?
In most modern washing machines, asynchronous AC motors work, the triac regulates the voltage on the motor, and the direction of rotation is switched using a relay. It is clear that in order to establish and maintain a stable rotation speed, it is necessary at least to determine this speed. That’s what the tachometer is for.
In the simplest case, it is an engine on the contrary – an alternating voltage generator, the frequency of which changes proportionally depending on the speed of rotation. The result of a short rotation of the shaft by hand is visible on the splash screen waveform. By the way, the amplitude also changes, which creates problems in signal processing. We will not delve into this topic, if you wish, you can find out about my experiments with it in the video at the link at the end of the article.
Connect the engine to the block
This article is introductory, we will get to the real circuitry in the next one, but for now we will use functional or greatly simplified circuits.
Below is just such a one, containing a disassembled engine connected to the block of the washing machine.
At any given time, two windings are involved in the work. The stator winding is wound on the metal base of the motor. The rotor windings interact with it in turn. In order for the rotor to constantly rotate, these windings must be switched in series. This happens due to a series of contacts mounted on a rotating shaft. Voltage is transmitted to them by means of sliding response contacts, the so-called brushes.
This approach has both pros and cons. On the one hand, the engine is omnivorous – it can work both from AC and DC, on the other hand, sliding mechanical contacts are not the most reliable thing and such engines are not suitable for continuous cycle devices, but for household appliances that are turned on from time to time, such as washing machines or screwdrivers will fit perfectly.
And what about the well?
Let’s add elements outside the block to our scheme. thyristor and relay.
Very briefly, literally in a nutshell, I will describe her work. The circuit involves as many as three relays with switching contacts. Two of them K2 and K3 are used to change the direction of current flow through the rotor and, as a result, change its direction of rotation. Relay K3 is installed only on advanced washing machines with high engine speeds. It works in tandem with a stator having a tap from the main winding. Due to this, you can additionally adjust the power, and hence the speed of revolutions. The above process is discussed in more detail in my other video.
The triac is engaged in turning on the engine and adjusting the speed of its rotation.
The microcontroller comes into play
The triac is controlled, of course, by a microcontroller. Using feedback and phase-pulse control, he manages not only to set the specified speed of rotation of the drum in a very wide range, but also keeps it when the load on the shaft changes hundreds of times!
It is surprising that, despite the huge number of sensors and actuators, to control all the processes occurring in the washing machine, it is not an advanced 32-bit ARM that is used, but a modest hard worker – a slow, cheap 8 beatnik, which has several times less RAM than the Sinclair sample of the late eighties of the last century – some 2, well, a maximum of 4 kilobytes. By today’s standards, it’s just NOTHING. I’m not talking about the clock frequency of 8 megahertz, which is typical for such an old man – today it hardly strikes anyone’s imagination. But he still has one achievement – in terms of the number of conclusions, he managed to bypass the centipede!
To regulate the amount of revolutions of the drum, the microcontroller needs, at a minimum, to determine it. To do this, he counts the number of engine revolutions per unit of time using a tachometer mounted on the shaft.
Looking at the figure, it is easy to understand that the tachogenerator signal in its pure form is completely unsuitable as an input and we just need a pulse shaper to bring it to a digestible form. We will analyze in detail the work and circuitry of this node next time, but now I ask you to take my word for it that thanks to the shaper at the input of the microcontroller, beautiful pulses appear with steep fronts and without a hint of bounce. Everything would be fine, but the question arises: “How does such a weak and slow computing core of the microcontroller manage to count pulses rushing at an impressive speed?”
This boring task in the microcontroller is done by a diligent accountant
Pan Vatruba. Well, if without jokes, then its role is played by the built-in timer. The timer of a modern microcontroller is a jack of all trades and counting the number of pulses received at its input per unit of time, with subsequent storage in a special register, is perhaps the simplest of the operations that it is capable of. The main thing is that the resources of the computing core are not involved at all. The microcontroller simply reads the value from the register at any moment convenient for it, let’s say 50 or only 10 times per second and, as necessary, uses it in further calculations.
I apologize, Habr leaves too little space for useful information, so the text on the chart is not visible. In this and similar pictures, it should be read as follows:
Mains input voltage
OK. We received information about the speed of rotation and now by changing the power supplied to the engine, we can adjust the frequency of its revolutions, and hence the speed of rotation of the drum with linen. In modern budget washing machines, this is most often done using the phase-pulse method, and the triac acts as a power element. It supplies voltage to the motor in the form of pulses, strictly synchronized with the beginning of each half-wave of the mains voltage and a given duration. The considerable inertia of the rotating part of the engine – the stator and an even larger heavy drum with linen, perfectly smooth out the impulse nature of the torque. The microcontroller port acts as if it were a very fast switch, supplying short negative pulses to the control electrode of the triac, indicated by a red arrow in the diagram.
This is enough to start an avalanche process in the thyristor and the resistance between its power electrodes drops to almost zero. As a result, as shown in the lower graph, voltage appears on the motor windings. It will last until the disappearance of the input.
In accordance with the selected washing program and its current stage, the microcontroller receives a command to spin the engine up to the required speed, and to maintain the speed at the required level, the mechanism for achieving and stabilizing the set parameter, in this case engine speed, called PID, is launched.
But back to our microcontroller. To form a short pulse, with a given delay from the beginning of the half-cycle, he uses his second timer. To do this, the timer also counts pulses, but not from an external source, but from the internal generator of the microcontroller itself, the frequency of which is stabilized by a quartz resonator.
The second timer operates in the so-called PWM mode – the formation of a short thyristor turn-on pulse with a specified delay, relative to the moment the voltage passes through zero. The duration of the delay can vary from zero to one half-cycle of the mains voltage. For a Russian network with a frequency of 50 Hz, this value is 10 milliseconds.
To accurately determine the zero voltage, a special circuit is used, which is called the “zero detector”. The circuitry of this node is also very curious, we will consider it next time if the topic is of interest to readers. In the meantime, I will only note that at the moment the supply voltage changes from positive to negative, a logical unit appears at the output of the detector, and a logical zero appears at the moment of transition to negative. And it is when the logic level changes that the timer on the right in the figure starts. It counts the set shutter speed and sends a short pulse to the control electrode of the triac. It opens and supplies voltage to the engine. Important! The triac closes automatically when the AC voltage reaches zero. For this reason, its use in most cases is limited to AC circuits. Thus, despite the fact that our motor is capable of operating on direct current, paired with a thyristor regulator, we will have to limit ourselves to alternating current.
The engine is de-energized and a new cycle of work begins.
Stabilization of the set rotation speed
It remains to find out the main thing – how stabilization works. Let’s say our engine rotates at the desired frequency and, suddenly, the load on the shaft has decreased. This can happen, for example, when the weight of the laundry has decreased during the spin cycle. In this case, the drum starts to accelerate and, as a result, the rotational speed of the tachogenerator will increase, and hence the pulses coming from the shaper at the input of timer 1.
Noticing this, the microcontroller will increase the delay in the supply of a control pulse to the triac. The triac will open later and less power will be supplied to the engine, its torque decreases and the speed of the drum decreases to the one specified in the program, and the frequency of the tachogenerator pulses returns to normal. This is evidenced by the lower graph of the figure. In the lower diagram of the graph, filled in red, shows how much the time to apply voltage to the motor will decrease. The power supplied to the engine will decrease even more seriously – when the amplitude changes, it changes quadratically.
It is easy to imagine another situation. In the machine, at the stage of rinsing, the valve added some water, the load on the shaft increased and the pulses coming from the shaper reduced their frequency.
In response, the microcontroller reduces the duration of the T2 timer. The semistor turns on earlier, which means it stays open LONGER, and the power on the engine increases. RPM returns to normal.
In conclusion, I note that I have described a typical example of feedback action. It does not work instantly and the speed stabilization occurs in several iterations, while it is even possible to start a small oscillatory process, the amplitude of which, with the correct PID settings, quickly decays.
Links to my videos based on which the article was prepared, for those who prefer to watch, and there is more resolution
How does a washing machine motor work? Device. Diagnostics. Tachogenerator.»
Washing machine motor control. Why do we need a triac and a relay, where are they on the control board?
How does the microcontroller control the motor? Algorithm. On the example of a washing machine