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:
- 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-.
- 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.
Connect the 100kΩ potentiometer:
Power the Arduino via:
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 parametersfloat setTemp = 25.0;const float HYSTERESIS = 2.0;const float MIN_TEMP = 0.0;const float MAX_TEMP = 300.0;
// LCD setupLiquidCrystal_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);}
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
0 Comments