Monday, February 28, 2011

Simple Thermocouple Amplifier

A couple of my friends needed a two channel thermocouple amplifier for their mechanical engineering senior project, but lacked the time or budget to try and get a commercial unit, so they asked me to build them one over the weekend.
My final result turned out pretty nice.  This uses a high precision Linear dual op-amp to amplify the signal from two thermocouples.  Using the LCT1051 low offset op-amp means the input offset of the amplifier is only 5μV, meaning we can skip all of the zero offset circuitry normally needed for these types of DC amplifiers.  The two potentiometers are used to calibrate the thermocouples to the target 10mV/degree Celsius output from the amplifier.

The one concern with using thermocouples is that they create a voltage signal (which is very small, on the order of 60uV/degree) based on a temperature difference.  This means that to find out the temperature at the end of the thermocouple, you need to also know the temperature at the base of the thermocouple, and then add these two temperature signals together to get the actual temperature at the bead of the thermocouple.  Luckily, Linear also makes a very nice thermocouple compensator, which does exactly this.  I did little more than build a pair of the reference applications from the LT1025 datasheet.

I am only using a positive power supply, so this amplifier cannot measure negative temperatures, and I wouldn't trust it much below room temperature.  This was designed to measure temperature elevation from machining, so this limitation is fine, but make sure this is alright for your application.
Parts list:
  • 2x 255k 1% resistor ($0.112 Digikey)
  • 2x 1k 1% resistor ($0.112 Digikey)
  • 2x 100Ω high turn pot ($0.92 Digikey)
  • 5x 0.1μF capacitor ($0.16 Digikey)
  • 1x 100 μF capacitor ($0.17 Digikey)
  • 2x 8DIP3 socket ($0.13 Digikey)
  • 1x LT1025 thermocouple compensator ($5.10 Digikey)
  • 1x LTC1051 dual low offset op-amp ($8.10 Digikey)
  • 9x screw terminals (Salvaged)
Building this on perf board was probably not ideal, but considering that this is a DC amplifier, as long as the connections to it are decently noise-free, this should be fine.
 Top (The wiring is all 32 gauge wire wrap wire)
Before I soldered everything together, I wanted to double-check that the resistors and pot were right (they should be; I pulled them from the datasheet), and that the circuit would work overall.  I did this by measuring the voltage out of a K thermocouple in boiling water, which should ideally be 1V (10mV/C * 100C).  Oddly, even with the amplifier gain turned ALL the way up, the voltage out was only reading 0.93V.  I spent almost an hour tinkering with the circuit on a breadboard before I finally gave up and turned off the hot plate.  Of course, as soon as I turned off the hot plate, the voltage swung up to 1.15V.  Turns out, since I had the hot plate and volt meter plugged into the same power strip, the hot plate was detuning the volt meter by more than 10%.  Once I realized this, it was trivial to turn the hot plate on and off to test the circuit, to make sure that my friends could calibrate it (their thermocouples were more of a pain to work with than mine, so I'll let them go through the difficulty of actually calibrating the amplifier for their project.

Nice little trick I picked up recently; if you use open frame sockets, you can actually fit a small ceramic cap inside the DIP socket, making it much easier to fit a filter cap near the power pins of the op-amp.

Sunday, February 6, 2011

Low Power LCD Clock

After my initial experiments with the MSP430 and a raw LCD screen, I've been looking for how to use these in a larger project.  The MSP430G2 chips I have lack anywhere near enough pins to drive the 28 segments of the display. Luckily, while browsing through the Dallas/Maxim site, I found the ICM7211 LCD drivers.  This driver chip handles all of the backplane-segment biasing needed for four seven-segment digits.
The obvious first project for a new display tech is another clock, of which I've already generated several.  Since the MSP430 chip is low power, and the LCD screen and driver are very low power, I realized that with some careful programming, I could get the total circuit power consumption low enough to be reasonably powered by only a standard CR2032 coin cell.


In addition to the four digits on the LCD, there is also several axillary segments such as decimal points and middle colon.  The ICM7211 driver chip has no provisions for these extra segments, so I had to build additional circuitry to invert the backplane signal to bias the colon segment.  To keep the power consumption of the invert low, I used a 2N7000 MOSFET and a very large (5MΩ) resistor.  If control of the segment is desired, a CMOS XOR gate can instead be used.  This would allow the signal to the segment to be selectively inverted from the backplane to darken it, or to follow the backplane voltage to keep the segment clear, by XORing together the AC backplane voltage, and a DC control signal.

The MSP430G2231 I used for the clock does not have enough pins to handle the 8 pin interface with the ICM7211 driver.  To solve this, I used the standard 74HC595 latching shift register to get 8 output pins from only three on the MSP430.  The LCD driver does come in a -M variant which only takes 6 pins, but I didn't happen to have ordered this part.  The driver also comes in either a hexadecimal or B-code variant.  I got a hexadecimal variant, which doesn't allow me to blank digits like the B-code does.

After soldering together the entire project on a piece of perf board, I was happy to see that my initial power calculations were not entirely off base, with a current consumption of roughly 12μA for the entire clock. Using a standard 200mAh coin cell, this implies more than a two and a half year battery life for the device, which isn't too shabby.
Parts list:
  • MSP430G2231 (DIP) (Digikey $2.17)
  • 74HC595 (Digikey $0.60)
  • ICM7211 (Not available in parallel hex code, B-code: Digikey $7.39)
  • Raw LCD (Halted $2.00) - I have not bought these myself, but possible replacements on Digikey: [1] [2] (Please let me know if you use these and they work.)
  • 2x Push button (Excess Solutions, $0.10)
  • 2N7000 (Digikey $0.40)
  • 5.1M resistor (Digikey $0.07)
  • 100k resistor (Digikey $0.07)
  • 32.768 kHz crystal (Digikey $0.30)
  • 100μF capacitor (Digikey $0.17)
  • CR2032 battery holder (Digikey $0.70)
  • CR2032 battery (Amazon 25 count @ $4.97)
  • 40DIP6 socket (Digikey $0.42)
  • 14DIP3 socket (Digikey $0.15)
  • 16DIP3 socket (Digikey $0.16)
Source code: