Intelligence Dryer
DIY Dryer Project
Information
Introduction
Intelligence Dryer
is a fully arduino-based dryer, which is controlled by field oriented control, and PI control. The product is made by CAD and 3D printer. Also, this dryer has unique feature: smart time estimation system based on RNN. In this page, I will describe the details about our dryer.
Additionally, this project is based on the GIST EC4221, Intelligent Motor Integration Project
class with our team.
Our team consist of:
- Eungyeol Lee (Leader, Estimation System)
- Jiwon Kang (Technical Director, CAD, Control)
- Songdon Lee (RNN)
- Hyeonyoung Park (Presentation)
- Gyungwan Baek (Matlab)
- Wonhyeong Im (Matlab)
In this project, I was worked as the leader and I designed smart drying time estimation system.
Dryer Motor Control Algorithm
There are two main types of dryer motor structures: connecting motor directly and connecting belt to motor. We chose the belt method. This is for effective low speed control.
Firstly, we use BLDC motor, and it controlled by Field-Oriented Control(FOC) algorithm. Also, there is not encoder in our dryer. Thus, our motor need special angle measurement algorithm. Therefore, we apply Flux Linkage Observer(FLO) algorithm to estimate the angle of a motor. And for efficiency, we additionally apply high-pass filter algorithm, which experimentally shows the improved performance in angular measurement.
All of these are fully controlled by arduino, and we refer to awesome open source called SimpleFOC. This library provide FOC algorithm for BLDC motor. However, our team modified that code to apply FLO and high-pass filter. Finally, we successfully designed fully arduino-based motor control algorithm.
Dryer Structural Design
![](/assets/img/dryer/1.png)
There are three design targets.
- We need easily assemblable structure.
- Due to limitation of 3D printer, the entire structure of dryer is much smaller than 20cm x 20cm x 20cm.
- We need to minimize the sound noise.
Drum must endure the tension of driving belt, so we designed supproting structure. Additionally, EVA foam was used to eliminate noise. And for enduring temperature, we use ABS filaments. Lastly, we designed a structure that can install a temperature and humidity sensor(DHT22), a hot air blower, and a structure that allows air to circulate well.
![](/assets/img/dryer/2.png)
Time Estimation System
Lastly, We designed Time estimation system. Our idea is find specific time that perfectly dried laundry. We define the terminate time standard: when the absolute humidity is the same as at first absolute humidity
. The absolute humidity is measured by temperature and humidity sensor(DHT22). In here, we modified the formula to calculate absolute humidity. We found that it was sensitive to temperature due to sensor error. To solve this problem, a new equation was fitted by regression based on constant absolute humidity according to temperature and humidity.
Real Coefficient :
\[H_{\text{abs}} = \frac{6.112 \cdot exp(\frac{17.67 \cdot T}{T + 243.5}) \cdot H_{\text{rel}} \cdot 2.1674}{273.15 + T}\]Fixed Coefficient :
\[H_{\text{abs}} = \frac{6.112 \cdot exp(\frac{4.2721 \cdot T}{T + 95.0533}) \cdot H_{\text{rel}} \cdot 5.0498}{273.15 + T}\]And we collected some sample dataset with various laundry condition. As a result, we could get 10 training dataset and 5 validation dataset. For the reasonable verification, the condition of training dataset did not include the condition of validation dataset.
Our team defined vanilla RNN for the time estimation system. The input is the temperature and the relative humidity, and the output is the remaining time. We use python3 pytorch to training.
class SimpleRNN(nn.Module):
def __init__(self, input_size=2, hidden_size=8, output_size=1, num_layers=2):
super(SimpleRNN, self).__init__()
self.hidden_size = hidden_size
self.num_layers = num_layers
self.rnn_main = nn.Linear(input_size, hidden_size, bias = False)
self.rnn_res = nn.Linear(hidden_size, hidden_size, bias = False)
self.bias = nn.Parameter(torch.zeros(hidden_size))
self.act = nn.ReLU()
self.fc = nn.Linear(hidden_size, output_size, bias = False)
def forward(self, x, base):
out = []
residual = torch.zeros(1, self.hidden_size, dtype=torch.float, device=device)
for i in range(len(x)):
input = torch.tensor([x[i], base[i]], dtype=torch.float, device=device)
rnn_out = self.rnn_main(input) + self.rnn_res(residual) + self.bias
rnn_out = self.act(rnn_out)
residual = rnn_out
predict = self.fc(rnn_out)
if predict < 0:
predict *= 0
out.append(predict)
out = torch.stack(out)
return out
We also defined our own loss function, which is penalized MSE. To reliably predict termination, a 0 label(laundry is dried !) is multiplied by a weight of 5, and for a conservative prediction, if the predicted time is less than the actual time, a weight of 2 is multiplied.
class PenalizedMSE(nn.Module):
def __init__(self):
super(PenalizedMSE, self).__init__()
def forward(self, predictions, targets):
l2_loss = torch.square(predictions - targets)
weight = []
for i in range(len(predictions)):
if targets[i] == 0:
weight.append(5)
elif predictions[i] > targets[i]:
weight.append(2)
else:
weight.append(1)
weight = torch.FloatTensor(weight).to(device)
l2_loss = l2_loss * weight
loss = l2_loss.mean()
return loss
Finally, the parameter weights of models are fully coded by arduino. Since Arduino does not have an external SSD, the arduino-based RNN model was defined by constant coefficients.
Result
Our team completed a successful demo and final presentation. The motor ran without any problems, the drying system worked great, and the time estimation system was a complete success. Our team finished the project with everyone receiving an A+ grade
.