
Estufa/Caixa secadora de filamentos – Dry Fila Box
Versão 1 | Logo abaixo na página você encontra a Versão 2 mais atualizada do projeto
A umidade é um grande inimigo das impressões 3D. Filamentos como PLA, NYLON, ABS e outros absorvem umidade do ar pois são higroscópicos. Essa água que fica armazenada nos filamentos evapora quando chega no bico, empurrando filamento quando não deveria, formando os chatos stringing (aqueles cabelinhos fininhos) e também falhas e bolhas nas impressões.
Para evitar que os filamentos absorvam umidade durante as impressões eu criei a Fila Box, uma caixa que mantêm os filamentos relativamente isolados do ar úmido durantes as impressões, porém, os filamentos irão absorver umidade de uma forma ou outra, mesmo que você os armazene em sacos à vácuo que certamente irão acabar vazando.
Para garantir que seu filamentos fiquem sempre secos, e também para secar os filamentos já úmidos eu criei a Dry Fila Box, uma caixa de armazenagem de filamentos que mantem o ambiente aquecido e com umidade regulada utilizando o Arduino! Bora construir a sua e dizer adeus a imperfeições em impressões 3D causadas por filamentos úmidos!
A seguir temos a lista de materiais necessários:
- 1 – Arduino NANO;
- 1 – Fonte Hilink 5VDC/600mA;
- 1 – Módulo Relé de um canal;
- 1 – Sensor de umidade e temperatura DHT22;
- 1 – Display LCD TFT Touch 2.4″ Drive 9341;
- 1 – Cabo de força para tomada;
- 1 – Soquete lâmpada E27;
- 1 – Capacitor cerâmico de 100nF (104);
- 1 – Lâmpada incandescente de 70 ou 100W;
- 1 – Caixa de isopor de 60 litros;
- Diversos parafusos para montagem (ver vídeo);
- Peças impressão em 3D;
- 5 – Metros fios elétricos flexíveis de 0,5mm²;
Case e impressão 3D:
Clicando aqui você pode baixar os arquivos .STL e imprimir na sua impressora 3D.
O código a ser carregado:
Abaixo segue a programação utilizada. Para carregar o código no Arduino você terá que adicionar algumas bibliotecas na IDE do Arduino e essas bibliotecas estão disponíveis aqui em baixo para download. O resto das bibliotecas utilizadas são nativas da IDE do Arduino e não precisam ser instaladas a parte.
Biblioteca Adafruit_GFX.h
Biblioteca MCUFRIEND_kbv.h
Biblioteca DHT.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
/********************************************* Autor: Marlon Nardi Walendorff Projeto: Dry Fila Box - Caixa para armazena e secar filamentos para impressoras 3D Detalhes do projeto: https://marlonnardi.com/?p=1529 /**********************************************/ //Fica de ideia para quem quiser adicionar uma mensagem de erro no display caso haja problema de comunicação com o DHT22 // Volume da caixa de 60 litros. Medidas 60 x 36.5 x 31 cm = 0.06789 m³ ou 67,89 cm³ ou 67.89 Litros // Quantos gramas de água no ar no máximo à 45ºC à umidade relativa de 100R% cabem na caixa de isopor já que seu volume é de 0.06789m³: Total de umidade absoluta 65.35 g/m³, com isso caberiam 4.4366 gramas de água no ar no máximo no volume da caixa de isopor //==================== Inclusão de Bibliotecas =================// #include <Adafruit_GFX.h> #include <MCUFRIEND_kbv.h> #include "DHT.h" //==================== Mapeamento de Hardware ==================// #include <Fonts/FreeSans9pt7b.h> #include <Fonts/FreeSans12pt7b.h> #include <Fonts/FreeSerif12pt7b.h> #include <FreeDefaultFonts.h> #define TEMPERATURAALVO 45.00 // ºC #define MAXDIFERENCATEMPERATURA 1.00 // ºC #define UMIDADEABSOLUTAMAX 50 // g/cm³ #define UMIDADEABSOLUTAMIN 30 // g/cm³ #define pin_relay_lamp 11 #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF #define GREETEMP 0x5fe0 #define BLUEUMIDADER 0x073f #define VIOLETUMIDADEA 0xe01f #define ARDUINOCOLOR 0x07ff #define DHTPIN 10 // ---------------- Constante Matemática de Euler #define e 2.718281828459045235360287471352 //#define DHTTYPE DHT11 // DHT 11 #define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 //#define DHTTYPE DHT21 // DHT 21 (AM2301) //==================== Variáveis Globais ==================// float temp = 0; float hum = 0; float humAbs = 0; float pretemp = 0; float prehum = 0; float prehumAbs = 0; float currtemp = 0; float currhum = 0; float currhumAbs = 0; float i = 0; float j = 0; //==================== Instânciando Objetos ====================// MCUFRIEND_kbv tft; DHT dht(DHTPIN, DHTTYPE); void setup(void) { Serial.begin(9600); pinMode(pin_relay_lamp, OUTPUT); digitalWrite(pin_relay_lamp, HIGH); //Valor inicial ligado pois o módulo rele funciona em lógica invertida uint16_t ID = tft.readID(); Serial.print("found ID = 0x"); Serial.println(ID, HEX); if (ID == 0xD3D3) ID = 0x9481; //force ID if write-only display tft.begin(ID); tft.setRotation(1); tft.fillScreen(BLACK); dht.begin(); //-------------- Texto Inicial tft.drawRect(0, 0, 320, 240,ARDUINOCOLOR); tft.setTextSize(7); tft.setTextColor(ARDUINOCOLOR, BLACK); tft.setCursor(15, 30); tft.print("MESTRES"); tft.setCursor(120, 95); tft.print("DO"); tft.setCursor(15, 160); tft.print("ARDUINO"); delay(3000); tft.fillScreen(BLACK); //-------------- Tela inicial Fixa Display // Título tft.setTextSize(3); tft.setTextColor(YELLOW, BLACK); tft.setCursor(60, 5); tft.print("Dry Fila Box"); tft.setTextSize(2); tft.setCursor(75, 30); tft.print("marlonnardi.com"); //Temperatura tft.setTextSize(2); tft.setTextColor(GREETEMP, BLACK); tft.setCursor(24, 170); tft.print("0"); tft.setCursor(62, 170); tft.print("50"); tft.setTextSize(1); tft.setCursor(18, 100); tft.print("Temperatura"); tft.setCursor(45, 110); tft.print("*C"); //Umidade Relativa tft.setTextSize(2); tft.setTextColor(BLUEUMIDADER, BLACK); tft.setCursor(24 + 110, 170); tft.print("0"); tft.setCursor(58 + 110, 170); tft.print("100"); tft.setTextSize(1); tft.setCursor(20 + 110, 100); tft.print("Umidade R."); tft.setCursor(45 + 110, 110); tft.print("R%"); //Umidade Absoluta tft.setTextSize(2); tft.setTextColor(VIOLETUMIDADEA, BLACK); tft.setCursor(24 + 220, 170); tft.print("0"); tft.setCursor(62 + 220, 170); tft.print("80"); tft.setTextSize(1); tft.setCursor(20 + 220, 100); tft.print("Umidade A."); tft.setCursor(38 + 220, 110); tft.print("g/m3"); } void loop(void) { controleTemperatura(); // ---------------------- Exibe temperatura com elementos gráficos temp = dht.readTemperature(); hum = dht.readHumidity(); humAbs = calculaUmidadeAbsoluta(); tft.setTextColor(GREETEMP, BLACK); tft.setTextSize(2); tft.setCursor(27, 125); tft.print(temp, 1); tft.setTextColor(BLUEUMIDADER, BLACK); tft.setTextSize(2); tft.setCursor(27 + 110, 125); tft.print(hum, 1); tft.setTextColor(VIOLETUMIDADEA, BLACK); tft.setTextSize(2); tft.setCursor(27 + 220, 125); tft.print(humAbs, 1); // ---------------------- Mostra no displays parâmetros de configuração tft.setTextSize(1.5); tft.setTextColor(GREETEMP, BLACK); tft.setCursor(0, 220); tft.print("Temp. Alvo:"); tft.setCursor(68, 220); tft.print(TEMPERATURAALVO, 0); tft.setCursor(81, 220); tft.print("*C"); currtemp = temp; currhum = hum; currhumAbs = humAbs; i = map(pretemp, 0, 50, 0, 300); j = map(currtemp, 0, 50, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 50 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 50 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, GREETEMP); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 50 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 50 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe temperatura com elementos gráficos // ---------------------- Exibe Umidade Relativa com elementos gráficos i = map(prehum, 0, 100, 0, 300); j = map(currhum, 0, 100, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 160 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 160 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLUEUMIDADER); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 160 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 160 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe Umidade Relativa com elementos gráficos // ---------------------- Exibe Umidade Absoluta com elementos gráficos i = map(prehumAbs, 0, 100, 0, 300); j = map(currhumAbs, 0, 100, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 270 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 270 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, VIOLETUMIDADEA); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 270 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 270 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe Umidade Absoluta com elementos gráficos pretemp = currtemp; prehum = currhum; prehumAbs = currhumAbs; delay(1000); } float calculaUmidadeAbsoluta(void) { float UA = ((6.112 * (pow(e, ((17.67 * temp) / (temp + 243.5)))) * hum * 2.1674) / (273.15 + temp)); return UA; } void controleTemperatura(void) { if(temp >= TEMPERATURAALVO) { digitalWrite(pin_relay_lamp, HIGH); // Desliga o módulo relé } if(temp <= (TEMPERATURAALVO - MAXDIFERENCATEMPERATURA)) { digitalWrite(pin_relay_lamp, LOW); // Liga o módulo relé } } |
O circuito eletrônico:
Para ver a imagem do circuito em alta resolução clique aqui
ATENÇÃO: Esse projeto trabalha com tensão da rede de distribuição residencial e pode causar a morte, portanto cuidado ao manusear. Crianças, chamar um adulto para orientar na montagem.

Veja o vídeo para mais informações:
Versão 2 – Estufa secadora de filamentos com Arduino com novo sistema de aquecimento
A seguir temos a lista de materiais necessários:
- 1 – Arduino NANO;
- 1 – Fonte 12V / 10A;
- 1 – Mosfet canal N IRLZ44N;
- 1 – Transistor NPN 2n2222;
- 1 – Diodo Zener de 8V1;
- 1 – Resistor de 470R por 1/4W;
- 1 – Resistor de 1k por 1/4W;
- 1 – Resistor de 2R2 por 1/4W;
- 1 – Capacitor eletrolítico de 100uF x 16V;
- 1 – Capacitor cerâmico de 100nF (104);
- 1 – Sensor de umidade e temperatura DHT22;
- 1 – Display LCD TFT Touch 2.4″ Drive 9341;
- 1 – Cabo de força para tomada;
- 1 – Dissipador de calor 100x 100mm;
- 1 – Cartucho aquecedor de hotend de 40 ou 50W de impressora 3D;
- 1 – Bloco alumínio hotend impressora 3D;
- 1 – Cooler/Fan de 80 x 80 mm;
- 1 – Caixa de isopor de 60 litros;
- Diversos parafusos para montagem (ver vídeo);
- Peças impressão em 3D;
- 5 – Metros fios elétricos flexíveis de 0,5mm²;
Case e impressão 3D:
Clicando aqui você pode baixar os arquivos .STL e imprimir na sua impressora 3D. Atenção, imprima o suporte do cooler/fan em ABS para suportar a temperatura sem deformação!
O código a ser carregado:
Abaixo segue a programação utilizada. Para carregar o código no Arduino você terá que adicionar algumas bibliotecas na IDE do Arduino e essas bibliotecas estão disponíveis aqui em baixo para download. O resto das bibliotecas utilizadas são nativas da IDE do Arduino e não precisam ser instaladas a parte.
Biblioteca Adafruit_GFX.h
Biblioteca MCUFRIEND_kbv.h
Biblioteca DHT.h
Biblioteca PID_v1.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
/********************************************* Autor: Marlon Nardi Walendorff Projeto: Dry Fila Box - Caixa para armazena e secar filamentos para impressoras 3D - Versão 2 - Agora com novo sistema de aquecimento e controle PWM e PID Detalhes do projeto: https://marlonnardi.com/?p=1529 /**********************************************/ //Fica de ideia para quem quiser adicionar uma mensagem de erro no display caso haja problema de comunicação com o DHT22 // Volume da caixa de 60 litros. Medidas 60 x 36.5 x 31 cm = 0.06789 m³ ou 67,89 cm³ ou 67.89 Litros // Quantos gramas de água no ar no máximo à 45ºC à umidade relativa de 100R% cabem na caixa de isopor já que seu volume é de 0.06789m³: Total de umidade absoluta 65.35 g/m³, com isso caberiam 4.4366 gramas de água no ar no máximo no volume da caixa de isopor //==================== Inclusão de Bibliotecas =================// #include <Adafruit_GFX.h> #include <MCUFRIEND_kbv.h> #include "DHT.h" #include <PID_v1.h> //==================== Mapeamento de Hardware ==================// #include <Fonts/FreeSans9pt7b.h> #include <Fonts/FreeSans12pt7b.h> #include <Fonts/FreeSerif12pt7b.h> #include <FreeDefaultFonts.h> #define TEMPERATURAALVO 45.00 // ºC #define pin_heater 11 #define pin_fan 10 #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF #define GREETEMP 0x5fe0 #define BLUEUMIDADER 0x073f #define VIOLETUMIDADEA 0xe01f #define ARDUINOCOLOR 0x07ff #define DHTPIN 12 // ---------------- Constante Matemática de Euler #define e 2.718281828459045235360287471352 //#define DHTTYPE DHT11 // DHT 11 #define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 //#define DHTTYPE DHT21 // DHT 21 (AM2301) //==================== Variáveis Globais ==================// float temp = 0; float hum = 0; float humAbs = 0; float pretemp = 0; float prehum = 0; float prehumAbs = 0; float currtemp = 0; float currhum = 0; float currhumAbs = 0; float i = 0; float j = 0; double Setpoint, Input, Output; double Kp = 2, Ki = 5, Kd = 1; //==================== Instânciando Objetos ====================// MCUFRIEND_kbv tft; DHT dht(DHTPIN, DHTTYPE); PID myPID(&Input, &Output, &Setpoint, Kp, Ki, Kd, DIRECT); void setup(void) { Serial.begin(9600); pinMode(pin_heater, OUTPUT); pinMode(pin_fan, OUTPUT); analogWrite(pin_fan, 25);//Controla a velocidade do Cooler/FAN Setpoint = TEMPERATURAALVO; myPID.SetMode(AUTOMATIC); uint16_t ID = tft.readID(); Serial.print("found ID = 0x"); Serial.println(ID, HEX); if (ID == 0xD3D3) ID = 0x9481; //force ID if write-only display tft.begin(ID); tft.setRotation(1); tft.fillScreen(BLACK); dht.begin(); //-------------- Texto Inicial tft.drawRect(0, 0, 320, 240, ARDUINOCOLOR); tft.setTextSize(7); tft.setTextColor(ARDUINOCOLOR, BLACK); tft.setCursor(15, 30); tft.print("MESTRES"); tft.setCursor(120, 95); tft.print("DO"); tft.setCursor(15, 160); tft.print("ARDUINO"); delay(3000); tft.fillScreen(BLACK); //-------------- Tela inicial Fixa Display // Título tft.setTextSize(3); tft.setTextColor(YELLOW, BLACK); tft.setCursor(60, 5); tft.print("Dry Fila Box"); tft.setTextSize(2); tft.setCursor(75, 30); tft.print("marlonnardi.com"); //Temperatura tft.setTextSize(2); tft.setTextColor(GREETEMP, BLACK); tft.setCursor(24, 170); tft.print("0"); tft.setCursor(62, 170); tft.print("50"); tft.setTextSize(1); tft.setCursor(18, 100); tft.print("Temperatura"); tft.setCursor(45, 110); tft.print("*C"); //Umidade Relativa tft.setTextSize(2); tft.setTextColor(BLUEUMIDADER, BLACK); tft.setCursor(24 + 110, 170); tft.print("0"); tft.setCursor(58 + 110, 170); tft.print("100"); tft.setTextSize(1); tft.setCursor(20 + 110, 100); tft.print("Umidade R."); tft.setCursor(45 + 110, 110); tft.print("R%"); //Umidade Absoluta tft.setTextSize(2); tft.setTextColor(VIOLETUMIDADEA, BLACK); tft.setCursor(24 + 220, 170); tft.print("0"); tft.setCursor(62 + 220, 170); tft.print("80"); tft.setTextSize(1); tft.setCursor(20 + 220, 100); tft.print("Umidade A."); tft.setCursor(38 + 220, 110); tft.print("g/m3"); } void loop(void) { controleTemperatura(); // ---------------------- Exibe temperatura com elementos gráficos temp = dht.readTemperature(); hum = dht.readHumidity(); humAbs = calculaUmidadeAbsoluta(); tft.setTextColor(GREETEMP, BLACK); tft.setTextSize(2); tft.setCursor(27, 125); tft.print(temp, 1); tft.setTextColor(BLUEUMIDADER, BLACK); tft.setTextSize(2); tft.setCursor(27 + 110, 125); tft.print(hum, 1); tft.setTextColor(VIOLETUMIDADEA, BLACK); tft.setTextSize(2); tft.setCursor(27 + 220, 125); tft.print(humAbs, 1); // ---------------------- Mostra no displays parâmetros de configuração tft.setTextSize(1.5); tft.setTextColor(GREETEMP, BLACK); tft.setCursor(0, 220); tft.print("Temp. Alvo:"); tft.setCursor(68, 220); tft.print(TEMPERATURAALVO, 0); tft.setCursor(81, 220); tft.print("*C"); currtemp = temp; currhum = hum; currhumAbs = humAbs; i = map(pretemp, 0, 50, 0, 300); j = map(currtemp, 0, 50, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 50 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 50 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, GREETEMP); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 50 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 50 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe temperatura com elementos gráficos // ---------------------- Exibe Umidade Relativa com elementos gráficos i = map(prehum, 0, 100, 0, 300); j = map(currhum, 0, 100, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 160 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 160 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLUEUMIDADER); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 160 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 160 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe Umidade Relativa com elementos gráficos // ---------------------- Exibe Umidade Absoluta com elementos gráficos i = map(prehumAbs, 0, 100, 0, 300); j = map(currhumAbs, 0, 100, 0, 300); for (i; i <= j; i = i + 0.1) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 270 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 270 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, VIOLETUMIDADEA); } for (i - 2; i >= j; i = i - 0.05) { float j = i - 150 ; float angle = (j / 57.2958) - 1.57; float x1 = 270 + cos(angle) * 40; float y1 = 120 + sin(angle) * 40; float x2 = 270 + cos(angle) * 50; float y2 = 120 + sin(angle) * 50; tft.drawLine(x1, y1, x2, y2, BLACK); } // ---------------------- FIM Exibe Umidade Absoluta com elementos gráficos pretemp = currtemp; prehum = currhum; prehumAbs = currhumAbs; delay(100); } float calculaUmidadeAbsoluta(void) { float UA = ((6.112 * (pow(e, ((17.67 * temp) / (temp + 243.5)))) * hum * 2.1674) / (273.15 + temp)); return UA; } void controleTemperatura(void) { //----------------------------------- Controle PID ----------------------------// Input = temp; myPID.Compute(); analogWrite(pin_heater, Output); Serial.print("Temperatura: "); Serial.print(temp); Serial.print(" PWM "); Serial.println(Output); } |
O circuito eletrônico:
Para ver a imagem do circuito em alta resolução clique aqui
ATENÇÃO: Esse projeto trabalha com tensão da rede de distribuição residencial e pode causar a morte, portanto cuidado ao manusear. Crianças, chamar um adulto para orientar na montagem.

Veja o vídeo para mais informações:

