0
\$\begingroup\$

I have a thermocouple PID SSR heater as shown, based on the MAX31855 ( datasheet ). I get spurious readings when the arduino is plugged into my laptop, my laptop is plugged in to its charger, and the SSR is active. schematic v3

I'm getting a lot of spurious readings coming from the chip, which frequently returns error codes indicating a short to ground (SCG Fault), short to V+ (SCV Fault), or both simultaneously (not sure). These errors are quite frequent (up to several readings in a row), depending on read rate (1-10 Hz) and whether the SSR is currently on. SSR on = way more likely to error, see graph below. When temp input is above setpoint, there are very few spikes. I can ignore these errors and get a quasi-accurate reading, but the result is a several degree excursion.

(Temp read °C is in orange , PID (raw) output (+200) is in green, X axis is in seconds. Output of PID algo is clipped to [0,1] so any negative number is pinned to 0. )

spikey graph

Slowing the chip read rate seems to improve the readings, but only slightly, and at the expense of PID responsiveness. This system is very touchy, and a PID misfire of only a second can cause a multi-degree excursion.

I tried modifying the firmware to turn off the SSR (and wait 17 ms to ensure zero-crossing) during the temperature reading, but it does not really seem to help.

UPDATE:

I must note that the above setup is taken on my workstation - arduino microUSB plugged into laptop, which is plugged in to laptop power supply, ethernet, HDMI to second monitor, and keyboard. When I unplug the power brick, no improvement, but when I unplug EVERYTHING from the laptop save for the arduino, the spiking goes away. Ground loop?

Laptop peripherals unplugged @ 550s.

Testing unplugging laptop

UPDATE 2:

I just A/B/A/B tested plugging in the power brick. The spiking readings definitely correlate with the power brick being plugged in. Question is, why? I've updated the image to show the earth connections more explicitly.

enter image description here

UPDATE 3: I measured a 1kΩ resistance between the laptop power brick's negative (Vdd) and earth ground. This is probably the punchline. I suspect line noise is propagating from the SMPS through earth ground or maybe live/neutral, coupling to the TC, and screwing with the MAX chip's readings.

\$\endgroup\$
  • 1
    \$\begingroup\$ Why is the thermocouple connected to the SSR at all? \$\endgroup\$ – immibis Mar 6 '18 at 23:45
  • \$\begingroup\$ Is the arduino ground connected to earth anywhere? \$\endgroup\$ – τεκ Mar 7 '18 at 0:00
  • \$\begingroup\$ @immibilis it's not "connected", apart from a multi-megaohm-ish coupling between the mains heating coil and the sheath, which is unavoidable from the design of the coil. The TC and the heater are sheathed in a common metal element. The arduino is connected to Vdd ground, but I'm not sure if that connects to earth-ground via the power brick. \$\endgroup\$ – DeusXMachina Mar 7 '18 at 0:45
  • \$\begingroup\$ may be related: Grounded thermocouple vs “grounded” thermocouple (he even uses quotes kind of like you) \$\endgroup\$ – Nick Alexeev Mar 7 '18 at 1:30
  • \$\begingroup\$ Yeah, I was reading that, but I am 95% sure the TC is ungrounded (waiting on a reply from the mfgr to know for sure) \$\endgroup\$ – DeusXMachina Mar 7 '18 at 18:00
1
\$\begingroup\$
  • Earth Grounding the Laptop thru VGA or the case can assist in diverting charger noise creating a large common mode noise to shift the PID control signal crosstalk to SSR and to thermocouple signal. Perhaps the PID compensation needs to be adjust to make the system more stable and less sensitive to HF noise ( D gain )

You have not shown all the earth ground connections in your wiring schematic so it is not clear to you why the ground loop is causing signal noise.

  • The SSR , must be a ZCS type.

  • You could add a CM line filter to the SSR output and consider shielding your uV thermocouple signal.

The temperature control system exhibits a 20 second oscillation so it is clear the PID parameters are not optimized, but a secondary issue.

There are 100 or 120 half cycles per second available for switcher heater power, there ought to be plenty of time to anticipate the probe temp and regulate the heater but the PID output is clearly noise during the heating phase of the 20 second cycle when temp is below average. The lack of spurious signals after 550s clearly indicates the SMPS for the laptop charger is contributing to thermocouple noise which is inverted to PID output.

\$\endgroup\$
  • \$\begingroup\$ You're spot on about the lack of optimization of parameters, this is what I ran into when trying to tune everything :) \$\endgroup\$ – DeusXMachina Mar 7 '18 at 18:00
  • 1
    \$\begingroup\$ Start with P only and adjust gain till almost acceptable error. I adds delay but reduces noise and steady state error and prone to oscillation, D adds noise gain ( reduce by earth ground) but is supposed to anticipate arrival, but in your case amplifies commutation of heater switched current dI/dt, Another method is to add feedforward correction, add 90% of steady power used then modulate last 10%, or another way and lead-lag compensation, e.g. add integration using only 10% of the error to the P gain. ( common in PLL filters) \$\endgroup\$ – Sunnyskyguy EE75 Mar 7 '18 at 19:00
  • \$\begingroup\$ It is the Vdd to Earth ground capacitive couple of switcher noise that is modulated by heater transients LdI/dt that interferes, I think. So a line filter on heater and C coupling of earth ground to laptop is an alternative to make high impedance for line f but low Z for switcher noise. Is it a ZCS SSR? \$\endgroup\$ – Sunnyskyguy EE75 Mar 7 '18 at 19:06
  • 1
    \$\begingroup\$ let me know what compensation or error correction improvements you need. Noise glitches can also be ignored in software if dT/dt is > probe/heater thermal time constant but your D gain is too high or ignore readings after output switch. \$\endgroup\$ – Sunnyskyguy EE75 Mar 7 '18 at 19:45
  • 1
    \$\begingroup\$ A better way is also ie. make sampling T rate sub harmonic to line f but out of phase from zero crossing inductive glitch. e.g. trigger from line and delay at desired rate f, f/2 or whatever \$\endgroup\$ – Sunnyskyguy EE75 Mar 7 '18 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.