Open Marco3231st opened 1 year ago
we could look at the power output of the heat element with different voltages, see which one fits the best with our smoking needs and put a fuse with the corresponding amp so that it doesn't go higher.
We want our temperature to be under 500 but over 300 degrees.
Unfortunatly the temperature sensors are to weak...
with this module, we could easily control the temperature
// Pin for the connection of the DS18B20 sensor const int temperatureSensorPin = 2;
// Temperature offset for correction const float temperatureOffset = -2.0; // Adjust as needed
// Threshold temperature for SSR control (100 degrees Celsius) const float thresholdTemperature = 100.0;
// Pin for the SSR control const int ssrPin = 3;
// Pin for the button const int buttonPin1 = 4; const int buttonPin2 = 5; const int buttonLedPin = 6;
// Total runtime in milliseconds const unsigned long long totalRuntime = 4ULL 60ULL 60ULL * 1000ULL; // 4 hours in milliseconds
// Setup the OneWire bus OneWire oneWire(temperatureSensorPin); DallasTemperature sensors(&oneWire);
void setup() { // Initialize the Serial Monitor Serial.begin(9600);
// Initialize the SSR pin as an output pinMode(ssrPin, OUTPUT);
// Initialize the SSR pin as an output pinMode(ssrPin, OUTPUT);
// Initialize the button and its LED pinMode(buttonPin1, OUTPUT); pinMode(buttonPin2, INPUT); // Use internal pull-up resistor pinMode(buttonLedPin, OUTPUT); digitalWrite(buttonLedPin, LOW); // Turn off the LED initially digitalWrite(buttonPin1, HIGH); // Turn on the current in button
// Initialize the SSR in an open state initially digitalWrite(ssrPin, HIGH);
// Initialize the OneWire bus and the DallasTemperature sensors sensors.begin(); }
void loop() {
if (digitalRead(buttonPin2)==HIGH) {
unsigned long long currentMillis = millis();
// Check the total runtime and stop after the specified time if (totalRuntime >= currentMillis) {
digitalWrite(buttonLedPin, HIGH); // Turn on the LED
// Read the temperature from the DS18B20 sensor sensors.requestTemperatures(); float temperature = sensors.getTempCByIndex(0);
// Apply the temperature offset for correction float correctedTemperature = temperature + temperatureOffset;
// Print the temperature on the Serial Monitor Serial.print("Temperature: "); Serial.print(correctedTemperature); Serial.println(" °C");
// Check the temperature against the threshold if (correctedTemperature < thresholdTemperature) { // If the temperature is under the threshold, keep the SSR open digitalWrite(ssrPin, HIGH); } else { // If the temperature reaches or exceeds the threshold, close the SSR digitalWrite(ssrPin, LOW); }
} else {
// If the time exceeds the threashold, close the button pin
digitalWrite(buttonLedPin, LOW); // Turn off the LED initially digitalWrite(buttonPin1, LOW); // Turn on the current in button
}
} }
To add the type K thermocople and MAX6675 Thermocouple Module
this issue is made to figure out how to control the smoke of the smoker