数码之家

 找回密码
 立即注册

QQ登录

只需一步,快速开始

微信登录

微信扫一扫,快速登录

搜索
查看: 3991|回复: 13

[家电] 搞一个简易烘干机

[复制链接]
发表于 2021-3-7 19:46:06 | 显示全部楼层 |阅读模式
广州回南天,很难受,买不起很多内裤,三条内裤根本不够更换。搞一个烘干机,看能不能解决问题。

主要思想
使用箱子作为器身,PTC恒温加热片加热,加装小风扇进行空气流通,期间检测箱内湿度和温度。温度达到一定,停止加热,风扇继续;温度湿度达到一定值,关闭所以,有时间可能会加入emqx,可以远程控制。

材料
12v PTC恒温加热片
风扇
12v电源
箱子
esp8266+继电器
emqx终端(云服务器,或者使用树莓派等搭建)
温湿度传感器

过程
为了实现快速加温,使用5v供电使之转速偏慢,后期在调整。
目前以实现电源、加热、吹风三个部分,后期有时间再更新。
电源:12v3.5a电源,使用恒压横流模块配合,导出三个接口,两5v一12v。
加热片和风扇:加热片接12v,风扇接5v。

使用纸箱测试,加温速度快,基本上十几秒里面就变暖和,测试五六分钟,温度不会很高,适合烘干衣物。
后面会将加热片放入布箱子里,用来烘干衣物。

emqx终端已经搭建了,最近比较忙,以后有时间再加入。温湿度控制也一起弄。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册 微信登录

x

打赏

参与人数 1家元 +40 收起 理由
家睦 + 40

查看全部打赏

发表于 2021-3-7 20:22:29 | 显示全部楼层
搞那么复杂干嘛?内裤而已,吹风机不就搞定了?或者买个吹热风的暖风机,冬天衣服都能弄干,我冬天衣服晒不干的时候都这么干的
回复 支持 反对

使用道具 举报

发表于 2021-3-7 20:36:24 | 显示全部楼层
买个加热小主机,自制箱子:lol:
回复 支持 反对

使用道具 举报

发表于 2021-3-7 20:54:34 | 显示全部楼层
用来烘干什么的?:praise:
纸皮不怕着火吗……:sweat:
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-7 21:00:33 | 显示全部楼层
ww5223017240 发表于 2021-3-7 20:22
搞那么复杂干嘛?内裤而已,吹风机不就搞定了?或者买个吹热风的暖风机,冬天衣服都能弄干,我冬天衣服晒不 ...

总不能一直拿着吧,我以前也是这样搞,但是起码要吹四五分钟。广州回南天,干内裤放外面会湿。:shocked:
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-7 21:01:51 | 显示全部楼层
飞扬99 发表于 2021-3-7 20:36
买个加热小主机,自制箱子

直接搞一个侧面玻璃的主机,旁边贴两个挂钩:lol:
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-7 21:04:21 | 显示全部楼层
cushion 发表于 2021-3-7 20:54
用来烘干什么的?
纸皮不怕着火吗……

纸皮只是用来测试的,到时会用木片固定,放进布盒子里,加上这个是恒温加热片,最热也只能到200℃左右。还是比较放心的。
回复 支持 反对

使用道具 举报

发表于 2021-3-8 08:07:56 | 显示全部楼层
功率太小,不够用,还是考虑正经的干衣机吧。
我这空气干燥,但用了干衣机也绝对不后悔。
回复 支持 反对

使用道具 举报

发表于 2021-3-8 08:59:15 | 显示全部楼层
老五家的ptc? 不需要用云服务器,用百度物联,免费的一个月100万条够用。
回复 支持 反对

使用道具 举报

发表于 2021-3-8 09:27:27 | 显示全部楼层
暖风机放在淋浴房里就是个烘干机:lol:
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-8 21:40:19 | 显示全部楼层
kkstun 发表于 2021-3-8 08:59
老五家的ptc? 不需要用云服务器,用百度物联,免费的一个月100万条够用。

总感觉百度的东西不靠谱,正好手上有服务器。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-8 21:42:17 | 显示全部楼层
snoopy8008 发表于 2021-3-8 08:07
功率太小,不够用,还是考虑正经的干衣机吧。
我这空气干燥,但用了干衣机也绝对不后悔。 ...

先用一个测试,我买了4个,应该够
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-9 15:34:56 | 显示全部楼层
这里使用esp8266进行远程控制。前提已经搭建好mqtt服务器。

下面是emqx官方代码,稍微改动了一下,注释详细。使用只需要将对应的pin针脚接继电器控制针脚即可,通过发送1或者0进行控制,发送首字符不为1的为HIGH。
里面还有一下冗余代码,懒得删了,也可以给大家参考。
  1. /*
  2. Basic ESP8266 MQTT example
  3. This sketch demonstrates the capabilities of the pubsub library in combination
  4. with the ESP8266 board/library.
  5. It connects to an MQTT server then:
  6.   - publishes "hello world" to the topic "outTopic" every two seconds
  7.   - subscribes to the topic "inTopic", printing out any messages
  8.     it receives. NB - it assumes the received payloads are strings not binary
  9.   - If the first character of the topic "inTopic" is an 1, switch ON the ESP Led,
  10.     else switch it off
  11. It will reconnect to the server if the connection is lost using a blocking
  12. reconnect function. See the 'mqtt_reconnect_nonblocking' example for how to
  13. achieve the same result without blocking the main loop.
  14. To install the ESP8266 board, (using Arduino 1.6.4+):
  15.   - Add the following 3rd party board manager under "File -> Preferences -> Additional Boards Manager URLs":
  16.        http://arduino.esp8266.com/stable/package_esp8266com_index.json
  17.   - Open the "Tools -> Board -> Board Manager" and click install for the ESP8266"
  18.   - Select your ESP8266 in "Tools -> Board"
  19. */

  20. #include <ESP8266WiFi.h>
  21. #include <PubSubClient.h>

  22. // Update these with values suitable for your network.

  23. const char* ssid = "***"; //wifi名称
  24. const char* password = "***"; //wifi密码
  25. const char* mqtt_server = "***"; //自己服务器ip

  26. WiFiClient espClient;
  27. PubSubClient client(espClient);
  28. unsigned long lastMsg = 0;
  29. #define MSG_BUFFER_SIZE  (50)
  30. char msg[MSG_BUFFER_SIZE];
  31. int value = 0;

  32. void setup_wifi() {

  33.   delay(10);
  34.   // We start by connecting to a WiFi network
  35.   Serial.println();
  36.   Serial.print("Connecting to ");
  37.   Serial.println(ssid);

  38.   WiFi.mode(WIFI_STA);
  39.   WiFi.begin(ssid, password);

  40.   while (WiFi.status() != WL_CONNECTED) {
  41.     delay(500);
  42.     Serial.print(".");
  43.   }

  44.   randomSeed(micros());

  45.   Serial.println("");
  46.   Serial.println("WiFi connected");
  47.   Serial.println("IP address: ");
  48.   Serial.println(WiFi.localIP());
  49. }

  50. void callback(char* topic, byte* payload, unsigned int length) {
  51.   Serial.print("Message arrived [");
  52.   Serial.print(topic);
  53.   Serial.print("] ");
  54.   for (int i = 0; i < length; i++) {
  55.     Serial.print((char)payload[i]);
  56.   }
  57.   Serial.println();

  58.   // Switch on the LED if an 1 was received as first character
  59.   //在对应主题输入,若输入信息首字符为‘1’则设BUILTIN_LED为LOW,否则设为HIGH
  60.   if ((char)payload[0] == '1') {
  61.     digitalWrite(BUILTIN_LED, LOW);   // Turn the LED on (Note that LOW is the voltage level
  62.     // but actually the LED is on; this is because
  63.     // it is active low on the ESP-01)
  64.   } else {
  65.     digitalWrite(BUILTIN_LED, HIGH);  // Turn the LED off by making the voltage HIGH
  66.   }

  67. }

  68. void reconnect() {
  69.   // Loop until we're reconnected
  70.   while (!client.connected()) {
  71.     Serial.print("Attempting MQTT connection...");
  72.     // Create a random client ID
  73.     String clientId = "ESP8266Client-";
  74.     clientId += String(random(0xffff), HEX);
  75.     // Attempt to connect
  76.     if (client.connect(clientId.c_str(), "用户名", "用户密码")) {
  77.       //emqx_auth_username开启后,需要加入用户名和密码,若没有开启可以直接使用client.connect(clientId.c_str())
  78.       Serial.println("connected");
  79.       // Once connected, publish an announcement...
  80.       client.publish("outTopic", "hello world");
  81.       // ... and resubscribe
  82.       client.subscribe("inTopic"); //订阅主题‘inTopic’
  83.     } else {
  84.       Serial.print("failed, rc=");
  85.       Serial.print(client.state());
  86.       Serial.println(" try again in 5 seconds");
  87.       // Wait 5 seconds before retrying
  88.       delay(5000);
  89.     }
  90.   }
  91. }

  92. void setup() {
  93.   pinMode(BUILTIN_LED, OUTPUT);     // Initialize the BUILTIN_LED pin as an output,这里将BUILTIN_LED换成控制继电器的针脚即可
  94.   Serial.begin(115200);
  95.   setup_wifi();
  96.   client.setServer(mqtt_server, 1883);
  97.   client.setCallback(callback);
  98. }

  99. void loop() {

  100.   if (!client.connected()) {
  101.     reconnect();
  102.   }
  103.   client.loop();
  104.   
  105.   unsigned long now = millis();
  106.   if (now - lastMsg > 10000) {
  107.     lastMsg = now;
  108.     int LEDState = digitalRead(BUILTIN_LED);//读取继电器状态
  109.     ++value;
  110.     snprintf (msg, MSG_BUFFER_SIZE, "LEDState #%ld", LEDState);
  111.     Serial.print("Publish message: ");
  112.     Serial.println(msg);
  113.     client.publish("outTopic", msg); // 将继电器状态发送到主题outTopic
  114.   }
  115. }
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-9 20:09:09 | 显示全部楼层
关于温度湿度检测,直接在esp8266上面接一个温湿度检测模块,设定一定的阈值进行控制,可以调用PID。有精力在远程控制中设置阈值功能。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 微信登录

本版积分规则

APP|手机版|小黑屋|关于我们|联系我们|法律条款|技术知识分享平台

闽公网安备35020502000485号

闽ICP备2021002735号-2

GMT+8, 2025-6-26 07:24 , Processed in 0.639601 second(s), 14 queries , Redis On.

Powered by Discuz!

© 2006-2025 MyDigit.Net

快速回复 返回顶部 返回列表