Not a member yet?
Click here to register.

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

04/14/2024 5:56 AM
morning, papajim !

04/11/2024 6:33 PM
Zemona Welcome

04/11/2024 9:19 AM
Mrbones and sgupta, coffee drink ?

04/10/2024 1:09 AM
welcome cup, Ed K

04/09/2024 5:34 PM
TheJak99 Welcome

In Memory Of Ginny

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

Members Online: 0

Total Members: 8,202
Newest Member: papajim

View Thread

Who is here? 1 guest(s)
 Print Thread
TC4 with aArtisanQ_PID
Good to hear that you got it sorted. I power my Arduino/TC4 from a separate 9v DC power supply. That helped a few issues I was having.

Also try putting a piece of wire across the terminals of each unused thermocouple input.
THanks for the suggestions.

The root cause of the noise is my apartment (rented). The electricity connections are not grounded. I wired the ground coming from the laptop to a metal near the electricity connection and the noise was gone.

Then I connected the DC motor for the drum and the noise started again (+/- 1 degree C) I grounded the roaster and the noise was almost cancelled.


Im trying to control an AC fan with aArstisan_PID. Just the FAN I have no heater in my roaster. I have a Randon Fire SSR connected to OT2 and the ZCD connected to IO3.

When trying to comment out either the Analog comments for the Potentiometers or the OT1 outputs the skecth is no compiling.

However if I upload the default sketch without comment out anything Im able to send commands to OT1 through the serial port but the fan is not working.

How should I configure the sketch for controling just the FAN?

I would leave all the OT1 code as is. It should work fine even with nothing connected to OT1.

If you want to disable the potentiometer inputs, just comment out the two #define ANALOGUE lines like this.

//#define ANALOGUE1 // if POT connected on ANLG1
//#define ANALOGUE2 // if POT connected on ANLG2

There shouldn't be any reason for it not to compile with this change. Let me know if it still doesn't compile.

Thanks I manage to compile your code with the POT comented out. I was using an older version. The latest version is working fine.
woo hoo first post!
Thank you for any help in advance
I'm using this code on a Arduino mega 2560. not the tc4 board. When I use the Profile_Loader code it loads in to the Arduino ok. But when I run the serial monitor I get back bad text. Like this for the default profile 1

-----------------------------------------// response from arduino-----------------------------------
?}????}O??0???m??????????t???ru?=???Description of Profile 1
28777 26996 28271 28448 8294 29264 26223 27753 8293 49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25344 30063 29806 15648 32 29808 8306 8253 28160 15648 32 8299 8253
11264 25088 29817 8293 8253 21248 21076 27680 28261 29799 8296 8253 21504 13379 0 0 11264 -1019 -19196 -16892 11264 -1019 -19196 -16892 -31738 10240 -21496 179 2344 161 0 -14800 12288 705 5632 33 22784 -32148 2048 2679 30472 2058 849 0 34 0 0 0 -7680 -61

-----------------------------------------// end response from Arduino-----------------------------------

I used other code to test the read/write of the eeprom and it worked perfectly.
what did I do wrong? How do I fix it?
A yawn is a silent scream for coffee!
Hi and welcome!

I haven't used the profile loader for some time now so I'll have to refresh my memory by looking at the code again.

Could you attach your profile loader sketch so i can have a look at it?
Looks like wrong baud rate on the serial monitor to me.

KKTO Roaster.
Not sure about that. Some of the data looks like it's coming back ok which wouldn't occur if the baud rate was set wrong?
Sorry, I missed where he said the other code ran OK.

KKTO Roaster.
i checked the code many ... many times for the baud rate its the same as my monitor. its 19200

the Profile_Loader is directly from the in post #90 on this thread.
I checked 5.0
and 4.3 as well

steps taken
1) download
2) unzip to a DIR
3) run code

I haven't changed the file at all. I tested on a mega and uno with no luck.
do you have a better solution for running profiles? by no means do I have to stick to a particular set up or code base. is this the best way?
BokehF1 attached the following file: [27.58kB / 647 Downloads]

A yawn is a silent scream for coffee!
Does the aArtisanQ_PID sketch run correctly? Does it respond correctly in the serial terminal?

I haven't touched the profile loader for ages as I now roast with my Android App (or Artisan Roasting Scope) which stores the profile on the phone or computer instead.

When I get a chance I'll try running the profile loader sketch.
the aArtisanQ_PID runs like a dream. I love it! I have pid control over my roaster i set the sv temp from the serial terminal and it does the rest. I have been using the pid temp and an alarm on my phone. but this process is becoming a little demanding. I'm thinking of adding a second roaster with the same set up. it would be nice to automate this process and have a little finer control over the roast as well.

on a separate note, I've used the artisan software to log roasts and manually controlling ot1 (by setting it high and low) to follow the roast profile and repeat a roast. but that is time consuming as well.

have you released your app?
or do you have a link to help me get Artisan and aAtisanQ_PID working with some kind of timed profiles?

I've researched this for a while now. ether i haven found the right thread, or i didn't ask goggle the right question.

thank you for taking your time to help me :)
A yawn is a silent scream for coffee!
Hmm sounds like an issue with my profile loader code then... maybe it's not compatible with the latest TC4 libraries or latest Adriuno software???

In Artisan you can set up ramp soak profiles and then Artisan will automatically send the SV commands to the TC4. There's some info re the PID functionality of Artisan here.


My App essentially does the same thing. However, you need a bluetooth module connected to the serial pins on the Arduino so the phone or tablet can connect. There's a thread re my App here.

I haven't forgotten about the profile loader. I have finally tried uploading it to my UNO without changing the sketch at all and it seems to work fine for me.

This is what I get returned in the serial monitor.

Description of Profile 1
0   160   180   200   220   240   400   420   440   460   480   720   960   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
25   117   127   136   144   151   193   197   201   204   207   232   257   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

My setup is an Arduino UNO, TC4 rev4, Arduino 1.0.6.

What version of the Arduino IDE are you running?
Just updating this thread so it's easier to find the latest aArtisanQ_PID code and libraries.
greencardigan attached the following files: [44.9kB / 632 Downloads] [27.58kB / 641 Downloads]
Brad, we really appreciate your effort keeping this maintained!

KKTO Roaster.
First i'd like to thank everyone on this forum. Your help and expertise was greatly appreciated and got me sooooo close to achieve my project.

I made some mods on my Popper and tried really hard to control everything through my smartphone. My popper has a DC motor connected to IO3 through a mosfet controller. Everything on the TC4 Android app works finally except one thing: manual (or automatic) control of the DC motor.

Here's what i tried:

aArtisan.ino : I can manually control the heat and the fan, temperature sensors works but i don't have any readings other than that.

aArtisanQ_PID 4.3 : Fan works but not the heat. Also no reading (SV, HTR, FAN)

aArtisanQ_PID 5.3 : Heat works but not the fan. I have reading from everything (BT, ET, RoR, SV, HTR) and PID profile works (i can see the heat going on to catch the profile temperature). I'm so close right now i don't know what else to do. The IO3;xx command do nothing.

I can't connect the DC fan in OT2 because i goes on and off every one second.

If someone could somehow help me troubleshoot my problem i would be very happy.

I don't understand why the fan worked on aArtisanQ_PID 4.3 and not on 5.3.
I haven't had time to read through your other thread where you talked about your setup. Could you clarify how you have everything connected.

Are you using a zero cross detector?

What do you have connected to OT1, OT2 and IO3?


aArtisan.ino : I can manually control the heat and the fan, temperature sensors works but i don't have any readings other than that.

aArtisan only sends SV, HTR and FAN when the PID feature is active.

I don't think any aArtisanQ_PID version will output anything on IO3 unless you modified the code. I recall that someone else here did that for their setup. I'll see if I can find the post.

I'm not sure either why aArtisanQ_PID 4.3 is behaving different to 5.3.
Have a look at these post here.


PhilH got PWM output from IO3 using aArtisanQ_PID 5.3.
I have updated aArtisanQ_PID to include PWM control the same as aArtisan. This is in addition to the usual phase angle control in aArtisanQ_PID. The corresponding commands (IO3;xxx and DCFAN;xxx) have also been added.

I have done limited testing at this stage, so let me know here if you find any issues.

Phase angle control mode is selected by default but can be disabled in the user.h file by commenting out the #define PHASE_ANGLE_CONTROL line.

A brief summary of each control option:

Phase Angle Control mode
- Requires a zero-cross detector on IO3
- Phase angle control on OT2 for an AC fan
- ICC control on OT1 for a heater
- No PWM output on IO3

PWM mode
- Slow PWM on OT1 for a heater (default 1Hz but adjustable)
- Fast PWM (analogue out) on IO3 for DC fan control
- Additional slow PWM on OT2

You can find the update here including a zip file containing the sketches, and latest TC4 libraries.

Or direct zip file download here.
I've done a few roasts with this version now and it seems to be running fine in phase angle control mode.

If anyone gets it working with PWM mode (DC fan) let me know here.
Brad, thanks for the continued support and help with this software.

KKTO Roaster.
I've released another update for testing.

A few members here and on Home-Barista were asking about getting a PWM output to control a gas valve while also getting phase angle control for an AC blower. I have created a test version of aArtisanQ_PID which can do that. Main changes in Bold.

Phase Angle Control mode
- Requires a zero-cross detector on IO2
- Phase angle control on OT2 for an AC fan
- ICC control on OT1 for a heater
- Optional PWM output on IO3 (3.922kHz) for heater. Defined using IO3_HTR in user.h. The PID should control IO3 in this mode.

PWM mode
- Slow PWM on OT1 for a heater (default 1Hz but adjustable)
- Fast PWM (3.922kHz) on IO3 for DC fan control
- Additional slow PWM on OT2

The PWM frequency is currently fixed at 3.922kHz but I could make it user adjustable if required.

You can find the update here including a zip file containing the sketches, and latest TC4 libraries.

Or direct zip file download here.
Edited by greencardigan on 04/16/2016 5:34 AM


greencardigan wrote:
...If anyone gets it working with PWM mode (DC fan) let me know here.

I have done some roast with the last two versions.
First aArtisanQ_PID_6_0 with 3kw fluid bed roaster (AC blower), no problems.

Then with popper (DC motor).
I had problems with interference, mosfet was directly connected to io3 without optocoupler, then problem solved.

Then once aArtisanQ_PID_6_2 with 3kw fluid bed roaster.
I had to uncomment lines 391 and 392 of aArtisanQ_PID.ino because I need to log the counter data (application CSV Grapher will not work with Time format MM:SS). Blower, therefore no heating, does not work when ZCD connected to I/O3, only to I/O2.

For making graphs were used TC4 Roasting App and CSV Grapher.
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
aArtisanQ_PID and Arduino UNO R4 Dataloggers/Controllers/Rate of Rise Meters 2 03/01/2024 12:13 PM
Using aArtisanQ_PID with an old TC4 Dataloggers/Controllers/Rate of Rise Meters 12 02/14/2023 10:50 AM
How do I get the latest aArtisanQ_PID libraries? Dataloggers/Controllers/Rate of Rise Meters 3 02/06/2023 5:44 PM
aArtisanQ_PID thermocouple jumps when active PID channel Dataloggers/Controllers/Rate of Rise Meters 16 06/10/2021 9:57 AM
Loading aArtisanQ_PID in Arduino Dataloggers/Controllers/Rate of Rise Meters 14 05/28/2018 8:32 PM
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 © 2024 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX
Hosted by skpacman