topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

allenb
12/01/2022 11:20 AM
temkhabana Welcome

renatoa
12/01/2022 3:54 AM
coffee drink, 2old2kare

allenb
11/30/2022 4:54 PM
jeco8843 Welcome

renatoa
11/30/2022 6:27 AM
Mountainman, welcome cup

renatoa
11/28/2022 2:46 AM
Welcome, @Microfiche

In Memory Of Ginny
Donations

Latest Donations
dmccallum - 10.00
JackH - 25.00
snwcmpr - 10.00
Anonymous - 2.00
Anonymous - 5.00
Users Online
Guests Online: 12

Members Online: 0

Total Members: 7,724
Newest Member: temkhabana

View Thread

Who is here? 2 guest(s)
 Print Thread
TC4 - Coding and tech issues
renatoa
Probably this is the purpose of CONFIG_PAC3, where zero cross detector (ZCD) is connected to I/O3... check user.h
 
greencardigan
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

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
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
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:
  1. Set up a #define AGITATOR in user.h
  2. Created a variable to store the current agitator speed (I am planning to use an L298 speed controller)
  3. Added some code to AWRITE inside #ifdef blocks that knows what pin I'm using for the agitator (this is not a great solution!), so it can update the display
  4. Added display code to put the agitator speed on the LCD.

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
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
That seems like a good approach. Did your implementation provide an LCD display component for the new element as well?
 
renatoa
Nope, not requested.
Sure can be done in the bottom right corner, where is some unused space.
 
timbarnes
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:
  1. Is it useful for me to share this code, and if so, how?
  2. Is there a way in Artisan to add an additional communications parameter without modifying Artisan's source code?
  3. Does this represent an interesting use case worthy of proper integration, or should it stay a one-off?
 
renatoa
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:


# report Ambient Temperature as extraArduinoT6
try:
   aw.qmc.extraArduinoT6 = float(res[0])
except Exception:
   aw.qmc.extraArduinoT6 = 0


... 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

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
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 Grin ... and send to sleep back the memory check.
 
AgressivStreetLamp
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
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
Or this, that seems to be exactly the same as used in TC4+

https://homeroast...post_72991
 
mg512
Board files for the TC4+ are indeed available, see here: https://github.com/mgerstgrasser/tc4plus-coffee-roaster-shield
 
davsvatos
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
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

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 Grin In my TC4 is so much hard to read connector labels and it never occurred to me to try to reverse it. Of course, now It is good. Thank you!!!
 
jake415
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
Not without code changes.
That are possible without little additional resources consumption.
 
jake415
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
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.
 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Arduino - TC4+ - SSR issues Dataloggers/Controllers/Rate of Rise Meters 16 11/21/2022 2:11 AM
Heating Issues with Nesco Pro Other Roasters 5 04/22/2021 1:51 PM
Repeatability Issues Due to Chaff Combustion During Roasting?? HotTop Roaster 5 01/01/2019 2:14 AM
TC4/Artisan Temp Read Issues Dataloggers/Controllers/Rate of Rise Meters 16 01/04/2018 12:03 AM
Lack of airflow or stale beans (or other issues)? Kaldi roaster troubleshooting. Roasting Coffee 21 03/20/2017 9:04 AM
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion Copyright © 2022 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX
Hosted by skpacman