Become a supporter to remove this ad

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Electronics/Process control help - Temperature Control

  1. #1
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Electronics/Process control help - Temperature Control

    Hey all,

    I'm messing about designing myself a coffee roaster, but have hit a bit of a stumbling block when it comes to temperature control. I've studied some process control at uni, so I've got a bit of an idea; but a few days of googling looking at commerical PLCs/PIDs and the like have left me a bit dazed and confused. I know there are a few people here who know their stuff with electronics/automation, so I'm hoping someone can point me in the right direction.

    Basically I'll be using a heating element to heat an air stream (ramping up from room temp to 200C +).

    The heating element is a pretty simple resistance unit (something like these: Tutco-Farnam :: Inline Heaters).

    I plan on controlling the temperature by variation of the output of the heater (and may need to look at some means to control the airflow too), using thermocouple temperature sensors for input.

    Since the flow is continuous, an on/off termostat type or relay output controller is basically useless.

    I've been looking at PID controllers which allow ramp/soak and which have variable voltage output, which seems like it would do the job; unfortunately these are industrial units with prices to match, and I've got no idea if they will even operate as a stand alone unit.

    Ideally I'd love to find some kind of circuit that will plug into a laptop, and vary the power output of the heater based on outputs from an open source process control software... (but I think I'm probably dreaming there!).

    Can anyone point me to in the right direction? I'm well prepared to spend some time reading and learning.

    Thanks in advance!

    Troy
    No amount of genius can overcome a preoccupation to detail.




  2. #2
    Member DTee's Avatar
    Join Date
    Sep 2009
    Location
    Perth
    Liked
    0 times
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about an Arduino, with a couple of thermocouples/thermistors on the analog pins, controlling a Triac (or two) to vary the power to your heater/fan?

    The software should be simple enough for a coffee roaster that you should be able to do it all on the Arduino, without need for an external PC (unless roasting coffee is way more complex than I imagine).
    Quote Originally Posted by The Wolf
    That's thirty minutes away. I'll be there in ten.

  3. #3
    Member Sentry's Avatar
    Join Date
    Jul 2007
    Location
    -
    Motorbike
    -
    Liked
    3 times
    Posts
    4,922
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You don't necessarily need a controller with PI control (forget D, you wont need it for your application). PI is a maths function and can be replicated as a maths function, so this opens the doors a little to what controllers you can use.
    If you're looking into modulating a heater output, look into Pulse Width Modulation on Solid State Relays in a closed loop system. We use this principle to modulate the heating of Supply Air paths.

    A quick Google search found this: TechTeach: SimView

    As said before; Arduino are a good bit of kit, but I don't know how you'd go with the input requirements for a SSR; you'll have to look into this yourself.

    I've not done coffee roasting before
    , but can't you use a conventional oven for this process? Also, if you're heating a box, could you not maintain the Temperature in the enclosure using thermostatic control inside the box rather than modulate the heating? If you can get away with it, simple is always the best; it tends to fuck up less. I'd like to hear you're answer to these as you've peaked my interest now


    Last edited by Sentry; 28-09-2011 at 11:33 PM.

    "Always out-numbered, never out-gunned"

  4. #4
    Admiral Ackbar Captain Starfish's Avatar
    Join Date
    Oct 2006
    Location
    SOR, near the airport
    Liked
    475 times
    Posts
    22,423

    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Sentry: can't use a conventional oven: not quite hot enough, can't deal with the masses of smoke roasting coffee creates, no way of setting up the movement of the beans and you end up paying lots to heat 10x the volume needed.

    Sathid - fluid bed or drum? As far as the control goes, I've been toying with this as well and kinda hit my idea of the uber rig:
    1. Rolling drum type;
    2. Thermocouples in the middle of the drum and in the chimney.
    3. micro controlled, outputs to VSR for the fan motor and gas solenoid for the burner (I like gas).
    4. Minor variations driven by fan speed, when it ain't keeping up then shut down/start up the burner, if the exhaust over-temps or the difference between the two inputs exceeds "x" then shut the whole thing down.
    5. PC link is important because you don't necessarily want a continual temperature - you need to be able to adjust the temp through the roasting process. Full burn up to the first crack, then back off 40 degrees, bringing it slowly back up to 2nd crack. PC interface means you can program the profile a lot easier.
    6. Given the two cracks sound different, I'd love to add a mic and some signal conditioning as a third input!

    Arduino is probably the simplest, set up with a serial/usb input, opamp input on the thermocouples and two triacs for output: one gets a PWM input for the fan motor, the other gets an on/off for the heater.

    :edit: Algorithms - you'll find many on the web. Easiest one (which is what I'd start with) is something like:
    1. Sample twice a second or something like that.
    2. Roll your samples through two 5 second (10 sample) circular buffers.
    3. Use the average of the first buffer as your current value (P), the sum of (the difference between each sample and the average) as your integral (I), and the difference between the average of the 1st and 2nd buffer as your differential (D).
    4. Get everything set up and run it from room temperature with the fan shut off or only ticking over and the heater going full blast. This gives you your impulse response or transfer function. You know how long it will take to get from A to B and, from there, can work out your coefficients for P,I and D. (this is your soak)
    5. Get roasting!

    Of course, you could go even simpler - just watch the sliding window's average, add a little hysteresis (+/-10 degrees or so?) and simply switch the output to the heater based on that. Not a bad way to start and you might find it does the job nicely.
    Last edited by Captain Starfish; 29-09-2011 at 07:22 AM.
    Captain Starfish is currently pimping:
    Need your home theatre installed? MS Tech
    Looking for awesome walls in your house? Custom Walls
    Like scuba diving? UWA Underwater Club

  5. #5
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies guys; I'll have a closer look this afternoon.

    But in answer to your question Captain Starfish - Spouted bed.
    No amount of genius can overcome a preoccupation to detail.




  6. #6
    Member Crobbo's Avatar
    Join Date
    Mar 2010
    Location
    Dianella
    Motorbike
    XR400
    Liked
    26 times
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you had a look at the omron gear?

  7. #7
    Member chew's Avatar
    Join Date
    Aug 2005
    Location
    Rivervale
    Liked
    147 times
    Posts
    5,088

    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    They hung a sign up in our town "If you live it up, you won't live it down"-Tom Waits

  8. #8
    Member DTee's Avatar
    Join Date
    Sep 2009
    Location
    Perth
    Liked
    0 times
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you end up going the Arduino route, my new favorite piece of kit is the Teensy.

    Teensy USB Development Board

    The Teensy's AVR has native USB, so you can do full 12MBit USB comms to a host PC, rather than 38.4kbps that an Arduino is limited to (probably not a concern with a coffee roaster). They are really small, and fit on a breadboard nicely. The Teensyduino add-on lets you load Arduino sketches on them. I've bought one straight from the pjrc website and had no problems.
    Quote Originally Posted by The Wolf
    That's thirty minutes away. I'll be there in ten.

  9. #9
    Member g0zer's Avatar
    Join Date
    Sep 2004
    Location
    Perth
    Motorbike
    RZ250-R
    Liked
    130 times
    Posts
    10,321

    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Pico System

    ^all in one PLC + HMI + development software is free
    Quote Originally Posted by Bendito View Post
    If we get to a stop and we are missing a dozen bikes and you are last, it was your fault. Don't be that guy. No one likes that guy.

  10. #10
    Member g0zer's Avatar
    Join Date
    Sep 2004
    Location
    Perth
    Motorbike
    RZ250-R
    Liked
    130 times
    Posts
    10,321

    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sathid View Post
    coffee roaster
    temperature control PID

    heating element to heat an air stream (ramping up from room temp to 200C +).

    The heating element is a pretty simple resistance unit (something like these: Tutco-Farnam :: Inline Heaters).

    variation of the output of the heater using thermocouple temperature sensors for input.

    I've been looking at PID controllers which allow ramp/soak and which have variable voltage output
    to control the voltage of the heating element

    http://www.vespo.com/PDF/PAC15.pdf

    ^note the control input = 4-20mA this becomes your control variable

    you wire this to your PLC analog 4-20mA output and your 1P 240VAC heater element and code the PID loop simple.

    wire your 4-20mA thermocouple to the PLC analog input channel = process variable

    so you need a PLC with

    1x AI thermoocuple
    1x AO heater
    1x DO heater contacter
    1x DI heater contactor run feedback
    1x DO fan contactor
    1x DI fan contactor run feedback

    interlock to all FAULTS

    IF [FAN CONTACTOR] = 1 AND [FAN RUN FEEDBACK] /= 1 THEN LET FAULT = 1
    IF [TEMP] >= TEMP HIGH HIGH SETPOINT THEN LET FAULT = 1
    IF [FAN CONTACTOR] = 0 + [HEATER CONTACTOR] = 1 THEN LET FAULT =1

    you will need to be careful with your design, so it can never start a fire and burn your house down and kill your family.

    people often do stupid things for example:

    select thermocouple range = 0 to 250C
    scale PLC analog input channel 0 to 250C
    set high high temp setpoint = 250C
    restrict temp high high setpoint input range to full scale
    IF [TEMP] > TEMP HIGH HIGH SETPOINT THEN LET FAULT = 1 <--- now it is possible to set temp HHAL setpoint to 250C in which case the temperature interlock can never be triggered and it starts a fire, the alarm condition must be >=

    ^code error example

    also the physical design is important, the thermocouple should be located such that if the fan was to fail it will still trip to temp HHAL before it starts a fire. materials of construction suitable ect ect.

    there are other ways of doing it are you sure your method is cheapest to design and manufacture? if you have copied a commercial design it probably will be. personally i think a rotary kiln of appropriate length with constant heat and rotational speed, appropriately selected heating element that cannot overheat the physical design to damage ever but with adjustable angle on the kiln so you can control throughput and residence time of the bean would be cheaper ie: no PID and more reliable and cheaper ie: no variable power regulation required.

    if you need different temps at different places in the kiln, then you control this with the rotary kiln tube design ie: total length and strategic location of heater element and flue. ie: the lead in section is the drying section, burn off absorbed moisture then the high temp section, then the cool down section. the length of each section is a function of the residence time required for each part of the process.

    what is the specific heat of a coffee bean? dunno if that is in perry's. but you will need to model the energy balance that includes losses from your device to atmo. the process control is the easy bit. i see the roasting process switches from endo to exothermic, for a prototype rotary kiln just match the total length for the net total energy requirement and design it so you can move the element back and forth for fine tuning

    just use a stack with adjustable flue (drilled so it can never shut off air so much to start a fire) to control counter current airflow ie cold air comes in discharge end and is vented at the feed end.

    value engineering = cheapest and most efficient configuration to build and it should NEVER be able to burn your house down

    edit: extra credit if you design a feed hopper with flue gases directed through it and of batch size = to the energy of the waste gases generated during the batch, to drive off the moisture content

    edit: if using fluidized bed batch roast again i don't see a need for temp PID loop. select the bed thickness appropriate for your fluidized bed and temp requirements and the upflow air velocity according to stokes law and roast for timer setpoints. and a 2 step sequence (one for exothermic process and one for endothermic with different heater power for each step) with timer setpoint for each step. use relay/timer hard wired logic no need for PLC.
    Last edited by g0zer; 29-09-2011 at 11:27 AM.
    Quote Originally Posted by Bendito View Post
    If we get to a stop and we are missing a dozen bikes and you are last, it was your fault. Don't be that guy. No one likes that guy.

  11. #11
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the responses!

    I initially started out with a rolling drum type design with a modified configuration - a conical shaped drum with a auger type pickup at the larger end to pick up beans to transport them to the smaller end (an attempt to improve roast consistency).

    After messing about with that for a while, I realised that a fluidised bed design is, mechanically speaking, much, much simpler. Some further reading on the topic led me to spouted beds, as they don't require such a high flowrate, have improved heat transfer characteristics, and suit the batch size I'm aiming for. The fact that there isn't much literature about them, and seemingly almost nothing in the hobby or small scale roaster circles, makes it all the more interesting.

    I'm sure I can buy better roasted coffee; this project is about experimentation, and I think there is more room for that with this design (plus, it relates better to my field of engineering).

    Part of the reason I want to have control over temperature and flow is because the gas velocity and pressure required for spouting will vary as the bean density decreases during the roast, and I'll need to fine tune this for my particular roaster. Plus it gives me room to experiment with different roast profiles and flow regimes, and gives me a chance to mess about with process control.

    Planning to build the whole thing from metal, but cheers for the reminder about HH temp cutoffs; I'll make sure I give it plenty of consideration in the design.

    For the heating element, I initially thought of messing about with induction heating; but came to the conclusion that's just opening an even bigger can of worms.

    One of the other areas I've been having issues with, is finding a suitable blower. I'd like something small, preferably flow adjustable (although if the flowrate is close enough on a single speed blower I can probably use a valve/bypass to control flow). I built a test unit with a piece of PVC pipe and an air mattress pump; all was going well until i put too many beans in and experienced plug flow (i.e. beans everywhere!).
    No amount of genius can overcome a preoccupation to detail.




  12. #12
    Admiral Ackbar Captain Starfish's Avatar
    Join Date
    Oct 2006
    Location
    SOR, near the airport
    Liked
    475 times
    Posts
    22,423

    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Love to see this stuff! Prefer the mellower roast of a drum myself but always enjoy reading about these projects: plz keep us updated and WHERE ARE THE PHOTOS???
    Captain Starfish is currently pimping:
    Need your home theatre installed? MS Tech
    Looking for awesome walls in your house? Custom Walls
    Like scuba diving? UWA Underwater Club

  13. #13
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No build pics yet, so this will have to suffice...
    IMG_1264.JPG
    No amount of genius can overcome a preoccupation to detail.




  14. #14
    Admiral Ackbar Captain Starfish's Avatar
    Join Date
    Oct 2006
    Location
    SOR, near the airport
    Liked
    475 times
    Posts
    22,423

    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Chocolate, or is the crema coming from a really dark roast?
    Captain Starfish is currently pimping:
    Need your home theatre installed? MS Tech
    Looking for awesome walls in your house? Custom Walls
    Like scuba diving? UWA Underwater Club

  15. #15
    Member g0zer's Avatar
    Join Date
    Sep 2004
    Location
    Perth
    Motorbike
    RZ250-R
    Liked
    130 times
    Posts
    10,321

    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    imho minimize controlling things using analog loops and instruments. good process design same as code ideally is as simplified as possible. if you just want to experiment its your money

    fluid bed with thermocouples above and beneath bed T1-T2 respectively eg: 280C-250C depending on the flow rate of air and the thickness of the bed and analog fan rpm and heater power setpoints.

    heater power with respect to T2 would be a constant, and T1-T2 loses its point of reference on temperature scale so waste of time trying to loop control them i think.

    you cannot run both fan speed and heater power in loop at the same time controlling deltaT, it will be chaotic and will not tune. analog fan must therefore be done manual and loop control process variable = T1, control variable = analog output[heater power], setpoint = [T1]

    which would give high heater output when endothermic and reduce power when exothermic could work but will be a bloody expensive coffee bean roaster or a cheap diy PLC testbench i suppose. have you drawn the process and instrumentation diagram?

    re:
    control over temperature and flow is because the gas velocity and pressure required for spouting will vary as the bean density decreases
    the difference in bean density determines the upper and lower diameters of your spouted bed to control gas velocity, not the flow rate of your blower which can be constant throughout the process by virtue of a spouted bed that is a cone not filled to the top.
    Last edited by g0zer; 01-10-2011 at 09:07 AM.
    Quote Originally Posted by Bendito View Post
    If we get to a stop and we are missing a dozen bikes and you are last, it was your fault. Don't be that guy. No one likes that guy.

  16. #16
    Member chew's Avatar
    Join Date
    Aug 2005
    Location
    Rivervale
    Liked
    147 times
    Posts
    5,088

    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    They hung a sign up in our town "If you live it up, you won't live it down"-Tom Waits

  17. #17
    Member Sentry's Avatar
    Join Date
    Jul 2007
    Location
    -
    Motorbike
    -
    Liked
    3 times
    Posts
    4,922
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The maxim series controllers are relay outputs, so if he needs PWM he won't be able to use Innotech. If he used a fan with an analog signal, sure.

    Thanks for the info 2nd Lt. Starfish (I was going to say Major Starfish, but it sounds wrong).

    "Always out-numbered, never out-gunned"

  18. #18
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, I've been thinking about this some more.

    Given the sparse info about spouted beds with coffee beans, and some of the comments here, I think I should do some basic tests with manual control, before delving into automation.

    The available literature gives me a starting point for bed diameter, min/mas bed depth for spouting, and superficial gas velocity, but precious little else.

    I'll start with my pvc pipe setup and mess about with different parameters for both green and roasted beans, before moving on to a borosilicate glass roasting chamber and temperature profiling.


    So, with that in mind, I have come up with a possible air source - an old vacuum cleaner. Figure I can probably source one to pull apart fairly cheaply.

    So, in the short term I'll need a way to manually control the speed of a vacuum cleaner motor (fine tuning I can probably do with valves). Then I'll be looking to manually control the power output of the resistance heating coil and would like to be able to hook up a couple of thermocouples to my laptop to monitor (and log) temps upstream and downstream of the bed.

    It seems there are a fair few options around for the thermocouples, but any suggestions would be welcome. An idea of how to (safely) control a vacuum cleaner motor and the heating coil (with an analog control knob) would be appreciated. Keeping in mind my electronics knowledge is basic, and my skills with a soldering iron not much better
    No amount of genius can overcome a preoccupation to detail.




  19. #19
    Admiral Ackbar Captain Starfish's Avatar
    Join Date
    Oct 2006
    Location
    SOR, near the airport
    Liked
    475 times
    Posts
    22,423

    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Buy a variable speed controller for each of your vacuum cleaner and your heater element.

    Vacuum cleaners nearly all use a "universal" motor which has lots of poles, and will run up as fast as it can based on load and voltage. A VSR will let you control the power getting to it safely, just make sure you match the current requirements

    Thermocouples - look up. JK are common but I can't remember if they cover the temperature range you need. Thermocouples put out stuff all current and need to be connected to an instrumentation amplifier before you do anything else, although anything with a thermocouple input has that amp on the input already.

    But yeah, a VSR. Shit - even a decent light dimmer will do it for you, or find a VSR that allows setting both manually and electronically to make it easy for later on.
    Captain Starfish is currently pimping:
    Need your home theatre installed? MS Tech
    Looking for awesome walls in your house? Custom Walls
    Like scuba diving? UWA Underwater Club

  20. #20
    Member sathid's Avatar
    Join Date
    May 2006
    Location
    South Perth
    Motorbike
    rz250f
    Liked
    1 times
    Posts
    9,640
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Last edited by sathid; 16-10-2011 at 08:54 PM.
    No amount of genius can overcome a preoccupation to detail.




Page 1 of 2 12 LastLast

Bookmarks

Bookmarks

Posting Permissions

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

Content Relevant URLs by vBSEO 3.6.0