Print Thread
TC4 with aArtisanQ_PID


greencardigan wrote:

Will you be uploading the code somewhere? Or would you be happy for me to upload it to the TC4-Shield github page? I think it could be a useful bit of code for others to use if using a stepper controlled valve.

I just sent you an email for information on how to send you the updated code. Here are the pins used to drive the stepper controlled Clippard Valve. I'm still working on a "homing" procedure which I will post once finalized.

STEP is on pin D11
DIRECTION is on pin D12
Enable/disable motor to keep cool is on pin D6
Could anyone please help me on AC fan speed control? I just started to test my TC4 + Artisan. My AC fan will stop when the OT2 value below about 95, it seems only turn on when the OT2 value is set to 100. I changed two AC fan and got the same result. In the other hand, the heater connect to OT1 seems works well.
My setup is TC4 V6.01 (thanks to Viliam's gerber file), and I soldered the parts on it.
aArtisanQ_PID V6.3 (thanks to Brad's great works),
Artisan V1.0 (thanks to Marko)
Arduino Uno, Windows 10, Heater connected to OT1 and crydom D2425 SSR,
AC fan connected to OT2 and crydom D2425-10 SSR, ZCD connected to IO3.
power is 110V 60Hz, Thanks in advance for your help.
What mode have you specified in the user.h file? Should be CONFIG_PAC3 if you have ZCD on IO3.

Check other settings in user.h. Have you checked the AC frequency setting? Fan min setting?

Maybe remove Artisan from the process for a bit and try sending serial commands directly from the Arduino serial terminal.

The code actually turns on the LED on the Arduino board if AC zero cross pulses are detected from the ZCD. It's hard to see under the TC4 board but it is possible.

Try connecting an incandescent light instead of a motor to see if you can dim the light/
Hello, Brad
Thanks a lot for your prompt response.
For user.h file, I use CONFIG_FAC3, AC 60Hz, and Fan min=0,
I tried incandescent light and send the value through Arduino serial terminal today. On OT2, it only light up at 100 and no light at the value below or equal to 99. Strange thing is the OT2 LED indicator did light up when the value is set above 1 and off when the value is 0 but it did not flashing as OT1 LED indicator when the OT1 value is below 30. My test on OT1 works quite well. The light strength is proportional to to value from 0~100. Below are some thing I tried but did not work
1. disconnect the ZCD +5V pin from +5V, it's no difference. OT1 works well, OT2 did not.
2. command out the #define TIME_BASE pwnN1Hz
3. For phase_ctrl.h, I changed the #define TRIAC_PULSE_WIDTH from 4000 to 2000. Same situation.
Would you please let me know what else I can do? I got an oscilloscope but not sure what is the correct wave form of OT2.
It sounds like it's nearly working.

If you have an oscilloscope try looking at the signal on pin 10 on the TC4. Pin 10 drives the base of the transistor connected to OT2. I think the signal should pulse output in time with each 1/2 AC power cycles. So maybe 120Hz.

Or put a resistor across the OT1 pins and measure the signal across the resistor.

You could also make sure there are pulses coming out of you ZCD.
[quote]greencardigan wrote:

If you have an oscilloscope try looking at the signal on pin 10 on the TC4. Pin 10 drives the base of the transistor connected to OT2. I think the signal should pulse output in time with each 1/2 AC power cycles. So maybe 120Hz......../quote]

Thanks a lot for your advice, I will try to find out the root cause these days, Once got the result I will update here.
Is pwm on that pin ?
If true, the pulses can pe sensed even with a multimeter, by sending various OT commands and see how the average value change.
No it won't be pwm. It should be a short pulse sent at a precise time to switch the power at the correct part of the AC power cycle.
One thought, if you don't end up getting the ZCD / random-fire SSR to work, it looks like there is PWM dimmer modules that would allow AC fan control without a ZCD, working "as if" it was a DC fan. See link below, haven't tested this myself though.
I've done some investigation, since I am not an EE and not familiar with Arudino programming. (Actually, this is my first electronic DIY project). I still can not figure it out. The attached is investigating report.Appreciate you inputs. Also thanks to mg512, I will try PWM module you mentioned if I can not get this thing done.
CJ098 attached the following file:
New update on the last page of attached file. I check the phase angle of pin 10 vs ZCD directly on Arduino board. The phase angle between pin 10 and ZCD seems not changed correspond to different OT2 value.
In stead, it changed the pin 10 pulse width.
Again, your help would highly appreciated.
CJ098 attached the following file:
Yes, I would expect the phase angle of pin 10 output to change with changing outputs values. I'm confused.

Where did you get the ZCD from? Did you make it? Could you check the pins are labeled correctly as they are in a different order compared to Jim's ZCD boards.

Can you check if you are getting 5 volts on Pin 13 (the LED pin) when the ZCD is connected. Pin 13 should go high when AC is detected from the ZCD and the LED connected to pin 13 should come on.

The D2425-10 SSR must be used on OT2 for phase angle control.

You could try updating to aArtisanQ_PID 6.5? There's download link back in post #285 in this thread. Also, you should not need to change any code in the phase_ctrl library.
Red trace is the output from my ZCD.
Blue trace is the negative pin on OT2.

I'm running with 50Hz AC.

Video shows waveforms while changing output from 100% down to 0%, then back up to 100%.

I have OT2 min set at 10% so you will see a larger jump there.

Please excuse the pathetic scope :/

And another video showing the trace for the ICC output on the OT1 negative pin.

I'm adjusting power from 0% to 100%.

This is letting half AC cycles pass through and always switches at the zero crossing of the AC power, thus only requires a zero cross SSR.

Hi Brad,
Many Many thanks to your help. I have to apology for causing confusion about phase angle. Actually, it's due to my setting on oscilloscope. I explained it on page 8 of the attached file.On my TC4, the phase angle of pin 10 does change. However, my D2425-10 SSR seems only be turned on at zero crossing. I explained on page 9&10. Please have a look and welcome your inputs. As for your question, the ZCD was made by myself. The pin location is different to yours. The pin 13 is getting +5V when my ZCD connect to IO3. And the LED connect to pin 13 is lighted up. Thanks again.
CJ098 attached the following file:
This latest PDF seems to be the same as the previous one. There are no pages 8-10.

I'm beginning to suspect your D2425-10 SSR is not switching properly. Where did it come from? A reputable source?
Hi Brad,
Would you please down load the latest file again? There are page 8-10, (title is step 6~step 8).
I bought this SSR on the web site. This time I will try the local supplier.
Thanks a lot.
Yes, the signals in Steps 7 and 8 look good. However, are your output % reversed? The 100% photo looks like what I expected 0% to look like. Unless I have mine back to front in my video.

You could try a new SSR although I realise they are not cheap.
The 100% photo on step 7 is correct. However, it looks different to yours. It might be due to the setting of my scope, too. I bought this vintage scope 2 months ago and have no operational manual to understand it throughly.
Hello Brad
Thanks for your help that I just completed my TC4/popcorn popper roaster setup and did some test run.
When I use PID control roasting, the Heater value did not show on the logged profile.
However, if I adjust the slider of heater, the value changes will be logged and shown.
Is there anyone got the same problem before? or I did the wrong config? Could you please help to check it.
My setup is Win 10, Artisan v 1.3.1, aArtisanq_pid v6.5 (test)
Thanks a lot.
CJ098 attached the following images:
pid.png dvice.png heater.png
Have you set up the 'Extra Devices' tab? Heater fan and SV values are not recorded by default. You have the specify TC4 channels 3-4 to get heater and fan logged.

See my video here showing Artisan setup for TC4.
I tried to add extra device TC4_56 and adjust the Fan and Heater value manually.
1. During the roast, the right side heater LCD just show 0 , no matter how it changed on left side heater slider.
2. During the roast, at the bottom of profile it shows the fan and heater value, however, it disappeared when I stopped the roast. I attached the screen snap shot for your reference. Thanks a lot for your help.
Re-attach picture
sorry, I don't know why the attached picture does not show.
I attached a .rar file.
CJ098 attached the following file:
pictures.rar [313.66kB / 507 Downloads]
TC4 5-6 is Heater then Fan. In your screenshot you have them swapped.
Jump to Forum: