Results 1 to 15 of 15

Thread: Arduino PID for some uber-geeky DIY

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Location
    Sydney
    Posts
    12

    Arduino PID for some uber-geeky DIY

    Gene Cafe Coffee Roaster $850 - Free Beans Free Freight
    Hello CSers

    Has anyone has taken any steps down the DIY-arduino route for a PID?

    This guy has done a pretty cool (and geeky) setup with his Silvia:
    EDIT: cant post a link because Im new, but search for "Arduino and Silvia: Two Italians, One Tangled Affair" its a blog on blogspot
    (feel free to paste a link below, as I cant yet do this)


    ( Oh, and hello, Im new to CS! )

    I do tend to enjoy rolling my sleeves up, pulling things apart and nerding it up a bit, so this project looks like a pretty cool way to get a PID setup. Have any of you attempted something like this?




  2. #2
    KJM
    KJM is offline
    Senior Member
    Join Date
    May 2007
    Posts
    688

    Re: Arduino PID for some uber-geeky DIY

    GDay Penguin. Welcome!

    Ive implemented a lot of PID control in microcontrollers used for various things, but this is one Id personally steer away from. Doing this with an Arduino means you need to get +5V to the board. Which means a power supply inside Ms. Silvia with the associated minor hassle of making it waterproof etc.

    In contrast - the standard PID box you get (1/32nd DIN size) lives off 110-240VAC ;) It also looks nicer than a home-made thing is likely to look - and is pretty cheap. The other nice thing is that they are set up for thermocouples (with cold junction compensation) or PT-100 probes.. Just a thought.

    The downside is that it is simply a lot less fun from an engineering point of view...

    /Kevin

  3. #3
    Senior Member
    Join Date
    Sep 2011
    Posts
    395

    Re: Arduino PID for some uber-geeky DIY

    if it were in an external box, yes, I would consider this, however, yeah, internal? with water? errr.. No

    Especially with high heat wafting from the boiler onto that top-plate.

  4. #4
    Site Sponsor coffee_machinist's Avatar
    Join Date
    Jun 2011
    Posts
    683

    Re: Arduino PID for some uber-geeky DIY

    http://arduino.cc/playground/Main/BarebonesPIDForEspresso

    :)

  5. #5
    Junior Member
    Join Date
    Jan 2012
    Location
    Sydney
    Posts
    12

    Re: Arduino PID for some uber-geeky DIY

    Yeah Im not sure about the practicality of having to stuff all the gear inside with the boiler, but as a project, it would certainly be pretty cool. I wouldnt stick a wii nunchuck on it though, but network attachment would mean that one could potentially control it from a smart phone... hmmm.

    In reality I think Ill almost certainly just get a PID kit, but I do rather like the idea of creating something from scratch. Maybe oneday...


  6. #6
    Senior Member
    Join Date
    Sep 2011
    Posts
    395

    Re: Arduino PID for some uber-geeky DIY

    if I were to play with Arduno, itd probably be hooked up to a roaster/PID setup.

    Though, I did notice that this particular PID does have a timer on it, Perhaps some form of auto-on? which is a nice touch compared to the "have to switch it on manually"

    Given how flexable Arduno is, Id imagine you could set the timer for different days to have different on times...

    Of course, This is all dependant on various factors like "is there water in the tank Y/N?" ;)

  7. #7
    KJM
    KJM is offline
    Senior Member
    Join Date
    May 2007
    Posts
    688

    Re: Arduino PID for some uber-geeky DIY

    The other interesting thing in this context is the way the control regime can work. PID control really isnt needed in the context of an espresso machine. At all. A simpler PI or even straight P control regime will work and will work well.

    You can even control it very tightly if you can measure the outgoing flow, and know the input temperature... then youre just doing the math on latent heat.

    Quote Originally Posted by 273C363E0A373A3B31550 link=1327274463/3#3 date=1327309805
    http://arduino.cc/playground/Main/BarebonesPIDForEspresso
    The problem with that code is what typifies most of the code written for the Arduino target :( If you look at the inner code for the PID algorithm youll see theyve used floating point arithmetic :o , for example. The PID algorithm just takes arbitrary inputs from the temperature sensing (these will probably be 10bit integers) and generates an arbitrary stimulus output - which is in an integer. The magic constants for the P, I and D terms are likewise somewhat arbitrary things. By convention, we would write them as numbers like 0.1, but in the control loop all this stuff is done perfectly adequately with integer arithmetic. It does take a while for my students to fully grasp this point, but the performance of the system leaps forward once you do!

    /Kevin

  8. #8
    Senior Member
    Join Date
    Oct 2011
    Posts
    1,376

    Re: Arduino PID for some uber-geeky DIY

    Do you teach process control or electronic engineering KJM?

    I looked around for a ramp controller for a roaster project, but commercial units with analog output are a bit excessive (in $ and build) for what I need. Looking into an arduino based design to see if I can implement the ramp functionality at a reasonable cost.

    Bit of a stretch of my knowledge of electronics though...

  9. #9
    KJM
    KJM is offline
    Senior Member
    Join Date
    May 2007
    Posts
    688

    Re: Arduino PID for some uber-geeky DIY

    Quote Originally Posted by 0C330B20222A410 link=1327274463/7#7 date=1327557337
    Do you teach process control or electronic engineering KJM?
    Techincally Im a software engineer, but Im also an electronics person ;) While my primary interests might be something like computer security, I have a 20+ year background in embedded systems. So I do process control a bit ;D For my sins I do teach final year students control :(

    Quote Originally Posted by 0C330B20222A410 link=1327274463/7#7 date=1327557337
    I looked around for a ramp controller for a roaster project, but commercial units with analog output are a bit excessive (in $ and build) for what I need. Looking into an arduino based design to see if I can implement the ramp functionality at a reasonable cost.
    Im not real sure what youre asking here. You can get plenty of ramp/soak PID units at quite reasonable cost (say $75 or so).

    Analogue output?? I cant imagine what you want that for. If youre talking roasters, you definitely want an on/off PWM control regime (assuming it is electric, I dont do gas ::)). If youre worried about the heater going off, and then the roast "stalling" because it is getting cold air then you should look into the reality of what actually happens. The real world does not have infinite rates of change of anything, so you will get smoothing of the response. Plus, if you time it right, you will get no measurable temperature drop in the chamber.

    Anyway, an Arduino solution would be pretty straight forward - maybe $60-70 for the board, $20 for the PSU. The code would be trivial. But the whole shebang is available for less cost (check Auber Instruments, for example).

    /Kevin

  10. #10
    Senior Member
    Join Date
    Oct 2011
    Posts
    1,376

    Re: Arduino PID for some uber-geeky DIY

    Yeah actually looking at air heating for a fluidised (spouted) bed actually. Given the kind of element I wasnt sure how well on/off control would maintain the inlet air temperature.

    Also looking at a way to control the airflow/bed dP as the bean density changes (perhaps a type of actuated control valve).

  11. #11
    KJM
    KJM is offline
    Senior Member
    Join Date
    May 2007
    Posts
    688

    Re: Arduino PID for some uber-geeky DIY

    Quote Originally Posted by 7F4078535159320 link=1327274463/9#9 date=1329199843
    Yeah actually looking at air heating for a fluidised (spouted) bed actually. Given the kind of element I wasnt sure how well on/off control would maintain the inlet air temperature.
    PWM will work just fine. It does, however, depend on the response time of the temperature sensor and heater. Obviously if the sensor is too slow there will be trouble. The archetypal K-thermocouple sensor will be plenty fast enough. Assuming you have the usual nichrome wire heater thatll work too..

    Quote Originally Posted by 7F4078535159320 link=1327274463/9#9 date=1329199843
    Also looking at a way to control the airflow/bed dP as the bean density changes (perhaps a type of actuated control valve).
    Not sure how youd measure the bean density change. Before I decided to mechanically fluidise the bed, the solution I came up for the problem of the beans spouting a bit too far was going to be a limit sensor of the optical kind. So you ramp the fan and control it via feedback from a "light beam" type device. I never actually built this, but it seemed like the most-likely-to-work solution provided I kept the "window" clean.

    /Kevin

  12. #12
    Senior Member
    Join Date
    Oct 2011
    Posts
    1,376

    Re: Arduino PID for some uber-geeky DIY

    Cheers for the advice. I was planning on using a k-type thermocouple and nichrome wire; I was actually a bit worried that the response time of the nichrome would be so quick that the unit wouldnt be able to switch quick enough (and it would be too hot).

    I havent gone too far down the track with this yet (as I figured Id spend some time learning about roasting with a popper first - which incidently I think could be modified for spouting). I had however wondered if I might be able to (even if loosely) correlate outlet temperature (and thus bed temperature) to bean density/flowrate required for spouting, i.e. when the beans are halfway to the end temp, the flowrate is reduced to halfway from max to min.

    I figure this should be slow enough to no cause any strange feedback effects with the temperature control loop.

    It would just require some trial and error, but will largely be dependent on how narrow a flow/dP range will still acheive spouting.

  13. #13
    KJM
    KJM is offline
    Senior Member
    Join Date
    May 2007
    Posts
    688

    Re: Arduino PID for some uber-geeky DIY

    My first roasters were poppers ;) I basically modelled my "next" on those - to solve the excess elevation of the lighter beans I think a simpler solution is to have a longer "tube" they can fly up.

    My plans for a bigger roaster of this ilk were roughly in line with seedlings roaster. I was planning on the "electric eye" sensor system to control the fan oomph but youve got some problems if do go down this path.

    Nichrome heaters get hot :o and you probably want there to be a minimum airflow to keep the heat down. As you reduce the airflow to stop the lovely bean fountain, youll start to blow hotter air (the PID control loop will deal with this to a certain extent - so it isnt necessarily fatal). The gain constants in your PID loop are supposed to be constants - the thing is tuned to a particular heat transfer function if you like. So futzing with the airflow will screw around with this to a certain extent.

    I have to point out too that the fan noise from my very rough prototype box (it used a leaf blower) was a bit on the high side. I figured hearing FC and SC would be a challenge. Not wishing to discourage of course - there are better ways of making high speed air (squirrel cage fans being an example).

    /Kevin

  14. #14
    Senior Member
    Join Date
    Oct 2011
    Posts
    1,376
    Well, I'm back down this path (and oddly, had forgotten about this thread!).

    Just picked up a osPID ,an SSR and a k-type bead themocouple. Planning to modify one of my poppers to control the heat output from the nichrome element (measuring air between the element and the roasting chamber as the PV).

    I was looking at an Auber ramp/soak PID controller for basically the same cost, but the ability to tinker with the osPID, and also set it up from my PC sold me (that, and the fact it ships from KL instead of the US).





    Hoping to figure out a way to share it with my fermenting fridge, and maybe my espresso machine down the track (as some kind of "plug in" external unit).

    KJM - I'm interested in your comments about the PID algorithm. I'm no programmer (but have some experienced with coding in a few languages); is the problem simply one of resource usage, or is there some underlying flaw? Just how big a hurdle is it?

  15. #15
    Senior Member
    Join Date
    Oct 2011
    Posts
    1,376
    Behmor Brazen - $249 - Free Freight
    Digging this out again. On Friday I managed my first spouted bed roast; It was a very basic proof of concept that required a roll of aluminium flashing, a couple of copper pipe fittings, a lantern glass, some aluminium tube and a cheap adjustable heat gun (with a somewhat anaemic fan).
    It was only 40g roasted, but it was the most exciting roast Ive done! Have learned enough from that roast to plan a more precise and well constructed version, and have possibly got a non-electronic solution to controlling the airflow Now I just need a couple more heat gun fans...



Similar Threads

  1. Victoria Arduino Venus
    By gyeniceri in forum SOLD
    Replies: 1
    Last Post: 11th November 2011, 11:39 PM
  2. Uber
    By Brian13 in forum Brewing Equipment - Manual Coffee Brewing Processes
    Replies: 14
    Last Post: 12th August 2010, 11:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •