Who is here? 1 guest(s)
 Print Thread
Unable to get Artisan Scope's PID to control heating
So now I have an ESP32 board with MAX6675s emulating a TC4 and doing the temperature monitoring but heater control is via an analog pot to an Arduino with a ZCD connected and then to a SSR. Works fine on manual mode and been using this for many months now.

After some important upgrades to the machine, I thought it was time to try PID controlling the heater but no matter what settings I use, I don't see any signals going to the SSR.

Settings - TC4, firmware PID unchecked, TC1 for ET, TC2 for BT although I have a TC3 to monitor the lower section of the heating chamber too, Control checked, Extra services of Arduino 3/4 and 5/6 added

Control - Mode background (background profile loaded) , Source BT (it keeps resetting to ET sometimes), Target (Burner, I don't see heater as a choice), P on error, PID on charge checked, Slider checked to allow me to see what the software is going for duty.

At Start with Control in red, the slider is at max but no signals are going out to the SSR whereas regardless of mode, even in background mode, if I turn the analog pot, then I'll get a signal to the SSR.

Is there something I've missed out?
I've found out why but decided to leave my post here just in case others are in similar situations.

While you can have two devices as in my case, you cannot have PID control of the heater or fan if the Port is set to the microcontroller that's reading temperature.

I switched the port to the Arduino's and now I can see heater duty percentages.

However, I still had no PID control of the heater because now I don't have temperature readings going to Artisan. Guess I'll have to try taking a look at whether the short TC4 emulator code can be inserted into the aArtisan sketch and the MAX6675s go to the Arduino instead of ESP32 if I want PID control.

aArtisan covers a lot of devices so there's quite a bit of redundant code which can be removed. Good luck to me because I'm no coder. 😂
Already did this, tested on ESP platform only, not on Uno.
Get attached archive, and unpack it in the libraries folder.
The path should read: ...\Arduino\libraries\maxADC

Include maxADC files in the project, open maxADC.h and un-comment the line #59

// #define using_MAX6675

... then define Uno pins for SPI, starting with line #102

#else // Uno
#if defined using_MAX6675
#define max_MISO  ...  // Uno SPI pins

... then switch to TC4 code and include #include <maxADC.h> instead #include <cADC.h>

... then change adc definition
maxADC adc(0); // MAX chip
cADC adc(A_ADC); // MCP3424

... then compile, give it a try... and cry :o
renatoa attached the following file:
maxadc.zip [5.53kB / 124 Downloads]

Edited by renatoa on 07/31/2023 6:23 AM
The crying has started because the aArtisan sketch still has references to tc1-4 and tcp.
Jump to Forum: