We have to measure both the hot side and the cold side, and deliver that to the Arduino as voltages between 0 and 5 Volts. Both circuits currently use precision integrated circuit sensors (LM3DZ) which can measure between -55 and 150 C. The output of these sensors rise 10 mV for every degree C and are accurate to +/- 0.25 C. We also have platinum RTDs which are much more precise, but are extremely delicate, so we will not use those until it is time for our final implementation of the hardware.
The circuits for the hot side and cold side vary slightly in their implementation. The hot side temperature sensor is expected to output between 0.27 and 0.7 V, so we needed to amplify the output such that its lowest temperature reading at 25 C would correspond to roughly 1 V. The circuit is shown below:
It's a bit different for the cold side circuit. The temperature sensor outputs a negative voltage when it senses temperatures below zero C. However, our single supply op amps cannot support negative outputs. So, we decided to shift the ground rail for the temperature sensor down by approximately 1.4 V and add 2 V to both the positive and negative outputs of the temperature sensor, as shown in the resulting circuit:
The Arduino will need to subtract the negative output from the positive output in order to get the correct signal, but this will provide a reasonably good workaround for the negative temperature issue.
The Arduino knows the voltage that should be applied, but it cannot apply anywhere near the power required to cool the TEC. To deliver the necessary power, we could choose one of two paths:
We chose to implement a Buck Converter, as shown in the following schematic:
A Buck Converter is a type of switching regulator. We use it to step down a 12 V power supply to a variable voltage, which is determined by the pulse width of the PWM signal which is connected to the base of the PNP transistor. The inductor smooths the sharp changes in current resulting from the on-off behavior of the transistor, and the capacitor stores charge, which then discharges when the transistor is turned off and causes current to keep flowing through the load, regardless of whatever the transistor is doing.
The buck converter acts as both a power driving circuit and a smoothing circuit for the TEC, ensuring that the unit both has enough power for effective operation, and that its operation will not interfere with the other sensitive equipment on the CubeSat. If we want a smoother output voltage or current, all that we need to do is increase the inductor and capacitor values, as can be seen in the following figure: To finish up, here are some photographs of our actual protoboard and the relevant labels.