DIY Smart 3D Printer Enclosure

by Mukesh_Sankhla in Circuits > Wireless

2730 Views, 21 Favorites, 0 Comments

DIY Smart 3D Printer Enclosure

DIY Smart 3D Printer Enclosure #esp32 #Hon&Guan #iot

Welcome to the DIY Smart 3D Printer Enclosure project! This setup is designed to elevate the safety and performance of your 3D printing experience. Featuring sensors for real-time monitoring of temperature, humidity, and light levels, this enclosure incorporates a versatile exhaust fan and customizable lighting, all effortlessly controlled through the Blynk mobile app.

What makes this project stand out? Well, it's a solution tailored for both FDM and, especially, resin-based 3D printers, addressing potential fume issues that can impact our health. Utilizing the power of ESP32 coupled with environmental sensors, we're equipped to ensure a healthier and smarter 3D printing space by effectively managing fumes and environmental conditions. Let's make our 3D printing space both smarter and healthier!


Sponsored By NextPCB

This project is successfully completed because of the help and support from NextPCB -Reliable Multilayer PCB Manufacturer. NextPCB is one of the most experienced PCB manufacturers in Global, has specialized in the PCB and assembly industry for over 15 years.

Order you high-quality PCB starting at $1.9, multilayer starting at $6.9.

Enjoy Free PCB assembly for 5 boards.

Try DFM free online PCB Gerber viewer.

Supplies

DSC00749.JPG
DSC00752.JPG
DSC00753.JPG
DSC00755.JPG
DSC00740.JPG
DSC00751.JPG
DSC00741.JPG
DSC00744.JPG
DSC00746.JPG
DSC00750.JPG
DSC00748.JPG
DSC00757.JPG
DSC00759.JPG
DSC00760.JPG
DSC00761.JPG
DSC00762.JPG

Circuit Connection

1.png
relayConnection.png
DSC00771.JPG
DSC00773.JPG
DSC00772.JPG

Just refer to the circuit diagram and connect the electronics on the prototyping board. I've used header pins and corresponding electronic components for easy connections and component replacement.

About L7805CV

DSC00777.JPG

The L7805CV is a voltage regulator integrated circuit (IC) that is commonly used to provide a stable and fixed output voltage of +5 volts. This component is part of the 78xx series of voltage regulators, where "78" denotes a positive voltage regulator and "05" indicates the fixed output voltage of +5 volts.

Here are some key points about the L7805CV:

  1. Voltage Regulation: The primary function of the L7805CV is to regulate the input voltage and maintain a constant output voltage of +5V.
  2. Input Voltage Range: The typical input voltage range for the L7805CV is around 7V to 35V. It can handle higher input voltages, but the excess voltage is "dropped" or dissipated as heat.
  3. Output Current: The maximum output current is around 1.5 amps. It can supply a stable +5V output for electronic circuits within this current limit.
  4. Three-Terminal Device: The L7805CV has three terminals: Input (Vin), Ground (GND), and Output (Vout). Proper connection and orientation of these terminals are crucial for correct operation.
  5. Heat Dissipation: The L7805CV may generate some heat, especially when the input voltage is significantly higher than the output voltage. To prevent overheating, it's common to use a heatsink or ensure adequate ventilation.


About IRF520N

DSC00775.JPG

The IRF520N is a power MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) commonly used in electronic circuits for switching applications. Here are some key points about the IRF520N:

  1. Type: The IRF520N is an N-channel MOSFET. In N-channel MOSFETs, current flows from the drain to the source when a voltage is applied to the gate.
  2. Voltage and Current Ratings: It is designed to handle relatively high voltages and currents. The maximum drain-source voltage (Vds) is usually around 100 volts, and the maximum continuous drain current (Id) is typically in the range of 9-10 amperes.
  3. Gate Threshold Voltage (Vgs(th)): This parameter indicates the voltage at which the MOSFET starts conducting. For the IRF520N, it is typically around 2-4 volts.
  4. Low On-Resistance (Rds(on)): The on-resistance of the MOSFET, when it is fully conducting, is relatively low. This is beneficial for minimizing power dissipation and improving efficiency in switching applications.
  5. Switching Applications: The IRF520N is commonly used in electronic projects where there is a need for switching high-power loads, such as controlling motors, solenoids, or other inductive loads.
  6. Heat Dissipation: Like many power MOSFETs, the IRF520N may generate heat during operation. It is important to consider heat dissipation methods, such as using a heatsink, especially when dealing with higher currents.
  7. Pin Configuration: The IRF520N typically has three terminals: Gate (G), Drain (D), and Source (S). Proper connection and attention to polarity are essential for correct operation.

About Relay

1.12-Relay.gif
DSC00774.JPG

A relay is an electromechanical device that functions as a switch, using an electromagnet to control the flow of electrical current. Here are some key points about relays:

  1. Switching Function: Relays are used to control the opening and closing of electrical circuits. They act as an interface between low-power electronic circuits (such as microcontrollers or sensors) and high-power devices (such as motors, lights, or appliances).
  2. Electromagnetic Operation: Relays consist of a coil (winding) and a set of contacts. When a current flows through the coil, it generates a magnetic field that attracts a movable armature. This action causes the contacts to either close or open, completing or interrupting the electrical circuit connected to them.


3D Printed Parts

DSC00770.JPG
DSC00769.JPG
DSC00768.JPG
DSC00767.JPG
  • After measuring dimensions and consulting datasheets, I've created a basic enclosure using Fusion 360 to house the electronics.
  • Feel free to examine my design, download it, and make any modifications as needed.
  • I have exported the housing and cover parts as .stl files and 3D printed them in this wood-colored filament.

Assembly

DSC00780.JPG
DSC00781.JPG
DSC00782.JPG
DSC00785.JPG
DSC00786.JPG
DSC00784.JPG
DSC00783.JPG
DSC00792.JPG
DSC00793.JPG
DSC00798.JPG
  • Once the circuit and electronics enclosure are prepared, use screws to secure the components in their designated positions.
  • Before closing the housing with the cover, perform a quick test to ensure everything is functioning properly.
  • Finally, close the snap-fit housing with the cover body.


Note: The Mylar enclosure includes a comprehensive instruction guide and well-labeled guides, facilitating an easy assembly process.

Blynk Setup

Screenshot 2023-12-31 101138.png
Screenshot 2023-12-31 101402.png
Screenshot 2024-01-07 192113.png
Screenshot 2024-01-07 192155.png
Screenshot 2024-01-07 192208.png
Screenshot 2024-01-07 192323.png

What is Blynk?

Blynk is a platform for building and managing Internet of Things (IoT) applications. It provides a mobile app and a cloud-based infrastructure that allows users to control and monitor connected devices remotely. Blynk is popular among makers, hobbyists, and developers who want to create IoT projects without extensive knowledge of coding and networking.


Now let's setup Blynk for our device:

  1. Go to Blynk.io and create a free account.
  2. Once logged in create a new template by providing name for your template, select hardware as ESP32 and Connection Type as Wi-Fi.
  3. Then go to DataStream's panel and configure the DataStream's as shown in the above image.
  4. Now go to Devises and create a new device by selecting the template that we have created.
  5. Once device is created copy the Firmware Configuration, we will need this in the next step.

Code

Screenshot 2024-01-07 193502.png
FG3TI62LQMCXFM7.png
Screenshot 2024-01-07 194546.png
Screenshot 2024-01-07 194724.png
Screenshot 2024-01-07 194437.png
Screenshot 2024-01-07 194907.png


  • Now copy paste the below code in the Arduino IDE.
/*
   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);
}


  • Replace the following in the code with the copied Firmware Configuration.
/* Fill in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "***********"
#define BLYNK_TEMPLATE_NAME "*****************"
#define BLYNK_AUTH_TOKEN "****************************"
  • Also enter your Wi-Fi credentials
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "**********"; //Wifi Name
char pass[] = "*********"; //Password


  • Now select the board as FireBeetle 2 ESP32-E, select the port and upload the code.

Blynk App Setup

Screenshot_20240109_230220.jpg
Screenshot_20240109_230244.jpg
Screenshot_20240109_230247.jpg
Screenshot_20240109_230256.jpg
Screenshot_20240109_230309.jpg
Screenshot_20240109_230344.jpg
Screenshot_20240109_230352.jpg
Screenshot_20240109_230438.jpg
Screenshot_20240109_230442.jpg
Screenshot_20240109_230451.jpg
Screenshot_20240109_230537.jpg
Screenshot_20240109_230539.jpg
Screenshot_20240109_230621.jpg
  • To set up the Blynk mobile app, log in to your account. Locate the template you created earlier in a web browser and open it. The template might appear blank initially.
  • Click on the spanner icon to add widgets. Use the + icon to find various widgets, then drag and drop two buttons and three gauges onto the template. Resize them as needed.
  • Click on each added widget, choose the corresponding DataStreams, and customize the design by adjusting aesthetic parameters like font and color.
  • Remember to set the buttons as switches instead of push buttons.
  • After these adjustments, your template should resemble mine.

Conclusion

DSC00802.JPG

This 3D printer enclosure is a valuable addition, offering the advantage of an exhaust fan for effective fume extraction, especially beneficial for resin 3D printers. Its substantial size allows for a horizontal configuration, accommodating 2-3 standard-sized 3D printers seamlessly.

If you decide to recreate this project, share your experience in the "I Made It" section. I'm eager to hear your thoughts and any improvements you've made. Feel free to leave your comments below.

Additionally, consider extending the utility of this project to home gardening or hydroponics. Monitor environmental parameters and take control of the fan, pump, and grow lights, making it a versatile solution for optimizing your indoor gardening experience. See you next time!