I'm having a hard time debugging an application that uses a thermocouple amplifier (see here: https://forum.pjrc.com/threads/2610...hermocouple-amplifier-breakout-board-(AD849x)).
When I have the USB cable connected to a PC, my temperature readings are good. When I have no USB cable connected, the readings are far off (between 7° and 50° when I measure my hand's temperature). I suspect a grounding problem, but it could be anything, really. I'm using uGFX to display the output, here is my loop():
I have verified that the label displays the ADC values correctly. Does anyone have an idea what could be wrong here?
Edit: I have no connection between ground and mains earth. Should I?
- The amplifier's output is connected to A9
- The VUSB<->VBAT trace is cut for battery operation, and the Teensy is supplied by an external power supply.
When I have the USB cable connected to a PC, my temperature readings are good. When I have no USB cable connected, the readings are far off (between 7° and 50° when I measure my hand's temperature). I suspect a grounding problem, but it could be anything, really. I'm using uGFX to display the output, here is my loop():
Code:
void loop()
{
static const uint8_t bufSize = 20;
static char buf[bufSize];
static const uint8_t period = 250;
static elapsedMillis timer = period;
if (timer >= period)
{
timer = 0;
snprintf(buf, bufSize, "%d", (int)(analogRead(PIN_THERMO_ADC)));
buf[bufSize-1] = 0;
gwinSetText(ghLabel, buf, TRUE);
}
gfxYield();
}
Edit: I have no connection between ground and mains earth. Should I?
Last edited: