The goal: Make a simple heater and use the thermistor to measure its output.
Any amount of current passing through a resistor will create some heat. This can be expressed analytically by the power dissipated, which is given by \begin{equation} P = I V = I^2 R \end{equation} We can use a regular resistor and supply it with a current from the Arduino to make a very rudimentary heater element. (It's not much different than a toaster, except the currents are much smaller so we don't have worry about burning our toast.) We've already built a temperature measurement device using the thermistor. This project joins the two into a heater/thermometer system.
Make sure you can use the PWM output (i.e. digital out) to make the LED change brightness. Connect the LED in series to the arduino with a resistor (300 Ω is fine). Here's some code and circuit diagram to start with. We will make the potentiometer control unit next class, Oct 10th. It will be able to do this: Brightness Control
The block diagram for the experiment
We can consider an overview of the entire project as shown here. We have 4 primary elements:
The previous labs and demos have built up each component of the project. Now the idea is the put them together into one application: A controllable heater with a temperature sensor.
Analog In
pin. Analog In
pin. The potentiometer is really just a voltage divider built into a single component. Digital Out/PWM
pin and ground. This is the heater. delay()
pararemeter to 200 milliseconds, so it records 5 data points per second.LastName_FirstName-Lab3.pdf
Our heater is really a very bad heater. The output current we are using from the Arduino is not intended to be used as a heater source current, so you must be sure to not put too small of a resistor in this part. I suggest 220 Ω for your heater. When you change the output of the PWM pin, you aren't changing the current, but the duty cycle. So that means it's only delivering the current for some fraction of the time, not changing the value of the current outputted.
The physical contact between the resistor and the thermistor is crucial. Arrange your board so that the two are close and can be held together with the tension in their metal legs.
Put the potentiometer far away, so that when you adjust it, you don't accidentally disrupt the thermistor/heater contact.
I put an LED on another PWM output with a brightness controlled by the heater output. Not necessary, but might be helpful for debugging.
The Heater and the Thermistor are in physical contact.
Example plot showing the temperature being controlled by the potentiometer.
Here is an example plot. The Potentiometer was set to about 50% of its maximum value after a few seconds. After the temperature stabalized, the potentiometer was increased to 100%, at around 80 seconds. After about 150 seconds, the potentiometer was reduced to a minimum, and the temperature slowly returned to the initial reading.
The video below shows the completed device and the serial monitor output as I change the pot to half its max value and then back to zero over the course of about a minute.