What's in Your Ro... | [559] |
Skywalker, the AL... | [314] |
Dan's Direct-Flam... | [265] |
SR800/SR540 Fan C... | [90] |
War on Farmers by... | [70] |
TC4 with aArtisanQ_PID
|
|
brennn |
Posted on 02/23/2014 7:47 PM
|
![]() 1/4 Pounder ![]() Posts: 68 Joined: September 12, 2013 |
Brad, could you explain how to use the Profile Loader? If I download a profile from the Artisan database: https://docs.goog...nphTzNKWHM, where do I upload it and will the Arduino control the heater and fan speed in order to reach the temperatures in the uploaded profile? |
|
|
greencardigan |
Posted on 02/23/2014 8:16 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
The basic procedure for loading profiles onto the TC4 is documented in the first post in this thread. Essentially the profile is entered into the Profile loader sketch and then loading the sketch onto the Arduino will write the profile to the EEPROM on the TC4. You need to edit the values in this part of the Profile Loader sketch. The profile is essentially a set of times in seconds and corresponding temperatures. I'm not sure if you will be able to use the Artisan log files. Code Download source ////////////////////////////////////////////////////////////////////////////////////////// If you wanted to upload a second profile, change the profile_number value in the sketch. I think you also need to update the user.h file for aArtisanQ_PID to inform the TC4 how many profiles you have got loaded on the EEPROM. Then reload the aArtisanQ_PID sketch. (the profile will then be saved on the TC4's eeprom. To use the profile you need to activate the PID by sending the PID:ON command or pressing the appropriate button if you have the LCdapter installed. The TC4 will then control the heater. Fan speed will need to be controlled how you usually do. If you have multiple profiles stored on the eeprom you can select a specific profile using the PID:P1 command(PID;P1 will select profile 1. Use P2 for profile 2 etc). Hope that makes sense. |
|
|
brennn |
Posted on 02/24/2014 8:26 AM
|
![]() 1/4 Pounder ![]() Posts: 68 Joined: September 12, 2013 |
^^Fantastic, Brad. Thank you! |
|
|
brennn |
Posted on 03/01/2014 9:52 AM
|
![]() 1/4 Pounder ![]() Posts: 68 Joined: September 12, 2013 |
I'm trying to better understand the theory behind the code for phase angle control and the integral cycle control. I am fascinated at how jwatte used Bresennham's line algorithm. Can someone explain how this integral cycle control is accomplished? Is it PWM, or no? And in the following graph, are the values in the middle (i.e; 16667, 14733, 14218) the number of miliseconds in between each outputted signal to the SSR? Code Download source #ifdef FREQ60 Thanks! |
|
|
JimG |
Posted on 03/01/2014 11:02 AM
|
![]() 1 1/2 Pounder ![]() Posts: 834 Joined: October 23, 2008 |
Nick - This post looked really familiar, then I realized it was because you had emailed me this question earlier this week. And I have not replied ;-( Sorry about that. This table tells the software how many "counts" to wait before turning on the output and firing the triac (e.g. the SSR). The chip's timer is configured for one count = 0.5uS, so 16,667 counts = 8.333ms. A half cycle of 60Hz AC requires 8.3333 ms, so a count of 16,667 effectively results in the triac waiting for the full half cycle, therefore not firing for that half cycle. IOW, the heater is off for that half cycle. On the other end is 0 counts, which turns on the triac at the very start of a half cycle, effectively 100% power. All of the intermediate values are based on the timing needed to delivery a certain percentage of power. This part of the code is not PWM. It is phase angle control. It is so-named because the delay times result in switching the triac at different phase angles of the AC sine wave. Jim |
|
|
JimG |
Posted on 03/01/2014 11:11 AM
|
![]() 1 1/2 Pounder ![]() Posts: 834 Joined: October 23, 2008 |
The ICC is an entirely different animal. It turns the SSR on or off for an entire half cycle. It decides whether or not a half cycle should be on in essentially the same way that you draw a sloping line with pixels on a computer screen, hence the reference to Bresenham's algorithm. This is similar, but slightly different, from what is sometimes called burst control. Burst control fires the SSR for X number of consecutive half cycles at the start of a sequence of N half cycles, then turns off the SSR the remaining N - X half cycles. Burst mode does not deliver the power as evenly as the implementation of ICC in our code. I developed the ICC code specifically to address the problem of flickering lights and surging pumps when pulsing the heater in an espresso machine. But turns out it works well for this application, too. Jim |
|
|
Titus142 |
Posted on 05/09/2014 11:38 PM
|
![]() Newbie ![]() Posts: 12 Joined: April 27, 2014 |
So using Artisan and ArtisianQ_PID_4_3 I ham having trouble controlling the heater with a SSR. At first it would not stay on, just pulse momentarily when I changed the slider or hit a button in Artisan. Then I uploaded the default profile with the profile loader to see if it would make a difference. Now the heater turns on when I turn the fan on. I still have control over the fan, but changing the value of OT1 makes no difference. Fan on=heat on 100%. Any idea what could cause this? Fan is controlled by SSR and ZCD on IO3a |
|
|
JimG |
Posted on 05/10/2014 11:32 AM
|
![]() 1 1/2 Pounder ![]() Posts: 834 Joined: October 23, 2008 |
This probably not a very satisfying answer, but here goes anyway ;-) The predecessor of the aArtisanQ_PID application was a beta release of a program named aArtisanQ: https://tc4-shiel.../aArtisanQ For the purposes of troubleshooting the problem you are describing, going back to the base application would remove from consideration any of the more advanced features that were added to the PID version. A possible course, then, would be to install on your Arduino the base application, and attempt to get correct behavior from event buttons in Artisan that are simple and direct, i.e., set heater to 50%, set heater OFF, set heater to 75%. This eliminates a whole bunch of things to have to troubleshoot. Once you can control your heater and fan using the simple event buttons, then add slider control. If this still works, then maybe switch back to the aArtisanQ_PID application? Jim Note: the aArtisanQ application is still has the old "pde" suffix and needs to switched over to "ino" suffix. I can do this for you if you need me to. |
|
|
namus80 |
Posted on 06/09/2014 3:58 AM
|
![]() Newbie ![]() Posts: 6 Joined: May 22, 2014 |
Hello Everyone I am trying to get the aArtisanQ-PID version 4 on arduino Uno with TC4 shield working with a popcorn popper with a DC fan. I cannot figure out if I need any modifications to the aArtisan PID sketch to change the output to IO3 rather than OT2. Any help would be appreciated. The display currently shows only OT2 on the LCDadapter. |
|
|
Ramezaziz |
Posted on 03/22/2015 9:17 AM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Hello, I am using a TC4C board with ZCD & Crydom D2425 & D2425-10 to modify and Poppery I to work with aArtisan and I have been using the aArtisanQ_PID sketch, I was able to get the fan to work on the OT2, but the OT1 doesn't control the heater, although I was able to get BT & ET temperature reading from the thermocouples. I followed the same instructions on the following link: http://www.instru.../?ALLSTEPS Can someone kindly advise me please?! I am not a computer programmer or an engineer! I am attaching a copy of the print screen of the error message that I got! Thanks, Ramez. Edited by ginny on 03/22/2015 6:31 PM |
|
|
greencardigan |
Posted on 03/22/2015 6:01 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
Quote namus80 wrote: Hello Everyone I am trying to get the aArtisanQ-PID version 4 on arduino Uno with TC4 shield working with a popcorn popper with a DC fan. I cannot figure out if I need any modifications to the aArtisan PID sketch to change the output to IO3 rather than OT2. Any help would be appreciated. The display currently shows only OT2 on the LCDadapter. I believe there would be changes required. aArtisanQ_PID is set up to control a universal motor using phase angle control. IO3 get used to detect the zero-cross pulse from a zero-cross detector circuit. JimG might be able to clarify? Edited by greencardigan on 03/22/2015 6:07 PM |
|
|
greencardigan |
Posted on 03/22/2015 6:11 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
Quote Ramezaziz wrote: Hello, I am using a TC4C board with ZCD & Crydom D2425 & D2425-10 to modify and Poppery I to work with aArtisan and I have been using the aArtisanQ_PID sketch, I was able to get the fan to work on the OT2, but the OT1 doesn't control the heater, although I was able to get BT & ET temperature reading from the thermocouples. I followed the same instructions on the following link: http://www.instructables.com/id/Build-a-Controllable-Coffee-Roaster-from-an-Air-Po/?ALLSTEPS Can someone kindly advise me please?! I am not a computer programmer or an engineer! I am attaching a copy of the print screen of the error message that I got! Thanks, Ramez. There is no image attached. You could try controlling the roaster by sending commands from a serial terminal instead of Artisan. This will confirm if the aArtisanQ_PID code is working correctly. Try sending OT2;100 to set the fan speed to 100% then OT1;50 to set the heater to 50%. Send READ to get the TC4 to return data. |
|
|
Ramezaziz |
Posted on 03/22/2015 7:56 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Hello & thank you for your quick response! I have sent the OT2; 100 and the fan worked in full power, then I sent the OT1;50, but the heater didn't go on at all, and finally when I sent the READ to get the TC4C to return data, I got: 64.3,62.56,63.35,0,100 I have been in touch with Jim, he has been a great help, and he actually tried the aArtisanQ_PID on his end, and he still didn't get the OT1 to work with the heater, only the fan worked, but not the heater; he advised me to connect the heater to the OT2 with the fan and it worked with the same SSR Crydom D2425-10. Since he didn't write that sketch he advised me to come here seeking for guidance. I have tried to download aArtisanQ_PID from Google, but I got an error saying that 'PID' doesn't name a type. The other sketch that came on the TC4C board pre-loaded works only with the OT2 (Fan), not OT1 (Heater). The error message that I get from aArtisan is: Exception:ser.ARDUINOTC4temperature(): list Index out of range @line 25093. But the temperature is being read from the thermocouples for the BT & ET. I am not sure if the aArtisanQ_PID code needs a modification?! I would appreciate if someone can send me the modified aArtisanQ_PID Code for aArtisan V. 0.9.2 (1396) at Baud Rate 115,200 to work with the West Bend Poppery I, with the ZCD and SSR Crydom D2425-10 to control the fan & SSR Crydom D2425 to control the heater. Thanks, Ramez. |
|
|
greencardigan |
Posted on 03/22/2015 11:44 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
Quote The aArtisanQ_PID code is my mess ![]() You can try my latest working version of my code to see if that helps. I have attached it to this post. Make sure you modify the user.h file before you upload to your TC4C. You need to comment out the relevant options to make it work properly. For example, if you are not using potentiometers attached to your TC4C then you need to comment out the #define ANALOGUE lines like this //#define ANALOGUE1. And if you are using Artisan, enable the #define ARTISAN and comment out //#ANDROID etc. You'll also need to check or change some other values in the user.h like the BAUD rate, initial temperature units. There's comments beside most options but let us know if you have questions regarding any of them.
greencardigan attached the following file:
|
|
|
Ramezaziz |
Posted on 03/23/2015 7:58 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Thank you for your help, I made those changes to user.h file, then when I tried to compile, I got this error message, I just copied & pasted it below, not sure what I did wrong, it sounds like I need to define the PID, not sure how though, please advice. Thanks! This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Uno" In file included from aArtisanQ_PID.ino:124: /cmndreader.h:48:20: error: PID_v1.h: No such file or directory In file included from aArtisanQ_PID.ino:124: cmndreader.h:110: error: 'PID' does not name a type aArtisanQ_PID:192: error: 'PID' does not name a type aArtisanQ_PID.ino: In function 'void updateLCD()': aArtisanQ_PID:502: error: 'myPID' was not declared in this scope aArtisanQ_PID:502: error: 'MANUAL' was not declared in this scope aArtisanQ_PID:674: error: 'myPID' was not declared in this scope aArtisanQ_PID.ino: In function 'void updateSetpoint()': aArtisanQ_PID:777: error: 'myPID' was not declared in this scope aArtisanQ_PID:777: error: 'MANUAL' was not declared in this scope aArtisanQ_PID.ino: In function 'void checkButtons()': aArtisanQ_PID:831: error: 'myPID' was not declared in this scope aArtisanQ_PID:831: error: 'MANUAL' was not declared in this scope aArtisanQ_PID:832: error: 'AUTOMATIC' was not declared in this scope aArtisanQ_PID.ino: In function 'void setup()': aArtisanQ_PID:1004: error: 'myPID' was not declared in this scope aArtisanQ_PID:1006: error: 'DIRECT' was not declared in this scope aArtisanQ_PID:1008: error: 'MANUAL' was not declared in this scope aArtisanQ_PID.ino: In function 'void loop()': aArtisanQ_PID:1051: error: 'myPID' was not declared in this scope aArtisanQ_PID:1051: error: 'MANUAL' was not declared in this scope |
|
|
greencardigan |
Posted on 03/23/2015 9:29 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
It looks like it can't find the PID_v1 library. Have you got the PID_v1 library in your arduino libraries folder? |
|
|
Ramezaziz |
Posted on 03/24/2015 2:11 AM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Hello, not sure from where should I get it, when I bought the TC4C broad was pre-uploaded with the aArtisanQ_PID sketch, and sine it is already compiled, I can't download it from the TC4C board, can you please send me missing file to add it to the library. Thanks! |
|
|
greencardigan |
Posted on 03/24/2015 4:50 AM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
I've attached the libraries. Put them in your Arduino/libraries folder.
greencardigan attached the following file:
|
|
|
Ramezaziz |
Posted on 03/26/2015 6:50 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Hello again, I have uninstalled and installed the latest Arduino software and made all the changes and when I compiled, I got this error messages, please advise. Thanks: Arduino: 1.6.1 (Windows 8.1), Board: "Arduino Uno" C:\Program Files (x86)\Arduino\libraries\cButton\cButton.cpp:77:9: error: prototype for 'uint8_t cButtonBase::anyPressed()' does not match any in class 'cButtonBase' uint8_t cButtonBase::anyPressed() { ^ In file included from C:\Program Files (x86)\Arduino\libraries\cButton\cButton.cpp:43:0: C:\Program Files (x86)\Arduino\libraries\cButton\cButton.h:66:11: error: candidate is: boolean cButtonBase::anyPressed() boolean anyPressed(); // true if any button is pressed ^ Error compiling. This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. |
|
|
greencardigan |
Posted on 03/26/2015 7:06 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
Hmm, it seems that Jim recently made changes to the cButton library to make it compatible with Arduino 1.60. Possibly the libraries I gave you (from the aArtisan folder on the TC4 code repository) did not have this update. Try replacing the cButton library folder with the updated folder I have attached. See how that goes.
greencardigan attached the following file:
|
|
|
Ramezaziz |
Posted on 03/26/2015 7:17 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
I have replaced it, but I am getting the following error Please see the attached zip file below This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. Admin edit: reduced to a zip file:
Ramezaziz attached the following file:
Edited by JackH on 03/26/2015 8:19 PM |
|
|
Ramezaziz |
Posted on 03/26/2015 7:24 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
If I downgrade my Arduino will that solve the problem? If that is the case, which version will work with it? I am using now V1.6.1 Thanks! |
|
|
greencardigan |
Posted on 03/26/2015 7:57 PM
|
![]() 1 1/2 Pounder ![]() Posts: 1188 Joined: November 21, 2010 |
I don't think that is the problem. Do you have your aArtisanQ_PID folder inside the libraries folder? Try moving it outside the libraries folder. It looks like it's finding multiple copies of the command reader and phase control files. If this doesn't work I can try sending you the library files I am using. I can do that later when I get home. |
|
|
Ramezaziz |
Posted on 03/26/2015 8:11 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
I was able to compile it after I removed the aArtisanQ_PID folder out of the libraries folder but I got this message, should I upload it on the TC4C board, I am afraid to lose what was uploaded on my board, please advise: ketch uses 25,506 bytes (79%) of program storage space. Maximum is 32,256 bytes. Global variables use 1,893 bytes (92%) of dynamic memory, leaving 155 bytes for local variables. Maximum is 2,048 bytes. Low memory available, stability problems may occur. |
|
|
Ramezaziz |
Posted on 03/26/2015 9:11 PM
|
![]() Newbie ![]() Posts: 27 Joined: January 05, 2015 |
Hello & thanks for your help. I was able to upload the sketch successfully, and when I tested it using the Arduino software by typing OT2;100 & OT1;50 the fan & the heater worked fine, but when I tried to use it with the Artisan software, the fan just makes a zzzzzzz sound, but doesn't move, not sure is it because the memory is low or there should be a setup in the Artisan software or the sketch is not compatible with the Artisan version that I am using V0.9.2, I am not sure. Please advise! |
|
Jump to Forum: |