Shop OBEX P1 Docs P2 Docs Learn Events
controlling temperature of brewing mash tun — Parallax Forums

controlling temperature of brewing mash tun

PorcelinaPorcelina Posts: 5
edited 2014-09-18 14:56 in BASIC Stamp
Hi All,

I the past I have tried to control the temperature of a mash tun in order to control a brewing process.
At different time steps the temperature should be increased to a certain setpoint (and holded for a set time).
I was experimenting with the basic stamp 2: Basic stamp was acting as bridge (serial connection of basic stamp with computer) between program written in visual basis and LM35 temperature probe (INPUT) and relay connected to 230V heating plate (OUTPUT).
The code included a PID algoritm but I was not able to translate the calculated power output to the heating plate.
For example, the output is a value between 1 and 10 and an output value of 6 is calculated. How to make the heating process possible at power of 60% of full power?
How to control the power of a 220V heating plate by means of a relay?

Best Regards

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2014-09-18 09:53
    Is it a solid state relay? That would be best. To get 60% power you turn the heater on for 60% and off 40% in a relatively rapid cycle.
  • PorcelinaPorcelina Posts: 5
    edited 2014-09-18 12:52
    Yes it is a solid state relay, I forgot to mention that.
    So I have to experiment with a duty cycle method?
  • GenetixGenetix Posts: 1,754
    edited 2014-09-18 13:41
    The BASIC Stamp is capable of doing PID and here it's used to maintain the temperature of an incubator. I don't know how complicated your process is but you can always use one of the more powerful BS2 modules.
    http://www.parallax.com/product/28176
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2014-09-18 14:56
    Yes it is a solid state relay, I forgot to mention that.
    So I have to experiment with a duty cycle method?

    Yes, basically. Can the heater+mash average a 1 second cycle?
    DO
      heat = on
      pause(ms)   ' e.g. 600 ms
      heat = off
      pause(1000 - ms)   ' e.g. 400 ms
    LOOP
    

    Where the PWM cycle duration is 1 second, and time enters as ms from 1 to 999. It is possible to insert code to read the LM34 and to send and receive data to the PC, by slicing some time out of the pause durations.
Sign In or Register to comment.