Mukesh Sankhla
Published © CC BY-NC-SA

DIY Smart 3D Printer Enclosure

DIY Smart 3D Printer Enclosure

IntermediateFull instructions provided24 hours411
DIY Smart 3D Printer Enclosure

Things used in this project

Hardware components

DFRobot Duct Fan
×1
DFRobot FireBeetle 2 ESP32-E
×1
DFRobot Gravity Environmental Sensor
×1
DFRobot Relay Module
×1
Dryer Vent Hose
×1
Draft Blocker Backdraft
×1
IRF520 Mosfet
×1
L7805CV Voltage Regulator
×1
Super Bright LED Light
×1
Mylar enclosure
×1
DC Jack
×1

Software apps and online services

Arduino IDE
Arduino IDE
Fusion
Autodesk Fusion

Hand tools and fabrication machines

3D Printer
Screwdriver

Story

Read more

Schematics

Circuit Connection

Circuit Connection

Code

Arduino Code

Arduino
/*
   Project  :  DIY Smart 3D Printer Enclosure
   Author   :  Mukesh Sankhla
   Website  :  makerbrains.com
*/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

/* Fill in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "***********"
#define BLYNK_TEMPLATE_NAME "*****************"
#define BLYNK_AUTH_TOKEN "****************************"

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include "DFRobot_EnvironmentalSensor.h"

DFRobot_EnvironmentalSensor environment(/*addr = */SEN050X_DEFAULT_DEVICE_ADDRESS, /*pWire = */&Wire);

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "**********"; //Wifi Name
char pass[] = "*********";  //Password

#define FanPin D2
#define LightPin D3

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);

  while(environment.begin() != 0){
    Serial.println(" Sensor initialize failed!!");
    delay(1000);
  }
  Serial.println("Initialization success!!");

  // Set the mode of pins for Fan and Light
  pinMode(FanPin, OUTPUT);
  pinMode(LightPin, OUTPUT);
}

void loop()
{
  readSensor();
  Blynk.run();
}

void readSensor(){
  // Print the data obtained from sensor
  Blynk.virtualWrite(V3, environment.getTemperature(TEMP_C));
  Blynk.virtualWrite(V4, environment.getHumidity());
  Blynk.virtualWrite(V5, environment.getLuminousIntensity());
}

// Blynk function to handle incoming data from the app
BLYNK_WRITE(V2)
{
  // Read the value of Fan from the app
  int fanValue = param.asInt();


  // Toggle the FanPin based on the received value
  digitalWrite(FanPin, fanValue);
}

// Blynk function to handle incoming data from the app
BLYNK_WRITE(V1)
{
  // Read the value of Light from the app
  int lightValue = param.asInt();

  // Toggle the LightPin based on the received value
  digitalWrite(LightPin, lightValue);
}

Credits

Mukesh Sankhla
29 projects • 42 followers
🧑‍💻Passionate software engineer at Siemens, dedicated to driving digitalization by day.🧑‍🏭By night, I'm a Maker.
Contact

Comments

Please log in or sign up to comment.