# TEG / Peltier Plate Test Rig With Temperature / Voltage / Current Logger

1,845

15

## Introduction: TEG / Peltier Plate Test Rig With Temperature / Voltage / Current Logger

This rig was made up to log two temperatures and the corresponding voltage/current output from a TEG plate.

The two thermocouples will measure the difference in temperature and log it with the real time voltage and current outputs. The purpose of this is to confirm and verify data with a mathematical model I have for the system.

This is an experiment for a university project however might be useful for other applications.

Simple 4 channel voltage loggers are way over £100 and this system will cost around £10 for the 2 thermocouple analogue to digital converters, and the rest of the components you will most likely have already.

The output is a .CSV type data in the serial viewer which can be pasted into excel where the data can be analysed.

I will update this as I install it on the frame and start to get some results. The individual elements all work and nothing got hot when tested however I recommend you test with low voltages initially.

## Step 1: Electronics and Code

What you will need:

-Arduino (any)

-LCD Screen for arduino

-2 x MAX6675 thermocouple boards

-10k, 33k, 220 and 10kPOT resistors

-2 x 4-5V zener diodes (optional arduino board protection)

The code will require:

-The Crystal Display Library (comes with the arduino software)

-The library from ryanjmclaughlin available at https://github.com/ryanjmclaughlin/MAX6675-Library

The code below should plug and play once uploaded and leave a csv file in the serial monitor which you can drag and drop into excel for further analysis.

I will add more comments to the code when I get time

#include
#include

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

MAX6675 temp1(7,6,8,1);

MAX6675 temp2(10,13,9,1);

int temperature1;

int temperature2;

int Voltage;

int Current;

void setup() {

lcd.begin(16, 2);

Serial.begin(9600);

}

void loop() {

float Current = (analogRead(A1))*(5.0 / 1023.0);

lcd.setCursor(0, 0);

lcd.print("Hot: ");

lcd.print(temperature1);

lcd.print(" V: ");

lcd.print(Voltage*(1.61/0.37));

lcd.setCursor(0, 1);

lcd.print("Cold: ");

lcd.print(temperature2);

lcd.print(" I: ");

lcd.print(Current/0.2);

Serial.print(temperature1);

Serial.print(",");

Serial.print(temperature2);

Serial.print(",");

Serial.print(Voltage*(1.61/0.37));

Serial.print(",");

Serial.print(Current/0.2);

Serial.println("");

delay(1000);

}

## Step 2: Output

The image shows the output, this was done with just the thermocouples, however the output will be Temp1,Temp2,Voltage,Current. To calibrate these you must edit the values in the code.

The voltage divider uses a 10k and 33k so where I have used (10/10+33) = 0.232 you need to replace this with your own (r1/r1+r2). This seemed a good ratio to drop the voltage down by to not blow the arduino up. Then the value is multiplied back up numerically for the output value. The larger the drop, the less accurate your reading will be as you are reading a smaller number each time, therefore increasing any error in the system by 1/0.232. The benefits are larger voltage readings.

Any large voltage after the voltage divider should be shorted out at 5V by the zener diode, protecting the arduino, but I don't fancy testing this.

The 0.2 in the code is my is my resistance of my step down resistor, replace this with your own resistance you use; this is needed to get the voltage drop which is proportional to the current.

Hope it works for you, I'm studying mechanical engineering so don't take my electronics knowledge for gospel.