Who is here? 1 guest(s)
 Print Thread
TC4ESP
Will2

Quote

renatoa wrote: Please detail.
You means profile following using PID ? Yes, it works, with TC4 PID, not used Artisan PID.


It doesn't work for me.
After the pid;on command, the htr;up command sequence runs inside TC4ESP every 20 seconds, in which case it does not respond to the pid; sv; xxx commands from ARTISAN. It looks like automatic PID tuning is triggered. I have not yet identified the reason for this behavior.

Or is there any other way to start ARTISAN mode?

up.picr.de/42442246ye.jpg

up.picr.de/42442273qg.jpg

Quote

renatoa wrote: What you mean ? Using board embedded profiles?.


No, I don't think so.
I am thinking, for example, of preheating and that, and in what way it is possible to cancel it. I can't imagine button-operated roasting because they don't work the way you describe them.
Edited by Will2 on 11/16/2021 12:34 PM
Viliam
 
renatoa
Who sends pid;on command ?
Its purpose is to resume an embedded (board) profile following, that was been suspended by a pid;off command.
You can't start a roast using pid;on command alone, because counter is not reset to zero. So random values pick from the profile arrays.
If no embedded profile is selected, pid;on command has no effect.
PID On/off buttons of Artisan and TC4 PID;on/off commands are different things.

Please, describe your usage scenario,
 
Will2
It already works, Renato.
I think the problem is already solved.
ARTISAN: some data on the Modbus ports configuration tab must not be filled in, even if there is another port.
Specify 17.11.2021: In the PID window the Slave cell must not be filled as the value 1

Therefore, channels 78 did not work. ie SV, ie PID;SV;xxx.

Quote

renatoa wrote:

...
You can't start a roast using pid;on command alone, because counter is not reset to zero.
...


This is not my case, i always have it set event serial command reset at the charge.
Edited by Will2 on 11/17/2021 1:11 AM
Viliam
 
renatoa
Using board PID and board embedded profile ?

I don't mean following a background profile on the Artisan screen, but a profile stored in TC4 board memory.
 
Will2

Quote

renatoa wrote:

Using board PID and board embedded profile ?

...


He hasn't tried this yet. At first I fixed what didn't work.
Now I will try to start roasting from a profile stored in TC4ESP.
In addition, I'm not sure if the buttons work properly. Or it's not entirely clear to me how the buttons should work.

In which part of memory is the profile stored?
For TC4, it was remembered on the TC4 board, not in Arduino.
For TC4ESP, will it be in a different part of the memory than the recorded sketch?
The profile will remain stored in eeprom even if a new sketch is uploaded?
Viliam
 
renatoa
The profiles are stored in the 4M EEPROM, on the ESP board.
4096 bytes of this memory is available to the user via programming language.
A profile is 400 bytes, thus maximum 9 to store in this memory.
They aren't lost when program changes, IF... your Tools/Erase Flash option from Arduino is set to "Sketch Only" (default).

A default profile, index 1, is created at memory initialization, you can find the definition of this profile here:
https://github.co...Data.h#L76

To create other profile, you change the following below:


int16_t number = 1;
char name[40] = "Default profile \0";
char description[80] = "Automatically created when no profiles\0";
...
int16_t temp[50] = { 25,  78, 107, 130, 150, 166, 179, 190, 199, 206, 212, 218,   0 }; // average profile, 5:4:3



- number, to any 1...9 value,
- name, to your desired profile name, only first 20 chars will be shown on LCD
- description, to your desired profile desc, only first 40 chars will be shown on LCD
- temp, the temperatures array that describe the profile. If you want more points, then you need to change also the time array accordingly.

... and finally... reflash the sketch with the new profile block definition.

You can extract a profile data from an Artisan .alog roast file by looking for timex and time2 value lists, en excerpt is shown below:


'timex': [0.0499, 2.00732, 4.00739, 6.00743, 8.00754, 10.00763, 12.00863, 14.00871, 16.00874, 18.00891, 20.00899, ...
...
 'temp2': [24.0, 24.9, 27.3, 30.7, 34.7, 38.5, 41.9, 44.8, 47.4, 49.7, 51.8, 53.8, 55.7, 57.4, 59.0, 60.4, 61.8, 63.0, 64.1, 65.1, ...


...extract them into an excel sheet, and decimate to the desired time precision, but maximum 50 values for the entire roast !
This equates to 4 values per minute, every 15 seconds, for a 12 minutes roast. 4*12=48 points, plus an ambient temperature zero time starting point, and a final trailing point with zero values for both time and temp, that mark end of profile.
For longer than 12 minutes roasts, you can try 3 points per minute, thus every 20 seconds, allowing 16 minute roasts, or 2 points per minute, thus every 30 seconds, allowing maximum 24 minute roasts.

If you want to overwrite an existing profile slot, just change the name, even only one char, for example add a space at the end, if you want to preserve the profile, and change the data only.
Edited by renatoa on 11/17/2021 2:49 AM
 
Will2
Before I can work with the profiles stored in eeprom on the tc4ESP board, it must first resolve the button issues.

Quote

renatoa wrote:
...
Will check what is different in the archives above and come back.
....


Quote

Will2 wrote:
...
In addition, I'm not sure if the buttons work properly. Or it's not entirely clear to me how the buttons should work.
...


How important is defining Brad buttons in user.h?
Did I buy the wrong button board? It is connected to 3.3V.

The "UNUSED" button now works as a "MODE " button (for example as a toggle for UP/DOWN buttons target).
The "ENTER" key sometimes works the same as the "UP" key.
Long press the "DOWN" button at the Fan target to turn off the HTR.
(ok, user.h: HTR_CUTOFF_FAN_VAL 20)
Short pressing the "DOWN" key does not decrease the values.
And the tact in all sorts of ways is impossible to describe.

Most likely I'm using the wrong combination of .ino file and libraries.

up.picr.de/42453452uu.jpg
Edited by Will2 on 11/17/2021 9:11 AM
Viliam
 
renatoa
If the buttons board looks like in the project doc, and board orientation is "portrait" as in photography, i.e. the four buttons cross up, and the "unused" button down, then it should behave ok. 3.3V is ok.
If owning a multimeter, you can check the board output voltages, according to:
https://github.co...n.cpp#L215

MODE/SETUP is same button, multiple roles/meanings. Could be also CANCEL in some scenarios.
Same for ENTER, it has also SELECT meaning.
 
Will2
Thank you Renato, I'm glad an explanation was found.

This means that the same boards with different resistance ladders are sold.

voltage values should be:
0 = UP, 0.45V = Enter, 1V = Settings, 1.6V = DOWN

my resistance ladder generates voltage values:
0 = UP, 0.10V = Enter, 0.28V = Settings, 0.53V = DOWN, 1.10v Unused, 3.0V Unpressed

up.picr.de/42459076cz.jpg

Surely the best way would be to have the resistance values of a ladder that works measured. Will it be possible?
Viliam
 
renatoa
Great find !
The values are (somewhat) public... because they are copied by chinese from the Adafruit LCD/buttons shield, whose schematic is attached.

The only difference you should be aware is that my code is for board above rotated 90 degrees clockwise.
So the buttons from the schematic and picture above have other meanings:
LEFT - is UP for me
UP - is ENTER/SELECT
DOWN - is MODE/SETUP
RIGHT - is DOWN

rightmost SW5 - SELECT in the schematic - is the unused button
renatoa attached the following image:
adafruit_lcd_buttons_shield.jpeg
 
Will2
Renato You were faster,
I just measured the resistances on my board and drew a diagram.
3k3, 1k, 1020, 330, they agree.
instead of 2k i have 10k, so just replace 1 resistor and it will work.
Viliam
 
renatoa
Yes, this was my guess too, your values are ok as proportions, just scaled down due to that wrong pull-up resistor.
One change fix all !

Meanwhile, thinking more about this orientation confusion, did some quick additions to the buttons library, and now it can be used in both landscape and portrait mode !
Not posted yet, to not amplify the versions mess, if you want I can post here for you to test.
 
Will2

Quote

renatoa wrote:
... if you want I can post here for you to test.


I'd rather use the landscape button mode, you can post here, or send me an e-mail.

Yesterday I added another pull-up resistor 2k5, so together it's 2k,
the buttons now work normally.
Today I bought a SMD 0805 2k, so I will exchange a 10k resistor for 2k.
Viliam
 
renatoa
Attached...
You just have to un-comment the
// #define LANDSCAPE
at line 196 in adcButton.cpp
...
renatoa attached the following file:
adcbutton.zip [5.5kB / 318 Downloads]
 
Will2

Quote

renatoa wrote:
... because they are copied by chinese from the Adafruit ...


But the Chinese probably don't care if he puts 2001 or 1002 there:

up.picr.de/42472516mg.jpg
Viliam
 
renatoa
Lol Grin
 
CamMor89
Hi Renatoa. Is it possible to use max31865 (pt100 tc)? I can't seem to find any AD8495, and I already have 3x max31865 laying around (from when I tried to make a esp32 controller).
 
renatoa
Yes, I am aware about the issue, until April they seems gone, unobtainium at any price...
You have the choice to disable their usage though, and use the MCP3424 ADC standalone, as in the classic TC4.

The changes required are the following:
- first disable TC amp usage here:
https://github.co...cADC.h#L64
- then choose your TC type here, K or whatever:
https://github.co...uple.h#L58
... and don't forget to disable Pt sensor usage
- and finally, update the thermocouple variables here:
https://github.co...user.h#L68
and here...
https://github.co...D.ino#L302

Regarding using max31865 or MAX31856, that was been previously discussed here in this thread, there is a hardware limitation: not enough pins.
They both are using SPI, whose pins are already busy with I2C of LCD display, so is a matter of ... or-or, exclusive, display or SPI sensor(s)
If you agree using the setup without UI, then I can add the MAX chips library somewhere after holidays.

There is a third choice though... using TL amp board for Pt sensors, with analog output and the current ADC. This is a new feature added to TC4ESP, announced some months ago, in the first page of the thread.
Not sure if you are familiar with these amp boards, they are widely used in 3d printing, this model:
https://www.go-3d...d-printer/
 
trisse
Is this project still alive? Thinking order the components for modding my Ali fluidbed roaster
 
renatoa
Yes and no smile
The github version is a good start and it's working
But my working copy evolved so much... that became unstable. I have some stable intermediate copies though...
I can assist you with all you need anyway.

Also, an accident, last year, due to powering with 5V instead 3.3V destroyed all my modules stock, and also a lot of confidence in mine... :( so frozen it in an unknown state.
Roasting full manual since then, with a variator and Mastech meter.

Also, as a sidenote, consider that the last versions were redesigned to use the full range of MAX chips, instead the patriarch MC3424 ADC that define the TC4 architecture.
This paradigm change allows you to use even Pt sensors instead TC, a feature that many considered unrivaled, atm when I did it.
 
trisse

Quote

renatoa wrote:

Yes and no smile
The github version is a good start and it's working
But my working copy evolved so much... that became unstable. I have some stable intermediate copies though...
I can assist you with all you need anyway.

Also, an accident, last year, due to powering with 5V instead 3.3V destroyed all my modules stock, and also a lot of confidence in mine... :( so frozen it in an unknown state.
Roasting full manual since then, with a variator and Mastech meter.

Also, as a sidenote, consider that the last versions were redesigned to use the full range of MAX chips, instead the patriarch MC3424 ADC that define the TC4 architecture.
This paradigm change allows you to use even Pt sensors instead TC, a feature that many considered unrivaled, atm when I did it.


Sounds Good. Found most of the components on ali so will make a order there. Tho i got some stuff over from a Gaggiuno Lego build. You said it will work with most MAX chips now, does that include MAX6675?

This should be enough to get me started right?

Already got a Fotek SSR 40A, also got a robotdyn 4A-400V dimmer that i dont use but it will not take my heater
trisse attached the following image:
screenshot_2024-06-02_165101.png

Edited by trisse on 06/02/2024 10:55 AM
 
renatoa
Yes, it does include MAX6675, but provided just as the little brother of the family, i.e. the cheapest solution, without having expectations about the precision.

If you go on MAX path, any MAX, then the list above changes a lot... the last two positions removed, and two MAX boards added, with the schematic changed accordingly.
Contact me via PM for this case, to sketch together the new schematic and provide new code.
 
trisse
Hmm ok so the precision would be lower with the MAX boards then your BOM alternative? What would you recommend? Maybe some other MAX board?

Type k thermocouple would be enough, at least to start with as I have a lot of those laying around. Maybe go down the pt100 path later
 
renatoa
MAX6675/31855 have 0.25C resolution, which is not enough to accurately reproduce an average 10C/minute RoR slope, which equates to 0.167C per second rate of change.

All the others solutions are in other league, with resolutions in a hundredth of C degree range.
MAX31856 for example has 0.0078125°C resolution, obviously much more that is needed in many industries... but they made it... because they can Grin

Original TC4, and my variation using TC amps, are both close to MAX31856.
 
trisse

Quote

renatoa wrote:

MAX6675/31855 have 0.25C resolution, which is not enough to accurately reproduce an average 10C/minute RoR slope, which equates to 0.167C per second rate of change.

All the others solutions are in other league, with resolutions in a hundredth of C degree range.
MAX31856 for example has 0.0078125°C resolution, obviously much more that is needed in many industries... but they made it... because they can Grin

Original TC4, and my variation using TC amps, are both close to MAX31856.


Thx, ordered according to your BOM. Now for the waiting...
 
Jump to Forum: