Huky Forum

HUKY 500 (T, J, SOLID, PERF) => Maintenance and Mods => Topic started by: SusanJoM on June 06, 2017, 10:20:03 AM

Title: Coming around to automation
Post by: SusanJoM on June 06, 2017, 10:20:03 AM
So today I found myself using the buttons/sliders and simply forgetting that I still had to turn the gas knob to change the kPa.    :-[

Has anyone come up with a way to use Artisan and a Phidget to actually control the gas?  and/or the fan? 

I'm ready....
Title: Re: Coming around to automation
Post by: cgriffith on June 06, 2017, 07:07:47 PM
what about this post (https://www.hukyforum.com/index.php/topic,1080.msg11570.html)?
Title: Re: Coming around to automation
Post by: SusanJoM on June 06, 2017, 07:26:38 PM
YES ! ! !
Thank you.
Title: Re: Coming around to automation
Post by: cgriffith on June 06, 2017, 07:49:15 PM
Yeah, I found that a while back and have bookmarked it.  It is just the sort of project I would buy all the parts for then give up after some small detail derails me.
Title: Re: Coming around to automation
Post by: Chert on June 09, 2017, 06:24:35 AM
So today I found myself using the buttons/sliders and simply forgetting that I still had to turn the gas knob to change the kPa.    :-[

Has anyone come up with a way to use Artisan and a Phidget to actually control the gas?  and/or the fan? 

I'm ready....

You have the hardware to record airflow.

Have you explored what hardware can record gas flow?

Let's work on that bit, when you have your airflow piece sorted.

I control airflow through artisan which charts the change setting.  So to add the gas flow charting piece according to how I dial in the gas would be a great step forward.  Can the Phidget you have serve as that interface for gas pressure?  Have you come across such a circuit that works with TC4?
Title: Re: Coming around to automation
Post by: SusanJoM on June 09, 2017, 07:31:36 AM
I have nothing at all that is specific to a TC4....yet. 
When Jim G re-opens for business on August 1 I will order a TC4C.

Given my minimal comprehension of how it all works, so far, I'm thinking that the Phidgets will serve for the recording functions and the TC4C for the controlling functions?   And Artisan will rule the whole thing ....:-))))



Title: Re: Coming around to automation
Post by: SusanJoM on June 09, 2017, 08:38:09 AM
There is a tantalizing post from Slickrock (who really is responsible for all of us on this side of the pond having HUKYs in the first place) on an upcoming description of how he has automated his gas powered North:

Automating the Huky is a taller order than with most other home roasters, namely because it's a gas roaster....... . Good news is if you have the inclination, you can fully automate Huky with the TC4 and proportional gas valve for duty modulation. I effectively did the same same with my North roaster two years ago. I'm putting the finishing touches on a long overdue extensive post on the subject.

I don't understand the use of the word "duty";  can someone clarify that for me???

Title: Re: Coming around to automation
Post by: Wayneg1 on June 09, 2017, 10:05:40 AM
There is a tantalizing post from Slickrock (who really is responsible for all of us on this side of the pond having HUKYs in the first place) on an upcoming description of how he has automated his gas powered North:

Automating the Huky is a taller order than with most other home roasters, namely because it's a gas roaster....... . Good news is if you have the inclination, you can fully automate Huky with the TC4 and proportional gas valve for duty modulation. I effectively did the same same with my North roaster two years ago. I'm putting the finishing touches on a long overdue extensive post on the subject.

I don't understand the use of the word "duty";  can someone clarify that for me???

My guess is he is referring to "Duty Cycle".  Maybe in reference to being able to regulate from zero (off) to 100% (fully on).  Any other guesses out there??
Title: Re: Coming around to automation
Post by: Chert on June 09, 2017, 12:10:20 PM
My guess:   PWM pulse width modulation is used with electric elements.  Short duty cycle, time on versus off is varied, to control the heat output.  I imagine - but I don't know - that his valve takes the PWM signal and adjust gas flow similarly.  And because there is a mass of gas distal to the valve, the flame modulates but doesn't flicker like crazy?  That type of valve is quite spendy, as I recall when I checked into this, like $100 or more.  That DC step motor pulley valve system that someone on HUKY rigged up (great work, whoever that is) is more complicated in the programming for discreet gas settings (I think) - and how would the PID control that ??? - but much cheaper.
Title: Re: Coming around to automation
Post by: SusanJoM on June 10, 2017, 08:59:29 AM
My guess:   PWM pulse width modulation....

Just in case anyone else had no idea what PWM is:

https://www.arduino.cc/en/Tutorial/PWM

And probably anyone interested in this subject has already found this old post at HomeRoasters, but just in case, here's a link:

https://forum.homeroasters.org/forum/viewthread.php?thread_id=3506
Title: Re: Coming around to automation
Post by: beananimal on June 10, 2017, 11:58:33 AM
I have nothing at all that is specific to a TC4....yet. 
When Jim G re-opens for business on August 1 I will order a TC4C.

Given my minimal comprehension of how it all works, so far, I'm thinking that the Phidgets will serve for the recording functions and the TC4C for the controlling functions?   And Artisan will rule the whole thing ....:-))))
Hello Susan,
When it comes to that point , please double check if it is really the TC4C or another TC4 version you want to buy.
I have it also, not yet in service, but I read that it is not flexible if you want to go beyond the tasks it is designed for.
I am very curious about the next steps of this topic here.
Title: Re: Coming around to automation
Post by: SusanJoM on June 10, 2017, 12:06:35 PM
I have nothing at all that is specific to a TC4....yet. 
When Jim G re-opens for business on August 1 I will order a TC4C.

Given my minimal comprehension of how it all works, so far, I'm thinking that the Phidgets will serve for the recording functions and the TC4C for the controlling functions?   And Artisan will rule the whole thing ....:-))))
Hello Susan,
When it comes to that point , please double check if it is really the TC4C or another TC4 version you want to buy.
I have it also, not yet in service, but I read that it is not flexible if you want to go beyond the tasks it is designed for.
I am very curious about the next steps of this topic here.


Ah...hmmm....Well, I thought I made great strides by figuring out I wanted a TC4C and not a TC4, but I will go back and look more carefully.

At this moment I am working on the project I abandoned last year to get the air flow readable via Artisan.
(Phidgets 1011 and 1136). 
Here's the beginning of the inquiry which I put on the shelf an embarrassing length of time ago.  Now it's back on the table...
https://www.hukyforum.com/index.php/topic,153.0.html
If you've got any input I'd love it.  I guess I should resurrect that thread instead of going sideways with this one.
Title: Re: Coming around to automation
Post by: monkey_lever on June 10, 2017, 05:57:39 PM
If you want full automation of airflow and gas the TC4 is not going to be straight forward for the huky. For the airflow you need additional hardware: solid state relay and zero cross detector. Gas control is more complex one option as mentioned before a proportional valve  or a manifold with high/low settings and solid state relay to control a solenoid valve.

Im controlling the airflow with the TC4 and the gas settings with an additional arduino mega + stepping motor + python as described is some post in this forum.

The arduino mega option is cheaper than the TC4 but you need to code in python all the functionalities that you want.

Regards.

Title: Re: Coming around to automation
Post by: SusanJoM on June 10, 2017, 06:16:44 PM
+ stepping motor + python as described is some post in this forum.

So with a stepping motor do you have to write code to have it select each potential  kPa setting?  That's a bit confining -- like using the Buttons set-up.  Either the intervals are too wide or you've got so many buttons it's hard the find the one you want...

Or does it move more like using the Sliders?
Title: Re: Coming around to automation
Post by: monkey_lever on June 11, 2017, 03:57:12 PM
Susan

Yes, exactly. There is probably a way to control the motor with the slider but I have not tried it yet.

Basically Artisan is telling the python code how many steps or revolutions you want it to move (clockwise or counter clockwise). The added value from using the motor is that I can consistently move the Kpa by a factor of the total pressure. I established maximum pressure to be 4 kpa and defined buttons with 5 % increments of the total steps that the motor needs to reach the total 4 Kpa.

If you want full automation. Having artisan following automatically a background curve. Please check this homeroasters.org post https://forum.homeroasters.org/forum/viewthread.php?thread_id=4362. I havent tried it yet but I think that approach could work for the huky. The proportional valve is another option but is going to be more expensive and you need to find the correct proportional valve.








Title: Re: Coming around to automation
Post by: SusanJoM on June 11, 2017, 04:23:44 PM
Oh thank you.  I love this line of inquiry....someday with all your help I may even understand it.... ;)

Here's another thread that I haven't yet fully ingested, but that should be of interest to anyone else following me down the rabbit hole. http://www.home-barista.com/home-roasting/exploring-north-gas-roaster-automation-part-1-t47272.html

I should clarify that I'm not (yet....???) interested in following a background curve, or controlling a PID.  I just would like to be able to adjust kPa (most important) and maybe air (least important because I seldom change it at all) from Artisan....


Title: Re: Coming around to automation
Post by: beananimal on June 12, 2017, 01:07:40 PM
I just found this instruction:

http://www.instructables.com/id/Build-a-Controllable-Coffee-Roaster-from-an-Air-Po/

Not for the Huky, or gas, but it helps me a lot to understand many similar steps.
Title: Re: Coming around to automation
Post by: monkey_lever on June 12, 2017, 04:02:29 PM
Beananimal. Thats the instructable that I used to understand how to connect the TC4 to the SSR + fan. Really helpful.

Susan. If you just want to adjust the gas from artisan the cheapest  and easiest option is the stepping motor. You can use the same arduino to control the fan but you need DC fan if you want to control it with the arduino.





Title: Re: Coming around to automation
Post by: SusanJoM on June 12, 2017, 04:39:11 PM
Susan. If you just want to adjust the gas from artisan the cheapest  and easiest option is the stepping motor. You can use the same arduino to control the fan but you need DC fan if you want to control it with the arduino.

Okay, so you have/use a button set-up like the attached, and each one calls a program ??
(The buttons now give me both the kPa and the % of my maximum of 3.75 KpA)
Title: Re: Coming around to automation
Post by: beananimal on June 15, 2017, 09:16:31 AM
Ah...hmmm....Well, I thought I made great strides by figuring out I wanted a TC4C and not a TC4, but I will go back and look more carefully.

Hello Susan,
sorry about confusing you with "are you sure that" , but in the last two years I read so much, partly controversy about TC4C and AC and understood only  30%.

After reading again and again, especially the Popcorn Popper thing, I am optimistic that it is the right piece. (as I have it as well).
It only seems that I should have ordered the ZCD from MLG as well and will probably do it soon to be on the safe side. (Soldering is not my strenght).
Peter
Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 09:28:43 AM
 ;D

Since  MLG is on vacation until August 1, we both have plenty of time to figure out what we need.  So....what is the ZCD ???   Okay, okay, okay, I'll go to Jim's site and see if I can figure it out ...

Nevermind....I found it in Monkey-Lever's earlier post:  Zero Cross Detector.  Of course I still don't know what that is, but that gives me a start.

Am I going to have to learn how to use Python?  whatever THAT is??? 
Title: Re: Coming around to automation
Post by: beananimal on June 15, 2017, 09:49:41 AM
 :)
Fully agree.
I am on vacation now and have with me my first book about Arduino programming and installation.
ZCD: it seems to be impossible to buy a similar complete version elsewhere that fits the TC4C
Title: Re: Coming around to automation
Post by: Chert on June 15, 2017, 09:57:04 AM
If you are connecting to an SSR, just buy one that has zero cross detection function.  I found mine at Platt electrical supply company for less than $50.
Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 10:18:43 AM
Okay, I think I'm gonna go the stepping motor route.  That proportional gas valve just looks like overkill for my HUKY.

So far I seem to need
TC4C
SSR with ZCR
stepping motor

and a whole lot of savvy that they don't seem to sell it on Amazon.... ;D
Title: Re: Coming around to automation
Post by: Chert on June 15, 2017, 10:47:33 AM
If I were to do this, I would go through the post (https://www.hukyforum.com/index.php/topic,1080.msg11570.html) linked above and make a list of the items needed and their function, basically a road map of how to get there from here.

And I would probably check with Brian if some additional Phidgetry could help you realize your stepper motor goal since you already have Phidget components.

A WTB post might snag you a TC4C before august.
Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 10:52:48 AM
Brilliant, thanks.
I'm on it....

One question:  when threads like that one say "Arduino", can I just read "TC4C"???   That has been tripping me up a bit..

Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 11:08:40 AM
Maybe this from Phidgets?
http://www.phidgets.com/products.php?category=13&product_id=1062_1

controlling this from Phidgets?
http://www.phidgets.com/products.php?product_id=3314
Title: Re: Coming around to automation
Post by: Chert on June 15, 2017, 11:54:05 AM
Brilliant, thanks.
I'm on it....

One question:  when threads like that one say "Arduino", can I just read "TC4C"???   That has been tripping me up a bit..

Arduino is a family of microcontrollers.  Uno, Mega, nano, various versions.  TC4 is the piece JimG and others developed to interface via the Arduino Uno (One has to mount the TC4 board, onto the Arduino Uno) so that temperature readings can be taken and PWM signals transmitted.  TC4C is a standalone board that has Arduino chipset and pin connections along with the TC4 parts on one board.  I hope that clarifies.
Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 12:52:54 PM
I think so.  Thanks.

Title: Re: Coming around to automation
Post by: beananimal on June 15, 2017, 01:22:38 PM
If you are connecting to an SSR, just buy one that has zero cross detection function.  I found mine at Platt electrical supply company for less than $50.
This sounds plausible for me. But in the TC4C wireing diagram there are:
A SSR 2425 with ZCD for electrical heating
A SSR 2425_10 without ZCD for AC-fan
and this separate ZCD additionally.
I don't know the difference if you skip it.
Title: Re: Coming around to automation
Post by: beananimal on June 15, 2017, 01:37:33 PM
@Susan:
My hope is, that with some understanding of the TC4 basis (Arduino) I can better adapt the parameters or code for my stepper, and fan.

And the question for the far future is: what about that software PID in Artisan?
Title: Re: Coming around to automation
Post by: SusanJoM on June 15, 2017, 07:41:06 PM
So in everything I read about Arduino they talk about 'sketches'.  Are sketches basically programs ?  scripts ? flowsheets maybe? 

The hardest thing about learning something new is there is always an entirely new vocabulary to learn.
 ???
Title: Re: Coming around to automation
Post by: beananimal on June 15, 2017, 11:08:15 PM
Yes
That is also my understanding about Sketches .
(And Python is a programming language, but not for the Arduino)
Title: Re: Coming around to automation
Post by: cgriffith on June 16, 2017, 05:50:26 AM
When working with arduino, you write small programs in a C-like language.  That program is called a "sketch".  The IDE then converts that to binary code the micro processor understands (compiles).  Then you upload that binary to the chips internal memory so it can run. 
Title: Re: Coming around to automation
Post by: SusanJoM on June 16, 2017, 07:05:39 AM
Thanks, guys.  Why they can't just call a program a program baffles me.  :-\ 
Title: Re: Coming around to automation
Post by: Chert on June 17, 2017, 11:43:51 AM
Two thoughts and a repeated word to the wise.

Automatic sensing of gas and air settings by artisan while one manually controls the roast is appealing.  If artisan fails - as it did for me three times today - the roaster can still salvage and possibly match the intended profile pretty closely.  (My TC4 LED continues to post temps even when the roasterscope is belly up.)

Automatic adjustment of settings via artisan is also appealing and more hands off, and may allow for PID like hugging a preset profile.  Way cool and possibly achieving a better roast, maybe not.  However with that type arrangement the roaster might waste beans when artisan doesn't cooperate.  OR one could built into the design, a failsafe manual control, not just a failsafe manual shutoff.


And as always NEVER leave a HUKY out of sight while roasting on it.
Title: Re: Coming around to automation
Post by: beananimal on June 18, 2017, 07:20:54 AM
It seems that my hot-start on automation will be in August, after MLG summertime.
Here a statement from greengardian, about automation:
So the ZCD is mandatory, at least for AC.

https://forum.homeroasters.org/forum/viewthread.php?forum_id=133&thread_id=3322&pid=59635#post_59635
 (https://forum.homeroasters.org/forum/viewthread.php?forum_id=133&thread_id=3322&pid=59635#post_59635)

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. https://github.co...nQ_PID_6_0

Or direct zip file download here. https://github.co...p?raw=true
Title: Re: Coming around to automation
Post by: SusanJoM on June 19, 2017, 10:22:05 AM
And this just in from Brian Burley (Phidgets) regarding kPa control

Generally I'd recommend a bipolar motor as they are better all around though the controller is more expensive and not multi-channel.  For reference:

http://www.phidgets.com/products.php?category=23&product_id=3323_0
http://www.phidgets.com/products.php?category=13&product_id=1067_0
Title: Re: Coming around to automation
Post by: monkey_lever on June 20, 2017, 12:42:18 PM
If you need some help either with the TC4 or the stepping motor feel free to contact me I can provide with some pictures of the wiring for the TC4 or the code python code for the motor.

I did not try to modify the TC4 code to connect the motor to the TC4. The artisan call program feature is easier to setup.

Rgds.
Title: Re: Coming around to automation
Post by: Chert on June 20, 2017, 01:31:22 PM
If you need some help either with the TC4 or the stepping motor feel free to contact me I can provide with some pictures of the wiring for the TC4 or the code python code for the motor.

I did not try to modify the TC4 code to connect the motor to the TC4. The artisan call program feature is easier to setup.

Rgds.
  Would you suggest that the call program feature could be utilized with other hardware such as phidget or other stepper motor controller?  And thanks for your input.
Title: Re: Coming around to automation
Post by: monkey_lever on June 20, 2017, 02:50:26 PM
Chert.

Im not familiar with the phidget communication protocol. But the call program philosophy is that you can send and receive serial commands between artisan and any device.

Example:

I have some buttons that call a python file like this one:

- C:/Python27/python.exe C:/Huky_phyton/Phyton_1.py MOTOR 30.  The button send a serial command that correspond to 30 % of the total gas KPA.

- The python_1.py writes a serial command to the arduino and the arduino moves the stepper motor.

In summary if you can send commands to the serial of the phidget or the stepper motor you can control it with artisan.





Title: Re: Coming around to automation
Post by: beananimal on July 10, 2017, 12:08:02 PM
Thanks for checking, and I'm sure others are interested, but my push towards automation has stalled.
Hello Susan,
a bit sad to hear this.

I am just hoping that you stay curious, and can stick to the role of the catalysator,
because I find every day that it will be a long way till contoling the Huky
and the frequency of posts here might be slow.
stay tuned
Title: Re: Coming around to automation
Post by: phischmi on July 11, 2017, 04:28:23 AM
Hey all,
didn't had the time to chime into this discussion sooner, but there's one thing i altered in my Arduino-Software regarding the gas-control via stepper.

I posted my ideas on controlling the fan and gas in this topic
https://www.hukyforum.com/index.php/topic,1080.0.html

After changing from pre-defined buttons (gas = 0%, 25% ... 100%) to sliders (for use with Artisan's PID) i had to alter my code to work with sliders.
This is easily done using the MultiMap function in your Arduino code.
https://playground.arduino.cc/Main/MultiMap

This function allows to interpolate values. You just have to determine two arrays which tell the function, how many steps to go to reach a pre-defined gas-flow.

E.g.
Code: [Select]
int in[]= {0,25,50,75,100};
int out[] = {0,350,450,650,950};

This means, the stepper has to go 650 steps to achieve approx. 75% of gas-flow.
With the above function and those arrays you can easily pick any value from 0-100%.

Maybe this helps :)

BTW
I'm still using the Noctua DC-Fan, which i can easily set to any desired value using the Arduino and PWM. Though i'm very interested in your thoughts using an SSR and the original AC-Fan.


Regards

Philipp
Title: Re: Coming around to automation
Post by: monkey_lever on July 15, 2017, 02:13:23 PM
Philipp.

Thank you for your suggestion. I'll try the multimap function next time I play with the arduino code.

Can you explain how you setup artisan PID function to work with aruino?

Regards.
Title: Re: Coming around to automation
Post by: slickrock on July 15, 2017, 10:47:05 PM
Oh thank you.  I love this line of inquiry....someday with all your help I may even understand it.... ;)

Here's another thread that I haven't yet fully ingested, but that should be of interest to anyone else following me down the rabbit hole. http://www.home-barista.com/home-roasting/exploring-north-gas-roaster-automation-part-1-t47272.html

I should clarify that I'm not (yet....???) interested in following a background curve, or controlling a PID.  I just would like to be able to adjust kPa (most important) and maybe air (least important because I seldom change it at all) from Artisan....

Hi Susan,
Had some trouble getting registered on this forum for a while... been wanting to reply to this thread back when it got started.  When I wrote that post, I was actually thinking about the value of it to those who would want to automate any gas drum roaster; Huky included.

While it looks like there has been more traction going with a stepper motor approach, there are some clear advantages IMO to going with a proportional gas valve:


The downside is probably the additional cost.  But the plumbing can be far simplified compared to what I showed on my post, which in hindsight was over-designed. I plan to add another post that would provide a better explanation.

Cheers





[/list]
Title: Re: Coming around to automation
Post by: beananimal on July 16, 2017, 05:22:30 AM
Hello @slickrock , happy to see you here.  :)

After Susan starting this topic, my clear hope and target is to have a comforable Huky by end of the year. Either a semi-automatic or a nice follow the curve version

You mentioned the cost -yes- but for me the blocking points were
- finding a valve for use in Europe ( spent weeks last year to get a Maxitrol Exa and failed)
- beeing a bit shy about gas installation
- lack of understanding of the necessary programming

So a stepper motor moving a knob is by far not elegant, but it is achievable and you work on low voltage and don't have to touch the gas system.
Both is reassuring if you are tinkering and need a trial and error phase.

I am very keen on your second post showing a siplified version,
assuming it will be based also on the Clippard EVP, as I (and several friends) failed to find any alternative.
peter