Interference in Kiln control after working without interference for a year

Thread Starter

alforddm

Joined Nov 23, 2020
6
I'm a hobby potter and general tinker. I have built a digital kiln controller using a raspberry pi zero and a max31856 module. The build worked great for a year and then I started getting interference at top temps. Since it's an all day thing to fire that high (1200C) and I it takes me a while to make a kiln load of pots, trouble shooting has been a pain. I have swapped out the pi, the thermocouple, the thermocouple extension wires, the max31856, and the ULN2803A. Basically, all the components except the 12v power supply, the wires/plugs, the relays, and the kiln elements. I even used different kilns (although they all have old elements).

If I disconnect the kiln from the controller and plug it directly into the wall, the interference stops. The pi is powered from a separate 120v outlet from the 240v kiln supply trying to run the pi from a battery does NOT eliminate the interference. Turning off power to the elements for 200ms prior to reading the temperature does eliminate the interference. I have tried changing the relays from normally open to normally closed with no effect (I wanted to eliminate the relay coils). Towards the end of the firing were the interference is occurring, the relays are no longer triggering (unless I manually program a stop to read temps) and are always on.

I have ordered an opto-isolator and will be adding it to the circuit but I'd really like to figure out why this is happening before I modify things.

I've included an wiring diagram and two firing graphs. The bottom graph shows the erroneous drop in temps I'm consistently getting (with 3 different kilns). The sharp drop and then spike, was when I unplugged the kiln from the controller and plugged it directly into the wall. The spike was close to the correct temp. The drop after that was when the kiln sitter triggered which ended the firing.

The top graph shows a hold with spikes in temps depending on wether the relay and elements were on or off when the temperature reading was taken. Towards the end of this firing, I unplugged the pi from the wall and plugged it into a battery backup. The kiln daemon automatically resumes in case of a power flicker but as soon as the power was restored, I got one good reading and then the temps started dropping again. I then added code to turn off the power 200ms before a temp reading and that worked although my elements are weak enough that that pause every 10 seconds makes it hard to reach temps.

Thoughts on where this interference is being generated? Thanks for the help.

EDIT: I forgot to add that the thermocouple extension wire is shielded.
 

Attachments

michael8

Joined Jan 11, 2015
410
Interference? What is really happening? I have no idea what "interference" means, I'd suspect it's something you don't want to happen but have no idea what you are seeing happen or not happen...
 

Thread Starter

alforddm

Joined Nov 23, 2020
6
It's shown in the second graph and I tried to explains things. My explanations do tend to ramble so I may not have been clear.

At about 1150C the thermocouple readings show dropping temps rather than correcly rising temps.
 

Deleted member 115935

Joined Dec 31, 1969
0
so its either your sensor that is reading wrong, or the heater that's wrong.

BTW. Have you wired it with that bread board as per your diagram, Those things are really not qualified for mains voltage.
they also have a terrible contact, that will tarnish , they are only meant for temporary usage.

can you measure with a DVM the voltage across your sensor ?
As its a new problem, wondering if its broken only shows up when its hot
 

Thread Starter

alforddm

Joined Nov 23, 2020
6
I've tried two different max38156 sensors, both read correct when no voltage is applied to the relays. They even read correct if the elements are energized just connected directly to the wall plug rather than the controller.

I'm using a solderable breadboard rather than the one shown. The mains voltage is only across the relay terminals. The coil voltage is 12vdc which is provided by the powersupply.

I'm fixing to go take a really good look at my relays. I'm wondering if my contacts are degraded just enough to cause some harmonics? Don't even know for sure if that is possible but the relays do seem to be the common denominator.

I forgot to add that the relays are JQX-60F 1Z 60A mechanical relays. They should be vastly over rated for my 27amp kiln but I bought buy them from aliexpress so I really don't know the quality.
 

Thread Starter

alforddm

Joined Nov 23, 2020
6
Do you have snubbers connected across the relay contacts?
Are there freewheel diodes across the relay coils?
Neither (I do plan to add some after I figure this out), however, I'm getting the interference when the relays are always on and not actively triggering. I've even tried changing the configuration from NO to NC.

If you look at the second graph you can see the drop in temps when the PID is at max. This was before I added the 200ms turn off before reading temps.
 

Thread Starter

alforddm

Joined Nov 23, 2020
6
After replacing the relays, putting in an optocoupler, and moving all the control circuit out of the relay box, I was able to eliminate the interference.

I made all these changes at once so I'm not sure which actually solved the high temp readings problem, which kinda bugs me but not bad enough that I want to put the old relays back in to see if it makes a difference. I will be moving all the control circuit back into the box as I need to be able to move things around. (My best guess is that it was the octocoupler that fixed it anyway.)

The question remains as to how the interference was being generated. Like I've said, the relays are always on at this point in the firing not triggering and it's obviously not coming through the thermocouple extension wring or it would still be present.
It also worked for a year before the interference showed up....Sooo?
 
Do you have a proper earth-ground to the kiln chassis and the RPi power supply secondary side?
The Maxim thermocouple IC's are not great in practice. The IC (actually the entire product line) is vulnerable to (common-mode) RF interference especially from cellphones and AC mains. Your Adafruit board does include the RF filter caps and I add ferrite beads or clamps on the thermocouple wiring until I get a stable temp reading with a transmitting cellphone nearby - but these do nothing for common-mode interference if the RPi is not grounded. The thermocouple must be floating, no shorts to anything such as the rack.
Half decent software will check the MAX31856 fault flags... and crapola software will ignore them. I would check what the software does with an (intermittent) open or shorted to GND thermocouple.

Usually, failure only at high process temperatures is caused by the thermocouple intermittently failing open-circuit, or shorting to (GND) in the thermowell if there is one. The thermocouple and wiring being bumped or moved, may have been the actual fix or just getting the TC board away from AC mains wiring noise.
 

Thread Starter

alforddm

Joined Nov 23, 2020
6
As far as the grounding is concerned, nothing has changed in the building ground system in the year it's been in use. I've tried it with 3 different kilns which all showed the same interference so while I can't entirely rule it out, I don't' think that's the issue.

The max31856 is not reporting any errors at the time the temps is dropping. It's just reading wrong. I ran a second program along side the firing daemon to check for those.

Grounding first one end and then the other of the thermocouple extension wire metal shielding had no effect and it seems if it was RF from the kiln coils it would still be present as it would be generated in the thermocouple extension wires themselves and they have not changed position.

So that leaves me with either the mains voltage, the mechanical relays, or something with my wiring in the box. I've triple checked my connections and grounds and the thing I keep comming back to is why now and not a year ago? That would seem to indicate component wear of some sort.

If when I put everything back in the box it comes back, I guess I'll know it was the mains.
 
I hear you keep asking two questions: why did this work for a year, and what is going wrong. Same on the Adafruit forums.

A look at the hardware, and I see lots of interference issues but no pictures so it's just guessing.
You must have the RPi DC power earth-grounded, no ifs ands or buts!

For the software, understand that Adafruit libraries are unicorns and rainbows - there is no range checking, error checking or retries, and other aspects of decent embedded software to make it robust, reliable. Their MAX31856 python library assumes everything is perfect so a single bit error gets things stuck and require you to reboot. How you handle the eight fault flags, SPI comm errors outside the driver are also important. Relay contact arcing does cause bit errors.
 
Top