Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Make Your Own Extruder Temperature Controller (LCD + Thermistor + Potentiometer) PET filament | DIY WTC Zone

    


Welcome to an exciting electronics project where we’ll build a temperature control circuit for a 3D printer extruder using an Arduino Nano! This circuit is a key part of a larger project to convert plastic bottle PET strips into 3D printer filament, but here, we’re focusing solely on controlling the extruder’s temperature. As a beginner in electronics, you’ll love how this project combines sustainability with hands-on learning.

Our goal is to precisely control the extruder’s heater (12V) to melt PET plastic at the right temperature (e.g., 200-250°C for PET plastic). We’ll use a 70kΩ thermistor to measure the extruder’s temperature, a potentiometer to set the desired temperature, and an I2C LCD to display both the set and actual temperatures. An IRF520 MOSFET module will safely switch the heater on and off. By the end of this guide, you’ll have a working temperature control circuit, understand how each component works, and feel confident in your electronics skills. Let’s get started!

Parts Required

To build the extruder temperature control circuit, you’ll need the following components, all of which you have:

Arduino Nano: The microcontroller that reads the thermistor and potentiometer, controls the heater, and updates the LCD.

3D Printer Extruder Assembly:

  • 12V Heater: Heats the extruder to melt plastic.
  • 70kΩ Thermistor: Measures the extruder’s temperature.
  • IRF520 MOSFET Module: Switches the 12V heater on/off.
  • I2C LCD Display (16x2): Displays the set and actual temperatures.
  • 100kΩ Potentiometer: Sets the desired temperature (5kΩ or 10kΩ can work but 100kΩ is preferred).
  • 100kΩ Resistor: Forms a voltage divider with the thermistor (5kΩ or 10kΩ are less optimal).
  • 12V Power Supply (Charger): Powers the heater (ensure it provides 5-10A).
  • Breadboard or PCB: For connecting components.
  • Jumper Wires: For circuit connections.
  • Multimeter (optional): For troubleshooting.

  • Computer with Arduino IDE: For programming the Arduino Nano.

Note: Verify that your 12V charger can supply enough current for the heater (check its rating, typically 5-10A). A soldering iron and heat-resistant tape may help with secure connections.

Concept

The temperature control circuit maintains the extruder at a user-defined temperature to melt plastic bottle strips into filament. Here’s the concept in simple terms:

  • Measure Temperature: The 70kΩ thermistor changes resistance based on the extruder’s temperature, which the Arduino converts to a temperature reading.
  • Set Temperature: A 100kΩ potentiometer lets you choose the desired temperature (e.g., 200-250°C for PET plastic).
  • Control Heater: The Arduino uses the IRF520 MOSFET module to turn the 12V heater on when the extruder is too cool and off when it’s too hot.
  • Display Temperatures: The I2C LCD shows the set temperature (from the potentiometer) and the actual temperature (from the thermistor).

The Arduino reads the thermistor’s voltage, calculates the temperature using the Steinhart-Hart equation, and compares it to the set temperature. If the actual temperature is below the set temperature minus a small margin (hysteresis), the heater turns on; if it’s above the set temperature plus the margin, the heater turns off. This on/off control is simple and effective for beginners, avoiding complex PID tuning.

Role of the Components

  • Arduino Nano:
    • Acts as the brain, reading analog inputs from the thermistor and potentiometer, sending control signals to the MOSFET, and updating the LCD.
  • Compact and beginner-friendly with enough pins for this project.
  • 70kΩ Thermistor:

    • A negative temperature coefficient (NTC) sensor whose resistance decreases as temperature increases.

    • Paired with a 100kΩ resistor in a voltage divider to produce a voltage that the Arduino can read.
  • 12V Heater:
    • Heats the extruder casing to melt plastic (requires 200-250°C for PET).
    • Draws high current, so it’s controlled via the MOSFET, not directly by the Arduino.
  • IRF520 MOSFET Module:

    • A high-current switch that allows the Arduino’s 5V signal to control the 12V heater safely.
    • Protects the Arduino from high voltage and current.
  • I2C LCD Display (16x2):
    • Shows the set temperature (from the potentiometer) and actual temperature (from the thermistor).
    • Uses the I2C protocol to connect with just two pins (SDA and SCL), saving Arduino pins.
  • 100kΩ Potentiometer:
    • Adjusts the desired temperature by outputting a voltage (0-5V) that the Arduino maps to 0-300°C.
    • 100kΩ is ideal for smooth control; 5kΩ or 10kΩ can work but may be less precise.
  • 100kΩ Resistor:
    • Forms a voltage divider with the thermistor to convert its resistance into a voltage readable by the Arduino.
    • Matches the thermistor’s 70kΩ nominal resistance for accurate readings.
  • 12V Power Supply:

    • Powers the heater via the MOSFET module.

    • Can optionally power the Arduino via VIN (7-12V), but USB power is recommended for stability.

Circuit Arrangement Explanation

Let’s connect the components to create the temperature control circuit. This setup is beginner-friendly and uses a breadboard for easy assembly. Follow these steps carefully:

  • Thermistor Voltage Divider:
    • Connect the 70kΩ thermistor and 100kΩ resistor to form a voltage divider:

    • One leg of the thermistor to GND.
    • Other leg to Arduino A0.
    • 100kΩ resistor from A0 to 5V.
    • This circuit produces a voltage at A0 that decreases as the thermistor heats up, allowing the Arduino to measure temperature.

  • Potentiometer for Temperature Setting:

    Connect the 100kΩ potentiometer:

    • One outer pin to 5V.
    • Other outer pin to GND.
    • Wiper (middle pin) to Arduino A1.
    • Rotating the potentiometer changes the voltage at A1, which the Arduino maps to the desired temperature (0-300°C).
  • IRF520 MOSFET Module for Heater Control:

  • Connect the MOSFET module:

    • SIG pin to Arduino D9 (PWM pin, though we’re using on/off control).
    • GND to Arduino GND and 12V supply GND (common ground).
    • VIN+ to 12V supply positive.
    • VIN- to 12V supply GND.
    • VOUT+ to the heater’s positive terminal.
    • VOUT- to the heater’s negative terminal.
    • The MOSFET switches the heater on/off based on the Arduino’s signal, safely handling the 12V high current.
  • I2C LCD Display:

  • Connect the LCD:

    • VCC to Arduino 5V.
    • GND to Arduino GND.
    • SDA to Arduino A4.
    • SCL to Arduino A5.
    • The I2C interface minimizes pin usage and displays the temperatures clearly.
  • Power Connections:

    • Connect the 12V charger to the MOSFET module’s VIN+ and VIN-.

        Power the Arduino via:

    • USB (recommended for stability during programming and testing).
    • Or VIN and GND from the 12V supply (if VIN is 7-12V).
    • Ensure a common ground between the 12V supply, MOSFET, Arduino, and thermistor to avoid noise.

Tips for Beginners:

    • Double-check connections to avoid shorts (use a multimeter if possible).
    • Keep high-current heater wires away from the thermistor and Arduino to reduce electrical noise.
    • Add a 0.1µF ceramic capacitor between A0 and GND to filter thermistor noise.
    • Place a 1N4007 diode across the heater (cathode to positive, anode to negative) to protect against voltage spikes (if not already included in the MOSFET module).


Circuit Diagram

[12V Charger +] ---- [MOSFET VIN+] ---- [Heater +]
[12V Charger -] ---- [MOSFET VIN-] ---- [Heater -] ---- [MOSFET VOUT-] ---- [MOSFET VOUT+]
[MOSFET GND] ---- [Arduino GND] ---- [LCD GND] ---- [Thermistor GND]
[Arduino D9] ---- [MOSFET SIG]
[Arduino 5V] ---- [LCD VCC] ---- [100kΩ Resistor] ---- [A0] ---- [70kΩ Thermistor] ---- [GND]
[Arduino A4] ---- [LCD SDA]
[Arduino A5] ---- [LCD SCL]
[Arduino 5V] ---- [100kΩ Pot Outer Pin 1]
[Arduino GND] ---- [100kΩ Pot Outer Pin 2]
[Arduino A1] ---- [100kΩ Pot Wiper]
[Arduino VIN] ---- [12V Charger +] (optional, or use USB)
[Arduino GND] ---- [12V Charger -]

Note: Ensure all GND connections are linked (common ground).

Use a breadboard to simplify wiring.

Video Link: - Click Here For Video
link to the Stepper motor Blog: - Controlling Stepper Motor Speed

Below is a text-based representation of the circuit (as images aren’t supported): Make Your Own Extruder Temperature Controller (LCD + Thermistor + Potentiometer) | DIY WTC Zone simple Circuit: -


Code for the Circuit

The provided code was designed for a 10kΩ thermistor, but your extruder uses a 70kΩ thermistor. Below is the corrected code, adjusted for:

  • 70kΩ thermistor (NOMINAL_RESISTANCE = 70000.0).
  • 100kΩ series resistor (SERIES_RESISTOR = 100000.0) to match the thermistor.
  • A narrower temperature range (MIN_TEMP = 100, MAX_TEMP = 250) for PET plastic.
  • On/off control with hysteresis for simplicity.

This code reads the thermistor, sets the temperature via the potentiometer, controls the heater via the MOSFET, and displays temperatures on the LCD.

--------------------------------------------------------------------------------------------------------------------------------------------------------------


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Pin definitions
#define THERMISTOR_PIN A0
#define POT_TEMP_PIN A1
#define MOSFET_PIN 9

// Thermistor parameters (for 10k NTC thermistor)
#define NOMINAL_RESISTANCE 10000.0     // 10k ohm at 25°C
#define NOMINAL_TEMPERATURE 25.0       // 25°C
#define BETA 3950                      // Beta coefficient
#define SERIES_RESISTOR 10000.0        // 10k ohm series resistor

// Temperature control parameters
float setTemp = 25.0;
const float HYSTERESIS = 2.0;
const float MIN_TEMP = 0.0;
const float MAX_TEMP = 300.0;

// LCD setup
LiquidCrystal_I2C lcd(0x27, 16, 2);

bool heaterState = false;

void setup() {
  pinMode(THERMISTOR_PIN, INPUT);
  pinMode(POT_TEMP_PIN, INPUT);
  pinMode(MOSFET_PIN, OUTPUT);
  digitalWrite(MOSFET_PIN, LOW);

  lcd.init();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("Temp: --.- C");
  lcd.setCursor(0, 1);
  lcd.print("Set: --- C");

  Serial.begin(9600);
  Serial.println("Temperature Controller Started");
}

float readTemperature() {
  int raw = analogRead(THERMISTOR_PIN);
  if (raw <= 0 || raw >= 1023) return -999.0; // Error value

  // Correct resistance formula (assuming thermistor to GND)
  float resistance = SERIES_RESISTOR * ((1023.0 / raw) - 1.0);

  // Steinhart-Hart approximation
  float tempK = 1.0 / ((1.0 / (NOMINAL_TEMPERATURE + 273.15)) +
                       (1.0 / BETA) * log(resistance / NOMINAL_RESISTANCE));
  return tempK - 273.15;
}

void controlHeater(float currentTemp) {
  if (currentTemp < 0 || currentTemp > 300 || currentTemp == -999.0) {
    digitalWrite(MOSFET_PIN, LOW); // Safety shutdown
    heaterState = false;
    return;
  }

  if (currentTemp < setTemp - HYSTERESIS) {
    digitalWrite(MOSFET_PIN, HIGH);
    heaterState = true;
  } else if (currentTemp > setTemp + HYSTERESIS) {
    digitalWrite(MOSFET_PIN, LOW);
    heaterState = false;
  }
}

void updateDisplay(float currentTemp) {
  lcd.setCursor(6, 0);
  if (currentTemp == -999.0) {
    lcd.print("Err ");
  } else {
    lcd.print(currentTemp, 1);
    lcd.print(" C ");
  }

  lcd.setCursor(5, 1);
  lcd.print((int)setTemp);
  lcd.print(" C ");
}

void handlePotentiometer() {
  int potValue = analogRead(POT_TEMP_PIN);
  setTemp = map(potValue, 0, 1023, MIN_TEMP, MAX_TEMP);
  setTemp = constrain(setTemp, MIN_TEMP, MAX_TEMP);
}

void loop() {
  float currentTemp = readTemperature();

  handlePotentiometer();
  controlHeater(currentTemp);
  updateDisplay(currentTemp);

  Serial.print("Temp: ");
  Serial.print(currentTemp);
  Serial.print(" C | Set: ");
  Serial.print(setTemp);
  Serial.print(" C | Heater: ");
  Serial.println(heaterState ? "ON" : "OFF");

  delay(500);
}

 
----------------------------------------------------------------------------------------------------------------------------

Implementation

Follow these steps to build and program the temperature control circuit:

  1. Gather Components:

  • Collect the Arduino Nano, extruder assembly (heater and thermistor), IRF520 MOSFET module, I2C LCD, 100kΩ potentiometer, 100kΩ resistor, 12V charger, breadboard, and jumper wires.

  1. Assemble the Circuit:

  • Wire the components on a breadboard as described in the “Circuit Arrangement” section.

  • Double-check connections, especially the thermistor’s voltage divider and MOSFET wiring.
  • Ensure a common ground for all components.
  • Add a 0.1µF capacitor across A0 and GND and a 1N4007 diode across the heater for stability.
  1. Install Arduino IDE:

  • Download and install the Arduino IDE from arduino.cc.

  • Install the required libraries:

    • LiquidCrystal_I2C: Go to Sketch > Include Library > Manage Libraries, search for “LiquidCrystal I2C” by Frank de Brabander, and install.
    • Wire: Included with the Arduino IDE.
  1. Upload the Code:

  • Copy the code above into the Arduino IDE.

    • Connect the Arduino Nano via USB.
    • Select Board: Arduino Nano and the correct Port in the IDE.
    • Click Upload to program the Arduino.
    • If you get errors, check for stray characters or ensure the libraries are installed.
  1. Secure the Extruder:

  • Mount the extruder assembly (heater, thermistor, casing) in a heat-resistant setup.

    • Ensure the thermistor is in close contact with the heated area for accurate readings.
    • Use heat-resistant tape or screws to secure components.
  1. Power the Circuit:

  • Connect the 12V charger to the MOSFET module.

    • Power the Arduino via USB (safer) or VIN (if using the 12V supply).
    • Verify that the LCD lights up and displays “Temp: --.- C” and “Set: --- C”.

Testing and Final Test

Initial Testing

  1. Check LCD Display:

    • After powering on, the LCD should show the actual temperature (close to room temperature, ~25°C) and the set temperature (based on the potentiometer).
  • If the LCD is blank, check VCC (5V), GND, SDA (A4), and SCL (A5) connections.

  1. Verify Thermistor Reading:

  • Open the Serial Monitor (9600 baud) in the Arduino IDE.

    • Look for “Temp: ~25 C | Set: ~100-250 C | Heater: OFF” at room temperature.
    • Gently warm the thermistor (e.g., with your fingers); the temperature should increase.
    • If it reads “Err” or incorrect values (e.g., 9°C), check the thermistor wiring or resistor value.
  1. Test Potentiometer:

  • Rotate the 100kΩ potentiometer.

    • The “Set” temperature on the LCD and Serial Monitor should change from 100°C to 250°C.
    • If it’s stuck, verify the potentiometer’s wiring (5V, GND, A1).
  1. Test Heater Control:

  • Set the potentiometer to ~200°C (typical for PET plastic).

    • The heater should turn on (MOSFET LED may light up, and the extruder should warm).
    • The actual temperature on the LCD should rise toward 200°C.
    • When it exceeds 202°C (setTemp + HYSTERESIS), the heater should turn off.
    • If the heater doesn’t turn on, check the MOSFET connections and 12V supply.

Final Test

  • Stable Temperature Control:

    • Set the temperature to 220°C and let the system run for 10 minutes.
    • The actual temperature should stabilize within ±2°C of the set temperature (e.g., 218-222°C).
    • The Serial Monitor should show the heater toggling “ON” and “OFF” as needed.
  • Safety Check:

    • Ensure the extruder casing doesn’t overheat (use a non-contact thermometer if available).
    • If the temperature exceeds 250°C or shows “Err,” the heater should shut off automatically.
  • Functional Test:

  • Feed a small plastic strip into the extruder (manually, for safety).

    • Verify that it softens or melts at the set temperature, indicating the circuit is working.
    • Stop the test if the plastic doesn’t melt or the temperature is unstable.

Troubleshooting Tips:

    • Incorrect Temperature: Verify the thermistor is 70kΩ (measure with a multimeter) and wired correctly (to GND).
    • Heater Not Working: Check the MOSFET’s SIG (D9), VIN+ (12V), and heater connections.
    • LCD Issues: Adjust the I2C address (0x27 may vary; try 0x3F) or check wiring.
    • Noise: Add a 0.1µF capacitor across A0 and GND if readings fluctuate.

Things to Keep in Mind

  • Safety First:

    • The extruder and heater can reach 250°C—handle with care to avoid burns.
    • Work in a well-ventilated area, as melting plastic may release fumes.
    • Ensure the 12V charger is rated for the heater’s current to prevent overheating.
  • Component Compatibility:

    • Use a 100kΩ resistor and potentiometer for best results with the 70kΩ thermistor.
    • Verify the IRF520 MOSFET module is compatible with 5V Arduino signals (some require 10V; consider IRL540 if issues arise).
  • Wiring Accuracy:

    • Double-check the thermistor’s voltage divider (thermistor to GND, resistor to 5V).
    • Maintain a common ground to avoid noise or erratic readings.
  • Power Stability:

    • Use USB power for the Arduino during testing to avoid 12V supply fluctuations.
    • If using VIN, ensure the 12V supply is stable (no significant voltage drops).
  • Code Adjustments:

    • If your thermistor’s B-coefficient differs (check datasheet), update BETA in the code.
    • Adjust MIN_TEMP and MAX_TEMP based on your plastic type (e.g., 190-230°C for PLA).
  • Testing Gradually:

    • Test without plastic first to ensure temperature stability.
    • Avoid prolonged high-temperature operation without proper heat dissipation.
    • Future Scope of the Project
    • This temperature control circuit is a fantastic starting point, and you can expand it for even more functionality:
    • Add a Stepper Motor: Control a stepper motor to pull plastic strips through the extruder, automating the filament creation process.
    • PID Control: Upgrade the on/off control to PID (Proportional-Integral-Derivative) for more precise temperature regulation (use the PID_v1 library).
    • Fan Control: Add a cooling fan (controlled via another MOSFET) to solidify the extruded filament.
    • Temperature Presets: Use buttons to select predefined temperatures for different plastics (e.g., PET, PLA, ABS).
    • Safety Features: Implement an emergency stop button or over-temperature alarm using a buzzer.
    • Data Logging: Save temperature data to an SD card or display it on a mobile app via Bluetooth (e.g., HC-05 module).
    • Full Filament Extruder: Integrate a spooler and diameter sensor to produce consistent 1.75mm or 3mm filament.
    • Open-Source Sharing: Share your design on platforms like Thingiverse or GitHub to inspire other makers and contribute to the recycling movement.

This project opens the door to sustainable 3D printing and advanced electronics projects. As you gain confidence, you can turn this into a fully automated filament extruder, reducing plastic waste while creating high-quality filament for your 3D printer.


Final Thoughts

Congratulations on building a temperature control circuit for your 3D printer extruder! This project is a perfect blend of electronics, programming, and environmental impact. By following this guide, you’ve learned how to wire components, program an Arduino, and control high-power devices safely. Your blog readers will find this tutorial engaging and empowering, as it breaks down complex concepts into beginner-friendly steps.

Ready to take it further? Add a stepper motor or try melting your first plastic strip. Share your progress with your audience, and inspire others to recycle plastic with electronics! If you hit any snags, revisit the troubleshooting tips or experiment with the future scope ideas. Happy making, and keep exploring the world of electronics!


Let me know if you need further help with the implementation or enhancements! 😊

Share, Support, and Subscribe on You tube !!! 1. PRO KAM EXPLAINED 2. Knowledge KAM 3. PRO KAM Follow us on Social media platforms 1. Facebook 2. Instagram 3. Pinterest 4. Blogspot 5 Twitter If you have any other ideas to make me design, you can describe them in the comment section and if I can, I will make a designing video on it. So I am waiting #prokam #wtc #Arduino #ideas #projects #diy #how #to #ArduinoProjects #UltrasonicSensor #HeightMeasurement #TechDIY #WeTechCreators #wtczo

Post a Comment

0 Comments

Ad Code

Responsive Advertisement