Hello Leo,
Apologies, I've attached them here. Simply put, I connected the positive side of the TEM (thermoelectric module) to Vin+ on the INA219 and the negative side to GND. I also connected Vin- to GND. Using the default getcurrent code (shown below), I get readings of 0 for the bus voltage, load voltage and power. The shunt voltage and current readings do register (less than 100 mV and mA) when I put my hand on the TEM (and therefore induce a delta T between the two plates of the TEM), so that tells me it at least works in some fashion. The values don't seem to match the behavior I got I hooked up the TEMs to a multimeter and tested it a while back.
I'm testing this with a Laird HT8-12 TEM and the datasheet is here.
Code:
#include <Wire.h>
#include <Adafruit_INA219.h>
Adafruit_INA219 ina219;
void setup(void)
{
Serial.begin(115200);
while (!Serial) {
// will pause Zero, Leonardo, etc until serial console opens
delay(1);
}
uint32_t currentFrequency;
Serial.println("Hello!");
// Initialize the INA219.
// By default the initialization will use the largest range (32V, 2A). However
// you can call a setCalibration function to change this range (see comments).
ina219.begin();
// To use a slightly lower 32V, 1A range (higher precision on amps):
//ina219.setCalibration_32V_1A();
// Or to use a lower 16V, 400mA range (higher precision on volts and amps):
ina219.setCalibration_16V_400mA();
Serial.println("Measuring voltage and current with INA219 ...");
}
void loop(void)
{
float shuntvoltage = 0;
float busvoltage = 0;
float loadvoltage = 0;
float power_mW = 0;
float current_mA = 0;
shuntvoltage = ina219.getShuntVoltage_mV();
busvoltage = ina219.getBusVoltage_V();
power_mW = ina219.getPower_mW();
loadvoltage = busvoltage + (shuntvoltage / 1000);
current_mA = ina219.getCurrent_mA();
Serial.print("Bus Voltage V: ");
Serial.print(busvoltage);
//Serial.println(" V");
Serial.print("\t");
Serial.print("Shunt Voltage mV: ");
Serial.print(shuntvoltage);
//Serial.println(" mV");
Serial.print("\t");
Serial.print("Power mW: ");
Serial.print(power_mW);
//Serial.println(" mW");
Serial.print("\t");
Serial.print("Load Voltage V: ");
Serial.print(loadvoltage);
//Serial.print(" V");
Serial.print("\t");
Serial.print("Current mA: ");
Serial.print(current_mA);
//Serial.print(" mA");
Serial.print("\t");
Serial.println("");
delay(50);
}
