Author Topic: roaster control widget  (Read 56418 times)

Offline mp

  • Standard User
  • *****
  • Posts: 16800
  • Nothing like a nice shot!
Re: roaster control widget
« Reply #60 on: January 15, 2009, 03:45:13 PM »
Ok, enough rambling... hopefully there's food for thought in there somewhere. :)

Yeah ... that was exactly what I was going to tell Milo.

 :D
1-Cnter, 2-Bean, 3-Skin, 4-Parchmnt, 5-Pect, 6-Pu
lp, 7-Ski

milowebailey

  • Guest
Re: roaster control widget
« Reply #61 on: January 15, 2009, 09:25:50 PM »
Yes... both... I'm probably going to do the roast logging pc first so I can visually see what's going on with the PID... then once I get that figured out, then I will probably build a self-contained unit with (hopefully) some flexibility but standard curves...

That's a good plan. I'm sure you've already given this some thought but here's my take on monitoring/control and how it relates to the profile methodology problem...

Monitoring is central to just about everything else, so it's probably a good idea to get the thermometry interface up and running before anything else. I don't know what your dev environment is but if you can use C# (mono on linux), there's an open source grapher called ZedGraph that's great for time-temp plotting duties. I don't use Java much these days so I can't give a specific recommendation for a grapher on that side but I know there's a wide selection. Whatever you use, you'll find that a real-time (or near real-time anyway) time-temp plot on screen is invaluable for troubleshooting and visualization. Also, collecting temp samples on a background thread that's independent of the UI is a good idea - it's better to have the UI's representaton of the data lag reality a bit than have artificial delays in the data stream caused by UI latency.

Control: once you have monitoring up and running, a good next step is to add manual control capability to the UI that displays your time-temp plot (the control panel, so to speak). I would start off simple and not worry about PID initially. Think in terms of power level - you could have a slider control in your UI that goes from 0% to 100% and has ticks every 10%, for instance. You already know that the sono control logic uses a 21 second duty cycle so it should be pretty easy to map proportional time to power level - a background thread could periodically wake up and cycle power on-off as appropriate according to the time mapping vs. current power setting. Of course, you could skip the manual control step altogether and go right to PID control but be prepared to spend LOTS of time getting the PID response dialed in. Personally, I prefer to hold off on that sort of fine detail work until the rest of the system is stable - but that's just me.

The nice thing here is that once you've written the code to support monitoring and translating control panel input requests into burner control commands, you basically have 90% of what you need to support automated profile control. The only thing left to do is define "profile" in the context of the automated system. The intuitive approach is to define profile as a series of control segments. There are a handful of commercial examples to draw from here, including the Ambex software and the Hottop P. Each control segment typically represents a time- and/or temperature-constrained instruction for the control system. An inherent weakness of the typical automated profile, of course, is that the segments are fixed and don't accomodate variations or overrides very well. This is mitigated somewhat if you can make simplifying assumptions about the roast environment - for example, the sono stock profile is based on a fixed load size. A more sophisticated, general purpose approach might incorporate rate-of-change instructions and event-based segment transitions (rather than time or temp) to address some of those limitations but, of course, this increases complexity.


Ok, enough rambling... hopefully there's food for thought in there somewhere. :)
John....wow thanks...... lots in this to chew on... I agree that monitor and control is key... I'm a C programmer (old guy) but there is a lot of code out there that I can steal borrow.  I'll look into the Zedgraph... the control will be simple..... heat on... heat off.  The sono is simple that way.  I plan to measure bean temp and exhaust temp (sono currently only measure exhaust).  From there figure out a control scheme... Segments would be pretty easy to code, but the interface seems ugly....

 my thinking is to somehow implement an sigmoid curve where each half of the curve's slope can be adjusted independently... shouldn't be too difficult to code...and if the slope and time is all that would change the user interface should be simpler than segments. The PID, will certainly be last... once I define the curve.....it should be easy to code.... as I've found it already.    Then refine the P. I. and D values.... although I may make those variable to the user too.

So much fun, so little time... 

johnr

  • Guest
Re: roaster control widget
« Reply #62 on: January 16, 2009, 06:43:40 AM »
I'm a C programmer (old guy)

Damn, I just got hit by shrapnel! I started life as a C guy (I still have my original copy of K&R) and learned C++ during the "standards war" years of the early 90's (anyone remember how kickass Borland C++ was before 4.0?). :P But I digress...

I like the sound of the sigmoid curve approach - it would certainly solve the segment usability issue. Keep us posted!

milowebailey

  • Guest
Re: roaster control widget
« Reply #63 on: January 16, 2009, 06:50:29 AM »
(anyone remember how kickass Borland C++ was before 4.0?). :P 

I was a Borland guy all the way...  probably still have some pre 4.0 disks around.

sorry for the shrapnel!

milowebailey

  • Guest
Re: roaster control widget
« Reply #64 on: January 21, 2009, 05:04:44 PM »
Just an update on the milowidget... after a battle with C#.... just enough different for it to be a pain from C++.... anyway, I made some progress.  I can now monitor and log in real-time bean temperature....now to see how sonofresco profiles really are.  I may have to kill a few beans in the process but I think I have a few pooches in my stash.

Here is a screenshot of the temp display.


Offline mp

  • Standard User
  • *****
  • Posts: 16800
  • Nothing like a nice shot!
Re: roaster control widget
« Reply #65 on: January 22, 2009, 04:27:28 AM »
Looking good Milo ... is that temperature in Fahrenheit or Celsius? 

Even if it was Celsius ... isn't it kind of low to roast beans?

 ???

1-Cnter, 2-Bean, 3-Skin, 4-Parchmnt, 5-Pect, 6-Pu
lp, 7-Ski

milowebailey

  • Guest
Re: roaster control widget
« Reply #66 on: January 22, 2009, 06:39:25 AM »
Looking good Milo ... is that temperature in Fahrenheit or Celsius? 

Even if it was Celsius ... isn't it kind of low to roast beans?

 ???


Fahrenheit.... room temperature and temperature of my hand... holding the thermocouple.  I plan to measure one roast on the sonofresco tonight.  I'll post a screenshot of the profile.

Offline mp

  • Standard User
  • *****
  • Posts: 16800
  • Nothing like a nice shot!
Re: roaster control widget
« Reply #67 on: January 22, 2009, 07:07:35 AM »
Fahrenheit.... room temperature and temperature of my hand... holding the thermocouple.  I plan to measure one roast on the sonofresco tonight.  I'll post a screenshot of the profile.

Ahh ... ok ... got you.  Look forward to that.

 :)
1-Cnter, 2-Bean, 3-Skin, 4-Parchmnt, 5-Pect, 6-Pu
lp, 7-Ski

Offline peter

  • The Warden - Now Retired
  • Retired Old Goats
  • **
  • Posts: 14519
  • Monkey Club Cupper
Re: roaster control widget
« Reply #68 on: January 22, 2009, 09:00:21 AM »
Dude!

That graph confirms my long-held suspicions; Milowebailey is one cooool dude.
Quote of the Day; \"...yet you refuse to come to Me that you

Offline grinderz

  • Standard User
  • *****
  • Posts: 3442
  • No unjacked threads!
Re: roaster control widget
« Reply #69 on: January 22, 2009, 10:09:47 AM »
Dude!

That graph confirms my long-held suspicions; Milowebailey is one cooool dude.

LOL! 

My wife an I are engaged in an eternal battle over the thermostat.  I often call her my sweet endotherm (it sounds better than lizard or snake  ;D)
var elvisLives = Math.PI > 4 ? "Yep" : "Nope";

Offline mp

  • Standard User
  • *****
  • Posts: 16800
  • Nothing like a nice shot!
Re: roaster control widget
« Reply #70 on: January 22, 2009, 10:57:59 AM »
My wife an I are engaged in an eternal battle over the thermostat.  I often call her my sweet endotherm (it sounds better than lizard or snake  ;D)

Nice to know that we are not the only couple engaged in that battle.

We seem to have come to a truce ... at least temporarily at 20 degrees Celsius ... for Peter that is 70 degrees Fahrenheit.

 :)
1-Cnter, 2-Bean, 3-Skin, 4-Parchmnt, 5-Pect, 6-Pu
lp, 7-Ski

Offline peter

  • The Warden - Now Retired
  • Retired Old Goats
  • **
  • Posts: 14519
  • Monkey Club Cupper
Re: roaster control widget
« Reply #71 on: January 22, 2009, 11:25:49 AM »
My wife an I are engaged in an eternal battle over the thermostat.  I often call her my sweet endotherm (it sounds better than lizard or snake  ;D)

Nice to know that we are not the only couple engaged in that battle.

We seem to have come to a truce ... at least temporarily at 20 degrees Celsius ... for Peter that is 70 degrees Fahrenheit.

 :)

I have yet to meet a couple that doesn't contend with t'stat differences.

Tell your wife that's way too warm.  She's contributing to global climate change.   SHHEEEEESH!  She may as well start using aerosol spray paint!  Tell her to lay off the kefir too; leads to flatulence, which leads to temp swings.
Quote of the Day; \"...yet you refuse to come to Me that you

milowebailey

  • Guest
Re: roaster control widget
« Reply #72 on: January 22, 2009, 12:22:35 PM »
My wife an I are engaged in an eternal battle over the thermostat.  I often call her my sweet endotherm (it sounds better than lizard or snake  ;D)

Nice to know that we are not the only couple engaged in that battle.

We seem to have come to a truce ... at least temporarily at 20 degrees Celsius ... for Peter that is 70 degrees Fahrenheit.

 :)

I have yet to meet a couple that doesn't contend with t'stat differences.

Tell your wife that's way too warm.  She's contributing to global climate change.   SHHEEEEESH!  She may as well start using aerosol spray paint!  Tell her to lay off the kefir too; leads to flatulence, which leads to temp swings.
Unfortunately... or maybe fortunately Mrs. Milowebailey is going through "Physical Midlife Changes" and is often hot too... When that happens we are at about the same comfort level.... then she swings back to the sweet endotherm side and requires additional heat sources...

But the battle over the thermostat is never-ending.

The chart came from a time when she was not an endotherm.....

milowebailey

  • Guest
Re: roaster control widget
« Reply #73 on: January 22, 2009, 04:52:54 PM »
Well here is the profile curve for setting #5 in my sonofresco.  I did stop it at ~450 degrees.  the spikes to zero are a software bug while reading the USB port... but you get the idea of when heat is on and off.... they turn it on and off often.   I'll add a few photos of the setup too.

The temperature probe is the yellow wire down in the roast chamber.  From my experience it's about 7 - 9 degrees hotter than bean temp as 2nd crack happens close to 452 degrees.

Offline J.Jirehs Roaster

  • Standard User
  • *****
  • Posts: 2613
Re: roaster control widget
« Reply #74 on: January 22, 2009, 06:27:24 PM »
The thing I want to know is....

does the gift basket on the back of the roaster change seasonally or is it just a temporary anomaly  ;)


seriously... That is cool Mr. bailey...   when you are ready to distribute kits, you let me know and I can start on the logo... or packaging design.. or anything that earns me enough points to afford one  :-X