Introduction: High-Precision Temperature Controller
In science and in engineering worlds keeping track of temperature aka (movement of the atoms in thermodynamics) is one of the fundamental physical parameters one should consider almost everywhere, starting from cell biology up to hard fuel rocket engines and thrusts. In computers and basically everywhere where I forgot to mention. The idea behind this instrument was pretty simple. While developing firmware I needed a test setup where I could test the firmware for the bugs instead of our products, which are handcrafted by technicians not to be causing any kind of malfunctions related to above mentioned. Those instruments tend to get hot and therefore constant and precise temperature monitoring is needed in order to keep all the parts of the instrument up and running, and which is not less important performing outstandingly. Using NTC thermistors to solve the task has several benefits. The NTCs (negative temperature coefficient) are special thermistors which change the resistance depending on the temperature. Those NTCs combined with the with calibration method discovered by Stanely Hart and John Steinhart as described in the article "Deep-Sea Research 1968 vol.15, pp 497-503 Pergamon Press" is the best solution in my case. The paper discusses methods of wide range temperature measurements (hundreds of Kelvins...) with those type of devices. In my understanding, coming from an engineering background, the simpler the system/sensor the better. No one wants to have something super complicated under the water, on kilometer depths which can cause issues while measuring temperature there only due to their complexity. I doubt the existence of the sensor to function similarly, maybe thermocouple will, but it requires some support circuitry and it is for extreme precision cases. So let's make the use of those two, for the cooling system design which has several challenges. Some of them are: noise level, the effective sampling of the real-time value and possibly, all above mentioned in a simple and handy package for ease of repair and maintenance also, the costs per unit. Meanwhile writing the firmware, the setup got more and more tweaked and improved. At some point, I realized that it might as well become a standalone instrument due to its complexity.
Step 1: Temperature Calibration by Steinhart-Hart
There is nice article in Wikipedia which will help to calculate the thermistor coefficients depending on needed temperature and thermistor range. In most cases the coefficients are super small and could be neglected in equation in its simplified form.
The Steinhart–Hart equation is a model of the resistance of a semiconductor at different temperatures. The equation is:
1 T = A + B ln ( R ) + C [ ln ( R ) ] 3 {\displaystyle {1 \over T}=A+B\ln(R)+C[\ln(R)]^{3}}
where:
T {\displaystyle T} is the temperature (in Kelvin) R {\displaystyle R} is the resistance at T (in ohms) A {\displaystyle A} , B {\displaystyle B} , and C {\displaystyle C} are the Steinhart–Hart coefficients which vary depending on the type and model of thermistor and the temperature range of interest. (The most general form of the applied equation contains a [ ln ( R ) ] 2 {\displaystyle [\ln(R)]^{2}}
term, but this is frequently neglected because it is typically much smaller than the other coefficients, and is therefore not shown above.)
Developers of the equation:
The equation is named after John S. Steinhart and Stanley R. Hart who first published the relationship in 1968.[1] Professor Steinhart (1929–2003), a fellow of the American Geophysical Union and of the American Association for the Advancement of Science, was a member of the faculty of University of Wisconsin–Madison from 1969 to 1991.[2] Dr. Hart, a Senior Scientist at Woods Hole Oceanographic Institution since 1989 and fellow of the Geological Society of America, the American Geophysical Union, the Geochemical Society and the European Association of Geochemistry,[3] was associated with Professor Steinhart at the Carnegie Institution of Washington when the equation was developed.
References:
John S. Steinhart, Stanley R. Hart, Calibration curves for thermistors, Deep-Sea Research and Oceanographic Abstracts, Volume 15, Issue 4, August 1968, Pages 497-503, ISSN 0011-7471, doi:10.1016/0011-7471(68)90057-0.
"Memorial resolution of the faculty of the University of Wisconsin-Madison on the death of professor emeritus John S. Steinhart" (PDF). University of Wisconsin. 5 April 2004. Archived from the original (PDF) on 10 June 2010. Retrieved 2 July 2015.
"Dr. Stan Hart,". Woods Hole Oceanographic Institution. Retrieved 2 July 2015.
Step 2: Assemby: Materials and Methods
In order to start building, we need to consult the BOM aka (Bill on Materials) and see what parts we plan to use. Besides the BOM, soldering-iron, a couple of wrenches, screwdrivers and a hot glue gun would be needed. I would recommend a basic electronics laboratory tools having next to you for convenience.
-------------------------------------------------------------------------------------------------------------------------------
- Prototyping board-1
- Hitachi LCD Display-1
- Mean Well 240V>>5Volt power supply-1
- Red LED-3
- Blue LED-3
- Green LED-1
- Yellow LED-1
- OMRON Relay (DPDT or similar 5 Volt)-3
- Potentiometer 5KOhm-1
- Resistors (470Ohm)-several
- BC58 Transistor-3
- Diode-3
- Low dropout voltage regulator-3
- SMD LEDs (green, red)-6
- MSP-430 microprocessor (Ti 2553 or 2452)-2
- Mechanical switch Brake-Before-Make (240V 60Hz)-1
- Rotary-Encoder-1
- Ritchco plastic holders-2
- DIP sockets for MSP-430 Microprocessor -4
- Electricity supply cable for wall socket-1
- Jumper wires (various colors) - a lot
- NTC Probe aka thermistor 4k7 value, EPCOS B57045-5
- 430BOOST-SENSE1- Capacitive Touch BoosterPack (Texas Instruments)-1 (optional)
- Cooling Fans (optional) in case something needs to be cooled down-(1-3) (optional)
- Pure Aluminum Radiator with 5 holes drilled in it for NTC Probes-1
- Plastic plates with drilled holes - 2
- Nuts, bolts and some screws to assemble the carrier construction-20 (per piece)
- Wire to PCB preff_board mounting socket 2-wire version with screw inside-1
- Sharp® LCD BoosterPack (430BOOST-SHARP96) (optional), serves as second frontal display-1
-----------------------------------------------------------------------------------------------------------------------------------
I know its quite a large bill on materials and might cost some decent amount of money. In my case, I get everything through my employer. But in case you guys want to keep it cheap, you should not consider the optional parts. Everything else is easy to get from Farnell14, DigiKey and/or some local electronics specialized shops.
I have decided over the MSP-430 microprocessor line because I had them laying around. Although one can easily pick "AVRs" RISC MCU's. Something like ATmega168, or ATmega644 with Pico-Power Technology. Any other AVR microprocessor will do the job. I am a big "fanboy" of Atmel AVR actually. And worth to mention if you are coming from the technical background and willing to do some nice assembly, do not use any Arduino board, if you are able to program standalone AVRs, that would be much better, if not then, try to program the CPU and embed into the device.
Step 3: Assembly: Soldering and Building in Steps....
Starting assembly aka soldering from the smallest components is a good start. Begin with the smd components and wiring. Solder the Power-Bus first, somewhere like I did on my preffboard, and then make it longer in a way that all parts on the preffboard easily access the Power-Bus without any rerouting or complications. I used wires all over the preffboard, and that looks pretty crazy, but one can later design a proper PCB, once the prototype works.
- solder SMD parts (for power indication of the MSP-430 MCU's, in between Vcc and GND)
- solder power-bus and wiring (route in a way that it give power to MSP-430)
- solder all sorts of DIL sockets (in order to plug the MSP-430 x 2 IC's
- solder low-dropout voltage regulators with its suitable support (capacitors, for power 5>>3.3 Volts drop)
- solder transistors, and resistors and diodes for the relays and interfacing with the MCU.
- solder the 10k Ohm Potentiometer for the LCD Display brightness control.
- solder the LEDs next to relays, two-state indicator red/blue (blue=on, red=off).
- solder the Mean Well 240Volts >> 5 Volts power supply unit with its connectors.
- Solder the blue mechanical switch (break-before-make) next to power supply.
Solder everything else what is left. I did not create proper schematics from the device just due to lack of time, but it is quite simple with electronics background whatsoever. Upon soldering completion, everything should be checked, for proper connections to avoid any sort of shorting the power lines.
Now its time to assemble the carrier construction. As in pictures, I have used 2 x plastic plates with M3 size holes drilled (4 x per plate) to have long screws and nuts and washers running through, distance bolts and washers are perfect for such interconnections. Thery need to be tightened from both sides to be able to hold the to green plates together.
The preffboard should be inserted in between front washers, that said, those front washers should be big in diameter (up to 5mm) so that one can insert the preffboard in between them and then tighten them up. If done correctly the board will stand at 90° firmly. Another option for holding it in place, would be using a Ritcho plastic PCB holders mounted on those distance bolts via 90° angle which then will help you to screw the plastic parts to distance bolts. At this point, you should be able to plug/attach the preffboard.
After the preffboard installation, LCD (16x2) Display comes as next and should be installed. I use mine in 4-bit mode to conserve GPIO ^_^))))))). Use 4-Bit mode please, otherwise, you won't have enough GPIO to complete the project. The back-light, Vcc and Gnd are soldered through a Potentiometer to power-bus. The display data-bus cables should be soldered directly to MSP-430 micrcocontroller. Please use only digital GPIO. The analog GPIO we need for the NTCs. There are 5 x NTC devices, so it's tight there.
Step 4: Finalizing Assembly and Powering-Up
In order to install the probes/NTCs 5 x pieces on the radiator, drilling must be performed. Consult the datasheet of the NTC, which I have added as picture for the diameters and depth of the drilled hole. Afterwards The drilled hole has to be adjusted with tool to accept the M3 size head of the NTCs. Using 5 x NTC is kind of hardware averaging and smoothing. The MSP-430 has an ADC at 8-Bit resolution so having 5 x sensors will be easy to average the results. We do not dispose Ghz CPUs here, so in our embedded world every CPU clock is essential. Secondary averaging will be performed in Firmware. Each NTC has to legs, and to be able to read data via on-board ADC, voltage divider must be formed, consisting of the R(NTC)+R(def). The ADC port must be attached in the center of those two.R(def) is a second resistor which should be fixed value 0.1 % or better, typically in range with the R(NTC). Optionally you could add an OP-Amp to amplify the signal. Please refer to figure in this section to connect the NTC prpbes.
When the soldering is completed and has been checked, the next step is to install the MSP-430 microcontroller into their DIL sockets. But beforehand they need to be programmed. In this step, it is possible to turn on the device (without the microcontroller) for preliminary tests. If everything is assembled correctly the device should power-on and the relays should be in off-state, indicated by the red LEDs, and the fans should run and display should be on but without any data on it, only the blue back-light.
Step 5: User Input, Rotary-Encoder and Capacitive-Touch Booster-Pack
It is always nice to have an input device, which can be used to input data into the device. The magnetic Knob with permanent magnets is a good choice here. Its task is to enter the temperature threshold for the fans mounted on the radiator block. It lets the user enter a new threshold for temperature via interrupts. Just by turning left or right, can add or subtract values in the range of (20-100 ° C). The lower value is determined by the room ambient temperature.
This Knob has a small circuitry which transmits the digital signal to the microcontroller. The logic high/low is then interpreted by GPIO for input.
The Second input device is Ti's capacitive touch booster-pack. It is possible to use Booster-pack too, but it is not possible to use both, just due to the lack of the GPIO on target MCU. The Booster pack takes way to many GPIO.
In my opinion, Knob is better, than the Booster-Pack. But its good to have a choice. If Booster pack is desired then there is a ready library from Ti to use it. I am not going here into details about it.
Step 6: Summary : Ambient-Temperature Measurements and Further Ideas.......
After the MCU Installation upon power-up, it will greet you and then proceed to measurements. The firmware first keeps the fans in off state. Starts series of measurements on 5 x NTC probes, which then is merged into one absolute value. Then upon this value and comparison (user data) threshold, it turns fans (or desired devices, anything else) attached to DPDT relays on or off. Consider that you can attach to those 3 x Relays anything which need to be turned of or off. Relays are capable of passing 16 Ampers current, but I don't think its a good idea to start using such heavy duty loads on those outputs.
I hope that this "thingy" (^_^)........ hehe will be useful to someone. My contribution to the global hive mind ^^).
I wonder it someone will try to build it. But in case they do, I will happily assist with everything. I have the firmware in CCS and in Energia. Please let me know guys if you need it. Also feel free to text me about questions and suggestions. Greetings from "Sunny" Germany.