element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Control Systems
  • Challenges & Projects
  • Project14
  • Control Systems
  • More
  • Cancel
Control Systems
Blog Yummy yogurt with temperature control
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Control Systems to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: redcharly
  • Date Created: 14 Oct 2020 2:44 PM Date Created
  • Views 1676 views
  • Likes 7 likes
  • Comments 5 comments
  • ntc
  • controlsystemsch
  • sensorsch
  • arduino mega
Related
Recommended

Yummy yogurt with temperature control

redcharly
redcharly
14 Oct 2020
image

Sensors

Enter Your Electronics & Design Project for a chance to win a $200 shopping cart!

Submit an EntrySubmit an Entry  Back to homepage image
Project14 Home
Monthly Themes
Monthly Theme Poll

 

image

 

Introduction

This project aims to create a yogurt maker in order to produce a delicious yogurt at home.

Obviously, I will devote myself to the construction of the temperature controller. The purpose of this work is to create a circuit that produces a constant temperature of 42 degrees centigrade.

I will use 10W resistors to generate the heat needed to heat an aluminum cooling fin and an NTC to measure the temperature.

The aim of this project is to have a temperature as constant as possible and we will use various methods to obtain it. The main components of this project are the NTC sensor, the heating element, and the control board.

 

The sensor: NTC

When we want to measure temperature in a "common" range, that is around ten degrees centigrade, the most convenient and simple solution, also taking into account the temperatures we are dealing with, is certainly to use a temperature and humidity sensor such as DHT11 or DHT22 which provide precise values without the need for additional calibrations and circuits. We will use an NTC in this project due to its very small size (we will insert the NTC resistor inside the heatsink) and ease of use.

 

image

 

The NTC resistor is a passive electronic component that varies its resistance according to the temperature in which it is found. It is a sensor which, as the temperature increases, decreases its resistance and vice versa.

To be able to use it we will have to create a simple voltage divider and read the analog value obtained in the internal node through the analog input A0 of the Arduino Mega. Since the link between the temperature and the resistance of the NTC does not follow a linear law, it will be the task of the control board to calculate the temperature by calculating it thanks to the Steinhart-Hart equation, a non-linear equation that can be well calculated using an Arduino Mega.

 

 

Arduino Schematics and Code

The circuit diagram is very simple. We will only have to connect the resistive divider with the NTC sensor and the relay to the Arduino Mega and supply current to the control board via the USB cable.

 

int ThermistorPin = 0;
int OutPin = 3;
int Vo;
float R1 = 10000;
float MaxTemp = 42;
float logR2, R2, T;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;


void setup() {
  Serial.begin(9600);
  pinMode(3, OUTPUT);
}


void loop() {
  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));   //Steinhart-Hart equation
  T = T - 273.15;
  Serial.println(T);
  if (T <= MaxTemp) {
      digitalWrite(OutPin, 1);
  } else{
      digitalWrite(OutPin, 0);
    }
 delay(1000);
}

 

 

image

 

The heating element

As a test, I will use the CPU cooler from an old PC and use a series of current-carrying power resistors to heat this cooler. It has a large mass of aluminum and it will therefore be necessary to apply voltage to the resistances for several minutes to raise the temperature.

In this case, we will not use any driver and our control will simply consist of powering the resistors until the temperature reaches the desired value and then stop the current flow. When the heatsink temperature drops below the desired value, the resistive load will be powered again, heating the heatsink again. When fully operational, we expect the temperature on the heatsink to remain around the chosen temperature value.

 

image

 

ON-OFF control

The first solution that you can think of, and also the simplest is to use an ON-OFF control to heat the heatsink up to 42 degrees. The temperature sensor made by an NTC will be used to obtain the temperature instant by instant and, when the measured temperature exceeds 42 degrees centigrade, the power supply of the heating element will be turned off. When the temperature drops below 42 degrees, the power will be turned on again in order to bring the temperature back to the desired value. This is a simple example of a classic ON-OFF control that is made with great ease even if it has not very performing characteristics.

The circuit that creates this configuration is very simple: a simple relay will allow the heating element to be connected to the supply voltage, opening and closing the circuit to ensure a constant temperature.

It will be the Arduino Mega, once it detects a temperature above 42 degrees, to manage the power supply of the power resistors.

 

 

Construction

The construction of the heating and measurement unit was done in a rather rough way as I had to use (or rather recycle, as our friend Enrico Miglino taught us in his 3 webinars Vintage Upcycling with Raspberry Pi and Arduino: Part 1: Pi Rotary ) material that I had at home. The work was a lot of fun and, often, I felt almost as brilliant as Wile E. Coyote.

 

{gallery} The construction

image

image

image

image

image

image

 

From the photos, you can see the solutions that I tried to re-scale the prototype. Obviously, the yogurt maker will be the last step to take, for now, I would like to obtain a system that, powered at 12V, will provide me with temperature as constant as possible.

As support I used a heatsink from an old PC of mine, it still mounts its fan but, for this first test I will not use it, I will keep it in consideration for a second time when I might want to minimize the overshoot of the temperature compared to the desired value.

I fixed 8 resistors having a value of 18 Ohm and 11W on the heatsink and I fed them to 12V to obtain a heating element with a large surface and with a fixed heating profile. The resistors are tightened to the heatsink by 3 tight iron wires and the heat conduction is optimized using a silicone thermal grease.

The sensor (NTC) is very small and has been inserted by pressure between two blades of the heatsink after having insulated the leads with heat-shrink tubing.

As soon as the heating elements are connected to the 12V power supply, the heat generated by the Joule effect will heat the heatsink in a few minutes, bringing it to the desired temperature.

The voltage at the resistances is controlled by a relay which will let the current flow until the desired temperature is reached.

The relay will be driven by a MOSFET with a classic driver circuit.

 

image

 

 

 

{gallery} Let's Start

image

image

image

 

 

 

The temperature value will be sent from Arduino Mega to the serial port and, thanks to the use of the Putty software, it will be saved in a text file and subsequently displayed and graphed with a spreadsheet.

2215 readings were made, equal to about 36 consecutive minutes. In the ordinate axis, we will find the temperature in degrees Centigrade.

 

image

 

 

You can see how the control works quite well even with this very simple control scheme.

In the beginning, the temperature rises exceed the desired threshold and continue with a considerable overshoot, after which oscillations of less and less amplitude begin around the desired temperature.

Obviously, in this case, we are realizing the control of an intrinsically slow physical quantity such as temperature. The same control scheme would have much worse behavior in the case of physical phenomena with faster dynamics. We, therefore, have an answer similar to that of a second-order system like the one in the figure.

 

image

 

It would have been didactically useful to see now an example of proportional control in order to reduce or completely eliminate the overshoot, you could use the classic system of feedback as in the figure and use the Arduino to calculate, at each iteration, the error (the difference between the output of the system, i.e. the measured temperature, and the desired one) and based on the error, perform a correction of the heat generated by the heating element ...

 

                   imageimage

 

...but school has started and my time is short, too short.

I hope to soon realize the second part of this work.

 

Thanks everyone for your attention.

 

 

  • Sign in to reply

Top Comments

  • DAB
    DAB over 4 years ago +1
    Nice analysis. Sometimes you have to be careful with the overshoot and take a slower temperature ramp up. DAB
  • DAB
    DAB over 4 years ago in reply to redcharly +1
    I would go with a PWM drive signal so you can reduce the duty cycle at various levels of temperature. A simple Arduino circuit and software would allow you to program in the right amount of power to meet…
  • three-phase
    three-phase over 4 years ago +1
    Nice project and well written blog, hopefully you will be able to spend some more time on it to progress it further. Kind regards
  • redcharly
    redcharly over 4 years ago in reply to three-phase

    I hope that in the next few weeks I can find some time to play with more efficient controllers.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • three-phase
    three-phase over 4 years ago

    Nice project and well written blog, hopefully you will be able to spend some more time on it to progress it further.

     

    Kind regards

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 4 years ago in reply to redcharly

    I would go with a PWM drive signal so you can reduce the duty cycle at various levels of temperature.

    A simple Arduino circuit and software would allow you to program in the right amount of power to meet your temperature needs without turning into a hard on off control.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • redcharly
    redcharly over 4 years ago in reply to DAB

    Yes DAB, the overshoot is a little too much but considering it was only an ON-OFF control, that's okay too.

    As soon as I have a couple of free afternoons I will try to perform a true feedback control, evaluating both the error and its derivative to obtain a response with no or little overshoot and reduced settling time.

    What do you think about it?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 4 years ago

    Nice analysis.

     

    Sometimes you have to be careful with the overshoot and take a slower temperature ramp up.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube