Skywalker, the AL... | [263] |
War on Farmers by... | [53] |
Green coffee reviews | [10] |
Help and recommen... | [10] |
TC4 - Coding and tech issues
|
|
renatoa |
Posted on 11/09/2021 1:08 PM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Probably this is the purpose of CONFIG_PAC3, where zero cross detector (ZCD) is connected to I/O3... check user.h |
|
|
greencardigan |
Posted on 11/09/2021 4:59 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1185 Joined: November 21, 2010 |
Thanks Tim. What is the normal way to connect a parallel LCD to the TC4/Arduino? If it has to be wiring the individual pins then I don't see any issue changing from pin 2 to 5 for LCD RS. In the other thread you suggested that surgery would be required. Could you explain what you meant by that? Aren't all the Arduino pins available on the pass through headers on the TC4 boards? Quote I was able to fix cause #2 by changing the line "#define RS 2" to "#define RS 5" in aArtisanQ_PID.ino, and re-routing the RS wire. If the display is connected to the Arduino via the TC4, this will require surgery |
|
|
timbarnes |
Posted on 11/09/2021 5:36 PM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
Quote greencardigan wrote: [quote]In the other thread you suggested that surgery would be required. Could you explain what you meant by that? Aren't all the Arduino pins available on the pass through headers on the TC4 boards? I probably spoke in error. I was thinking that the parallel connections to the TC4 came to a specific header on the board, but it seems they do not, and everyone is direct-wiring if they are using a parallel LCD display. If this is the case, then as you say, no hardware surgery is required, and it would be enough to make the change to use pin 5 for RS in the code. Thanks for the quick reply. I'm a couple of days into using aArduinoQ_PID, and my TC4+ has not yet arrived, so I've been simulating the system by measuring voltages on pins directly off the Arduino. |
|
|
greencardigan |
Posted on 11/09/2021 8:08 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1185 Joined: November 21, 2010 |
No probs. I don't think the TC4+ has a port specifically for a parallel LCD either. When I get around to it I'll add this change. There's a few other small changes I need to make too. |
|
|
timbarnes |
Posted on 11/10/2021 12:32 AM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
Sounds good. I have a feature request / suggestion: I have built a roaster that uses a separate motor for agitation of the beans (it's a flour sifter, but I think bread machine and KKTO roasters also have a stirring mechanism separate from air and heat). It would be great to provide support for this. Regarding the second option, I have made it work in a kludgy way by doing the following:
Do you think this is a sufficiently common use case to warrant a more robust solution? Thanks for all your work on this, It's been really easy to ramp up so far. |
|
|
renatoa |
Posted on 11/10/2021 1:52 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
If this helps, I did for other fellow, member here, something similar, an additional PWM output feature, labelled IO4, whose purpose is to drive the drum motor, he needs to experiment with various speeds. The whole set of IO3 commands was been duplicated for this IO4 feature. Also added the third analog control, for an additional pot. |
|
|
timbarnes |
Posted on 11/10/2021 3:46 PM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
That seems like a good approach. Did your implementation provide an LCD display component for the new element as well? |
|
|
renatoa |
Posted on 11/11/2021 1:42 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Nope, not requested. Sure can be done in the bottom right corner, where is some unused space. |
|
|
timbarnes |
Posted on 11/20/2021 8:13 PM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
I have implemented a third control in aArtisanQ_PID to support a third potentiometer, an additional display item, and a new IO4 command. This allows me to control my agitator / rotator using D06 PWM. The solution does feel a bit kludgy, because I basically replicated all the IO3 command code, and replicated some potentiometer code as well. The result is an almost full Uno, but it seems to work fine. It appears to me that Artisan doesn't have the capability right now to receive an additional parameter back from the Arduino. The last value in the logger() output seems to be ignored, and replaced by the ambient temperature. The result is that I don't get an LCD display for my rotation speed, and I also don't get an update in Artisan if I vary the rotation speed using my potentiometer. The first of these is minor, but the second is not ideal, because it's very convenient to make adjustments via a physical interface. More information about this in "My First Roaster" here: https://homeroast...post_74522 So I have a few questions:
|
|
|
renatoa |
Posted on 11/21/2021 1:33 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Artisan did not ignore anything, because logger does not send the 8th parameter, there are only 7 in the packet. Check here, in TC4 source: https://github.co...D.ino#L441 Above this line is the 7th parameter, the Setpoint Value, placed if PID mode only, else just a comma placeholder. Then, the next line, just conclude the packet without the 8th parameter. Unfortunately, because this missing parameter, the Artisan author decision was to display AT instead, without any check if the parameter is really missing or re-appear in a future release of TC4. This is the Artisan code where this happens: Code Download source # report Ambient Temperature as extraArduinoT6 ... res[0] being the first parameter in the packet. So, the immediate solution would be to replace AT, quite useless for Artisan, with your speed value. AT is inducted into the packet here: https://github.co...D.ino#L413 The alternative would be to write to Artisan author, member here and very responsive, to add a check for the 8th parameter, and use AT instead only if param 8 is really missing. If he agree to implement this, you can add the 8th value to the package, in TC4 sketch. Regarding the other questions... the problem is that how is now TC4 is at the memory limits, so every addition should be carefully planned. Your requirement is not a bare necessity for many people, so I would place all this IO4 code inside #ifdef blocks, to avoid compile it and save memory, if unused. Edited by renatoa on 11/22/2021 11:36 AM |
|
|
timbarnes |
Posted on 11/22/2021 11:19 AM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
Quote renatoa wrote: Artisan did not ignore anything, because logger does not send the 8th parameter, there are only 7 in the packet. Thanks - I did add the code to write the 8th value, on the basis (incorrectly as it turned out) that Artisan specifies a 78 data line for Arduino. Quote So, the immediate solution would be to replace AT, quite useless for Artisan, with your speed value. This I did, and it works fine. Quote Regarding the other questions... the problem is that how is now TC4 is at the memory limits, so every addition should be carefully planned. Your requirement is not a bare necessity for many people, so I would place all this IO4 code inside #ifdef blocks, to avoid compile it and save memory, if unused. This I also have done. It seems to work well. |
|
|
renatoa |
Posted on 11/22/2021 11:34 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Regarding working well, there is a disabled MEMORY_CHK define, that activates a MemoryFree feature. Display this figure in the empty space above ROT, and have an eye on this value for some couple of roasts. If no memory leaks during a roast, then you can breathe ![]() |
|
|
AgressivStreetLamp |
Posted on 11/29/2021 3:22 PM
|
![]() Newbie ![]() Posts: 19 Joined: November 16, 2021 |
I understand this is mostly a software thread, however Are the TC4+ .brd files available anywhere? I'd like to source my own boards/components to build it myself. The github contains files for tc4 4.0 but I want the DC fan controller. |
|
|
timbarnes |
Posted on 11/30/2021 12:27 AM
|
![]() Newbie ![]() Posts: 38 Joined: October 25, 2021 |
I don't know the answer to your question regarding the boards, but I used a jellybean L298 board for motor control in my roaster, driven from a PWM pin on the Arduino. I am in fact using a TC4+, but I needed a second motor control, and the L298 does really well. The standard boards (e.g. the one linked below) support two motors. You could easily use one side for a fan and the other for chaff extraction, for example. https://www.amazo...B08V4YNSYK |
|
|
renatoa |
Posted on 11/30/2021 2:09 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Or this, that seems to be exactly the same as used in TC4+ https://homeroast...post_72991 |
|
|
mg512 |
Posted on 11/30/2021 11:13 AM
|
![]() 1/4 Pounder ![]() Posts: 189 Joined: March 04, 2018 |
Board files for the TC4+ are indeed available, see here: https://github.com/mgerstgrasser/tc4plus-coffee-roaster-shield |
|
|
davsvatos |
Posted on 04/21/2022 10:50 AM
|
![]() Newbie ![]() Posts: 9 Joined: April 21, 2022 |
Hi, I have a problem. Can you help me please? I built coffee roaster with Arduino TC4 and Artisan and everething is great. But If I turn on the heater, the temperature grow up but the thermometer shows some wrong values - but room temperature about 23 °C it shows good. Like you can see on photo - there is comparison with multimeter. Where can be problem? In Arduino is set Celsius and thermocouple type K - I have these thermocouples: https://dratek.cz...zavit.html Thank you very much! foto: https://drive.goo...sp=sharing Edited by renatoa on 04/21/2022 11:06 AM |
|
|
renatoa |
Posted on 04/21/2022 11:10 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
TC4 is using different sensors and circuitry for ambient temp and the probes, so room temperature ok is not so relevant for diagnose. google drive link asks for access permission, please can you make that folder public? A guess without looking at any picture: is the thermocouple connections polarity the right one ? |
|
|
davsvatos |
Posted on 04/21/2022 1:22 PM
|
![]() Newbie ![]() Posts: 9 Joined: April 21, 2022 |
Quote renatoa wrote: TC4 is using different sensors and circuitry for ambient temp and the probes, so room temperature ok is not so relevant for diagnose. google drive link asks for access permission, please can you make that folder public? A guess without looking at any picture: is the thermocouple connections polarity the right one ? Oooh... I am stupid ![]() |
|
|
jake415 |
Posted on 05/02/2022 6:51 PM
|
![]() Newbie ![]() Posts: 26 Joined: January 18, 2022 |
Hi, There doesn't seem to be a user option for slow PWM for the heating element and PAC for an AC fan. Is there an easy way to do this? |
|
|
renatoa |
Posted on 05/03/2022 1:53 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Not without code changes. That are possible without little additional resources consumption. |
|
|
jake415 |
Posted on 05/03/2022 5:28 AM
|
![]() Newbie ![]() Posts: 26 Joined: January 18, 2022 |
Could you tell me what code changes are required, and if they are straightforward, or more complicated? If they are simple maybe I could implement them. If not, maybe I'll just implement the Config_PAC2 which is given. I have a zero cross SSR which I am hoping to use to control the heating element, might have to get my hands on a random fire SSR if the code is not easy to change. |
|
|
renatoa |
Posted on 05/03/2022 7:36 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Not something to be sketched here in some lines... CONFIG_PAC2 is using ICC for heater, not PAC. ICC could be compatible with a ZC SSR, worth a try, depends how is the ZC implemented inside SSR, could not collide with the the other ZC detection, used by Arduino for PAC control. Nothing will broke if testing, use a bulb instead heater and see if the light follows proportionally your control. The alternatives are flickering, of completely On/OFF, but no electronic damages risk. |
|
|
greencardigan |
Posted on 03/27/2023 6:02 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1185 Joined: November 21, 2010 |
As discussed here I am adding the MIN_IO3 and MAX_IO3 checks into the IO3;xxx command as suggested. Renatoa, you suggested using the line from the IO3_DOWN command Code Download source if( levelIO3 < MIN_IO3 & levelIO3 != 0 ) levelIO3 = 0; // turn IO3 off if trying to go below minimum. But I'm thinking it should match the checks used in the OT1;xxx and OT2;xxx commands instead. See below in bold. This means that IO3 can only be set to 0 if it is explicitly set to 0 using the IO3;0 command. Otherwise it will limit it to IO3_MIN. Code Download source
Thoughts? |
|
|
renatoa |
Posted on 03/28/2023 3:22 AM
|
![]() Administrator ![]() Posts: 3131 Joined: September 30, 2016 |
Strictly for the initial purpose in the thread linked by you, where the issue was exposed... freezing to MIN_IO3 when levelIO3 < MIN_IO3 but not zero, will not help our fellow slider request. He needs fan cutoff when the slider is moved one position bellow MIN_IO3, only one step. If for his case MIN_IO3 is set to 50 and moving slider to 49 will keep fan at 50 is not what he wants. So probably always some people will customize the code to their needs ![]() |
|
Jump to Forum: |