This is the beginning of a long project, that will keep me busy for at least a few months, maybe even years. Here, I will report on the progress of my project which is about controlling a washing machine with a RaspberryPi.
The name of this project will be "WashbearyPi". An in-depth explanation of this name will be given later, when I will also present the project logo. For the moment, I just want to emphasize that the spelling is indeed intended to be "Washbeary" and not "Washberry", so this is not a typo.
As many of you probably know, modern washing machines are controlled by microcontrollers. Inside a washing machine, there is a number of actuators, like:
- the motor that drives the drum
- the electric heater
- the solenoid valve that controls the water inlet
- the drain pump
- the magnet that locks the door
Also, there are some sensors, like:
- the water temperature sensor
- the water level sensor
- the motor speed sensor
- the door switch (opened/closed)
Modern machines may have much more of them, e.g. acceleration sensors to detect mass imbalance inside the drum when it is spinning.
The final goal of this project is to remove the manufacturer`s control electronics out of the machine and get all sensors and actuators under the control of the Pi, such that individual wash programs can be designed and run on the machine (Just imagine - you'll be able to E-Mail your latest 60-degree cotton program to all your friends, to run on their machines as well
). For this purpose, I will use the GPIO pins of the Pi. Apparently, appropriate interface circuits will have to be designed. For reading temperature values from the NTC temperature sensor, for example, an ADC will be required.
Today, I am starting with sub-topic 1: THE ELECTRIC MOTOR
First, I should say that different motor designs on washing machines exist:
1. The classical design is an AC motor with brushes, that drives the drum via a belt.
2. Some machines have brushless motors which are controlled via frequency inverters and also drive the drum via a belt.
3. Some more recent machine designs use direct-drive inverter motors which are directly plugged onto the shaft of the drum, not having a belt any more.
The machine that will serve as my test object (production year: 2004, with its control electronics broken) has the classical motor design (1).
The motor has a 7-pole connector, whose pinout I reverese engineered to be as follows:
Pin 1+2: Inductive speed sensor
Pin 3+4: Motor brushes (i.e. rotor coil)
Pin 5+6+7: Stator coils (a long and a short one, connected in series)
Besides by resistance measurement, I did the distinction of long and short stator coil by an induction measurement: I fed a constant current through the coil under test, rotated the motor by hand at a defined speed, and measured the voltage induced in the rotor coil. Absolute value and sign of this voltage, both together, told me how the stator is wired internally.
In the next step, I connected the rotor coil and both stator coils in series and energized them with a DC lab power supply. It turns out that something like 10 V is enough the get the motor into motion (although it is designed for 230V AC). At 30V (the maximum my power supply can provide), the (empty) drum spins at roughly 100 RPM.
The motor speed sensor delivers a sinusoidal voltage (see the oscilloscope screenshot below) whose frequency and amplitude increase with increasing motor speed.
[Yes, I know, this oscilloscope is not quite up-to-date. To my knowledge, its manufacturing date was roughly between the Precambrian and the Stone Age
Next, I need to think about how to run the motor on 230V AC while controlling its speed with the RaspberryPi. For sure, a triac will be involved...