Temperature Control Module

Thread Starter

em_cardc

Joined Apr 5, 2016
43
You are in charge of designing the temperature control module (TCM) of a hydroponic system. Your TCM will read a temperature setting in Celsius degrees and compare it to the current temperature read from a digital thermometer. Temperature values will be presented in binary to the TCM. Values will have no fractional part. While allowable settings will range from 5 to 45 degrees, measurable temperatures will range from zero to 50 degrees. When the current temperature is above the setting, the TCM shall turn on a cooling control signal. However, if the current temperature falls below the setting, the TCM must turn on a heating control signal. Otherwise, the TCM shall turn on a signal to indicate that the current temperature matches the setting.
A.
Draw a schematic circuit of your design indicating inputs and outputs.
B. Build your design using the MSP430 Launchpad using C code.
C.
Show input and output values using clearly labeled LEDs.
D. Using the sec_hundredths_delay() function from Assignment #2, introduce a stabilization delay in your code to avoid having instantaneous changes in inputs produce similar changes in outputs, as you do not want changing inputs to quickly toggle on and off your cooling and heating devices.

I have uncertainty as to how to begin to implement this regarding the initial instructions... It is asking me for an input setting (I will be using two push buttons to increase/decrease a value for temperature) although, it is asking me to compare to the current temperature read from a digital thermometer where I do not understand where the reading is to be compared from/to in general. Also, I am being asked to use LEDs which for this case I will be using six which will count in binary values from 0 to 50. Can someone just clear things up a bit so that I can start working on my algorithm?

Thanks.
 
Last edited by a moderator:

wayneh

Joined Sep 9, 2010
17,498
I haven't worked with digital temperature systems but I think the idea will be the same: You compare the actual reading to set point and then act on that. So you'll read your probe and compare it to the temperature entered (chosen may be the better word) by the user.

One think that I don't see addressed well is hysteresis, how much the temperature can vary from the set point before acting. Otherwise the system may switch immediately from heating to cooling and go into an over-control oscillation. The delay helps address that and I think the setup defines the hysteresis as 1°, but it would be better in my opinion to be able to specifically select the hysteresis, and therefore the deadband where no heating or cooling action is required.
 

shteii01

Joined Feb 19, 2010
4,644
You are in charge of designing the temperature control module (TCM) of a hydroponic system. Your TCM will read a temperature setting in Celsius degrees and compare it to the current temperature read from a digital thermometer. Temperature values will be presented in binary to the TCM. Values will have no fractional part. While allowable settings will range from 5 to 45 degrees, measurable temperatures will range from zero to 50 degrees. When the current temperature is above the setting, the TCM shall turn on a cooling control signal. However, if the current temperature falls below the setting, the TCM must turn on a heating control signal. Otherwise, the TCM shall turn on a signal to indicate that the current temperature matches the setting. A. Draw a schematic circuit of your design indicating inputs and outputs. B. Build your design using the MSP430 Launchpad using C code. C. Show input and output values using clearly labeled LEDs. D. Using the sec_hundredths_delay() function from Assignment #2, introduce a stabilization delay in your code to avoid having instantaneous changes in inputs produce similar changes in outputs, as you do not want changing inputs to quickly toggle on and off your cooling and heating devices.

I have uncertainty as to how to begin to implement this regarding the initial instructions... It is asking me for an input setting (I will be using two push buttons to increase/decrease a value for temperature) although, it is asking me to compare to the current temperature read from a digital thermometer where I do not understand where the reading is to be compared from/to in general. Also, I am being asked to use LEDs which for this case I will be using six which will count in binary values from 0 to 50. Can someone just clear things up a bit so that I can start working on my algorithm?

Thanks.
"Your TCM will read a temperature setting in Celsius degrees and compare it to the current temperature read from a digital thermometer."
I think your problem description has an error. You will need to consult your instructor.

Regarding leds. Use 7 segment led displays. Use them with 7 segment led driver chips. That may your MSP430 board sends serial or parallel signal to driver chip, and driver chip turns on and off the 7 led segments and you get to see the appropriate number.
 

spinnaker

Joined Oct 29, 2009
7,830
I have uncertainty as to how to begin to implement this regarding the initial instructions... It is asking me for an input setting (I will be using two push buttons to increase/decrease a value for temperature) although, it is asking me to compare to the current temperature read from a digital thermometer where I do not understand where the reading is to be compared from/to in general. Also, I am being asked to use LEDs which for this case I will be using six which will count in binary values from 0 to 50. Can someone just clear things up a bit so that I can start working on my algorithm?

Thanks.

Seems awfully straight forward to me. Your buttons will determine the setpoints. If the monitored temperature falls below the low setpoint then turn the heat on. If it goes above the high set point then turn on the cooling. Just compare the temperature read to the set point value. You could also do it with one setpoint but it could mean the heat and cooling would constantly be cycling. The right way to do it is with 2 setpoints and/or a way to select heating or cooling just like in your home.

Not sure why in the heck they want to use LEDs for binary value. Seem awfully difficult to interpret. But I would use 2 sets of leds. One set for the setpoint value. One set for the value read from the sensor. I would use a shift register (or multiple shift registers) to save on mcu pins. You might also look at Charlieplexing.
 
Last edited:

spinnaker

Joined Oct 29, 2009
7,830
I don't see that.

The TCM will be comparing binary values representing temperatures.
There is nothing in there that says that led will display binary.

"I am being asked to use LEDs which for this case I will be using six which will count in binary values from 0 to 50."

But in the requirements that could be interpreted as 7 segment displays. Actual requirements in that regard are not clear.
 

shteii01

Joined Feb 19, 2010
4,644
"I am being asked to use LEDs which for this case I will be using six which will count in binary values from 0 to 50."
Ok, I see it.
My opinion is that OP misinterpreting that part of the assignment.

OP says that he is being asked to use LED. Why is it important? My senior design project was also on temperature controlled system. So my team had a choice: led (7 segment), lcd, computer type monitor. We wrote out pros and cons of each, presented it to the supervisory team of three insturctors, they approved our choice of lcd, we used commercial 4x20 lcd with serial comms. OP does not have a choice, they are asked to use led, I get that. But then OP says that the leds will be used for binary count? Nothing in problem description talks about any kind of binary count... So. Why is OP doing it? And if they want the count, they can use lcd instead and they can fit 20 bit binary number on a cheap generic 2x20 lcd.
 

spinnaker

Joined Oct 29, 2009
7,830
Ok, I see it.
My opinion is that OP misinterpreting that part of the assignment.

OP says that he is being asked to use LED. Why is it important? My senior design project was also on temperature controlled system. So my team had a choice: led (7 segment), lcd, computer type monitor. We wrote out pros and cons of each, presented it to the supervisory team of three insturctors, they approved our choice of lcd, we used commercial 4x20 lcd with serial comms. OP does not have a choice, they are asked to use led, I get that. But then OP says that the leds will be used for binary count? Nothing in problem description talks about any kind of binary count... So. Why is OP doing it? And if they want the count, they can use lcd instead and they can fit 20 bit binary number on a cheap generic 2x20 lcd.

LCD would be a lot easier witrh a lot more options.
 
Top