Who is here? 1 guest(s)
 Print Thread
TC4 with aArtisanQ_PID
greencardigan
There's quite a few pins that are typically not being used by the TC4 sketches. D4, D5, D6, D7, D8, D11, D12

My latest version of aArtisanQ_PID can use up to 4 of these pins (defined in user.h) for button inputs. That leaves 3 spare even if you were using all 4 buttons.
 
ChrisR
I got my stepper motor to work using step and direction based on levelOT1. I have another issue I need to tackle. The stepper motor is dumb and doesn?t know where it is and I need to keep track of it, especially after shutdown. Are there any EEPROM addresses available? What I want to do is write 0 to an address when I upload the software on the board and that would be my starting point. Then read and write to the same address as I step through the motor.
Or is there a better way of doing it?
Edited by ChrisR on 06/22/2018 8:57 AM
 
ChrisR
I noticed that sometimes the sliders display what the temperature is read in Artisan. For example, when I start Artisan and the temperature is read, the sliders default to the temperature number. I'm using IO3;{} for the fan slider and OT1;{} for the burner slider.
I also noticed that even though sometimes my 1 increment increase gets added to the temperature read and it gets written to the TC4.
Edited by ChrisR on 06/24/2018 2:03 AM
 
greencardigan

Quote

ChrisR wrote:
The stepper motor is dumb and doesn?t know where it is and I need to keep track of it, especially after shutdown. Are there any EEPROM addresses available? What I want to do is write 0 to an address when I upload the software on the board and that would be my starting point. Then read and write to the same address as I step through the motor.
Or is there a better way of doing it?

I don't think writing to eeprom repetitively in a loop is a good idea (eeprom would probably fail soon after reaching write cycle limit). I think ideally you would write to it before power off but not sure how you would trigger that automatically before power off. Might be easier to always manually turn the valve to the default start up position after power off?

There should be heaps of space left in the eeprom as it is 64K total. Jim was using some of the initial memory to store thermocouple calibration data. And my aArtisanQ_PID code can read roast profiles stored in eeprom using the profile loader sketch.

The calibration data is stored from byte 0. Not sure exactly how much it uses, but not much.

Profile storage begins at 1024 bytes and allows 400 bytes per profile.
Edited by greencardigan on 06/24/2018 11:43 PM
 
greencardigan

Quote

ChrisR wrote:

I noticed that sometimes the sliders display what the temperature is read in Artisan. For example, when I start Artisan and the temperature is read, the sliders default to the temperature number. I'm using IO3;{} for the fan slider and OT1;{} for the burner slider.
I also noticed that even though sometimes my 1 increment increase gets added to the temperature read and it gets written to the TC4.

Not sure what's going on here.
 
ChrisR

Quote

greencardigan wrote:

Quote

ChrisR wrote:

I noticed that sometimes the sliders display what the temperature is read in Artisan. For example, when I start Artisan and the temperature is read, the sliders default to the temperature number. I'm using IO3;{} for the fan slider and OT1;{} for the burner slider.
I also noticed that even though sometimes my 1 increment increase gets added to the temperature read and it gets written to the TC4.

Not sure what's going on here.


I reset Artisan and the problem went away. Not sure what happened there.
 
ChrisR

Quote

greencardigan wrote:

The IO3 frequency is set in the setup part of the aArtisan_PID.ino file.


pwmio3.Setup( IO3_PCORPWM, IO3_PRESCALE_8 );


Changing the prescale here from IO3_PRESCALE_8 to IO3_PRESCALE_1 should give you 31kHz. If that's too fast you could change the first parameter to IO3_FASTPWM and leave the prescale at 8. That will give 7.8kHz. These are the closest two options.


Changed the prescale to IO3_PRESCALE_1 and it worked. I can control my DC fan. I modified the aArtisanQ_PID 6.5 to give me step and direction based on levelOT1 and I can drive my stepper motor valve both in manual and automatic mode.
 
greencardigan
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.
 
ChrisR

Quote

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
 
CJ098
Hello,
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.
 
greencardigan
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/
 
CJ098
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.
 
greencardigan
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.
 
CJ098
[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]

Hello,
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.
 
renatoa
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.
 
greencardigan
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.
 
mg512
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.
https://forum.hom...ad_id=5601
 
CJ098
Hello
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:
 
CJ098
Hello
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:
 
greencardigan
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.
 
greencardigan
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 :/

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

 
CJ098
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:
 
greencardigan
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?
 
CJ098
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.
 
Jump to Forum: