Smart PID

Discussion in 'General Brewing Discussions' started by Minbari, May 17, 2021.

  1. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    Havent seen alot of information on these, but it just looks too cool not to get one. ordered it 3 days ago and it will be here tommorow! talk about service! 5 days from Italy.

    here is how I plan to implement it.

    there are 2 PID controllers in the Smart PID module.

    #1 will control the heating element with PID controlled PWM.
    #2 will control the glycol chilling also with PID controlled PWM. The timer module will trigger off the PWM output to activate the pump. The PWM from the PID controler will drive a pair of solenoid valves to direct the glycol mixture either back to the reservoir or into the chiller coil in the fermenter. the Pump will shut off after the temp is reached and the PID output stops.

    Ferm_temp_con.png
     
    AHarper and Trialben like this.
  2. Craigerrr

    Craigerrr Well-Known Member

    Joined:
    Mar 14, 2018
    Messages:
    6,307
    Likes Received:
    9,827
    Trophy Points:
    113
    I would never purchase a device that was smarter than myself!
    I am not versed in electrical schematics, it seems that you know what you are doing!
     
    Minbari likes this.
  3. Bubba Wade

    Bubba Wade Well-Known Member

    Joined:
    Sep 17, 2017
    Messages:
    790
    Likes Received:
    1,344
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    Retired Engineer
    Location:
    Monroe, Louisiana
    Home Page:
    One of the rules in industrial control is to use the simplest control algorithm required to achieve the objective. On my fermenter, I control both cooling and heating using on-off controllers. For heating it controls a resistive heating circuit. For cooling it starts and stops a chilled water pump.

    Don't get me wrong, the dual PID will work, but there may be an easier solution.
     
  4. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    I have a dual on-off. It works ok, but over shoots on both ends.

    Also, i am a techy nerd in an engineers body. Over biult is what I do. :D
     
  5. Trialben

    Trialben Well-Known Member

    Joined:
    Mar 30, 2016
    Messages:
    10,176
    Likes Received:
    11,442
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Pest control tech
    Location:
    Palmwoods QLD
    I have only just purchased received and used my Rex-100 berm pid I was disappointed on first run but it's a cheap unit.
    I'm looking at buying an EZ-boil pid to replace it down the track.

    You could actually help me sharpen it to not overshoot so much I'm prob wrong but I reduced the (P) by a Quarter seems to have calmed it down.
    I've also run the Auto tune but once.

    Anyhow I look forward to how you go especially with the glycol side of it.
    Sounds cool that it has a Power Watt meter built in.
     
  6. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    I will definitely keep you updated. I have been educating myself on PID settings and playing with some simulators. Keeping P just high enough to function seems to be the key
     
    Trialben likes this.
  7. Bubba Wade

    Bubba Wade Well-Known Member

    Joined:
    Sep 17, 2017
    Messages:
    790
    Likes Received:
    1,344
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    Retired Engineer
    Location:
    Monroe, Louisiana
    Home Page:
    P is proportional. It is also called gain. If set too high, you will have overshoot and possible instability. If set too low, it will react sluggishly.

    I is integral. It sums the error over time. It is designed to bring the PV back to the set point after the initial overshoot or undershoot. Too high and you get too much oscillation. Note that some controllers use resets/second and others use minutes per reset. These will behave in exactly the opposite manner.

    D is derivative and looks at the rate of change. I usually keep this set to zero unless I have a special situation.

    Hope this helps.
     
  8. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    thanks. That is what most of the reading i am doing says. Putting it into practice is interesting lol. I am learning though
     
  9. Bubba Wade

    Bubba Wade Well-Known Member

    Joined:
    Sep 17, 2017
    Messages:
    790
    Likes Received:
    1,344
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    Retired Engineer
    Location:
    Monroe, Louisiana
    Home Page:
    Be sure and check the units on the integral. If it uses seconds per reset, lowering the value will increase action.
     
  10. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    Funny you should Mention that. I was reading that yesterday and discovered why shit was counter to what I thought it should be on the simulator. Once I knew it was inverted. Everything just kinda worked
     
    Trialben and Hawkbox like this.
  11. Trialben

    Trialben Well-Known Member

    Joined:
    Mar 30, 2016
    Messages:
    10,176
    Likes Received:
    11,442
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Pest control tech
    Location:
    Palmwoods QLD
    Cheers bubba yup on the short amount of research I did I found turning P and D down from my pre set factory numbers has helped.
    Man this thing was overshooting like two Degrees C while I was thinking huh so much for presicision my STC can hold a tighter setting than that!

    I must admit it brings me to my set temp value but let's say I want to step mash (which I always do) and step it up to the high end of saccrification I risk overshooting into dangerous enzyme killing territory if ya get my drift...

    The boil on the other hand I loved the pulsing boil I had it set just below 100c too.
     
  12. Trialben

    Trialben Well-Known Member

    Joined:
    Mar 30, 2016
    Messages:
    10,176
    Likes Received:
    11,442
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Pest control tech
    Location:
    Palmwoods QLD
    How do you find this out bubba obviously In the Chinese manual.
     
  13. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    Well the one I got is from Italy. :p
     
    Trialben likes this.
  14. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    That Is what I found too.

    The best article I have read said.

    Set I and D to zero then set P until you see oscillation. Cut P in half and add enough I to control overshoot. He said never add D unless you need it and even then in the smallest amount that will fix the problem
     
    AHarper and Trialben like this.
  15. Trialben

    Trialben Well-Known Member

    Joined:
    Mar 30, 2016
    Messages:
    10,176
    Likes Received:
    11,442
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Pest control tech
    Location:
    Palmwoods QLD
    Much appreciated.
     
  16. Donoroto

    Donoroto Well-Known Member

    Joined:
    Jun 21, 2020
    Messages:
    1,290
    Likes Received:
    1,973
    Trophy Points:
    113
    Occupation:
    Retired Engineer
    Location:
    Atlanta
  17. Bubba Wade

    Bubba Wade Well-Known Member

    Joined:
    Sep 17, 2017
    Messages:
    790
    Likes Received:
    1,344
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    Retired Engineer
    Location:
    Monroe, Louisiana
    Home Page:
    Yes, this is classic Ziegler-Nichols tuning technique. The other method for setting "I" is to measure the oscillation period and set I equal to the oscillation period.

    In industrial applications, we sometimes need to use other techniques because if we oscillate certain variables, the plant blows up.

    @Donoroto thanks for the compliment. I spent 40 years learning instrumentation and controls engineering.
     
    Trialben and Donoroto like this.
  18. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    I completely understand that. There are also practical considerations. Not gonna be able to see oscillation from a 300 watt heating element in 5 gallons of liquid.
     
  19. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    #19 Minbari, May 19, 2021
    Last edited: May 19, 2021
    The unit arrived today and here are my first impressions. The manual could have a few more details in it. like it doesnt say that if you run the unit of off 110VAC that the PWM outputs are set to 5vdc. this can be solved by powering the unit with the DC in instead and then the PWM outputs follow the DC voltage............anyway.

    support is awesome! I emailed them with questions and got answers in less than 10 minutes. so what the manual lacked they made up with live support.

    the unit is pretty solid so far. has three buttons. "up" "select" "down" you can set it up as a standard ON/OFF temp control or full PID(or a combination of the two). the only caveat is that the PID is only PWM on the output. you cant dirrectly control proportional devices if that is your goal you would have to get a PWM to analog convertor. setup is very straight forward and all the menus are easy to understand.

    It has a timer on it that I am not sure how to use yet. it doesnt seem to do anything other than keep an updated time of how long the process has run. :confused:

    for the PID section it allows you to control the Kp, Ki and Kd or let the autotune give it a go. I havent put into use yet, so I will post another update once I have time to do that. You can also set the sample time and PWM period. handy if you have devices that are slow to respond like solenoids or mechanical relays.

    so here is the cool stuff! I am a big techie nerd so this just hits my spot! :D you can access this device from anywhere! if you have a laptop or a smartphone with a browser then you can log into it and monitor the process and change or stop it. you can alter process profiles and change set points as well. I know I am just geeking out, but there ya go!

    you cant change any of the basic setup via the web app, maybe at a later date they will do that.

    20210519_155607_HDR.jpg 20210519_155556_HDR.jpg 20210519_155612.jpg 20210519_155645.jpg
     
    Trialben likes this.
  20. Minbari

    Minbari Well-Known Member

    Joined:
    Mar 31, 2021
    Messages:
    267
    Likes Received:
    265
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    fuel hauler
    Location:
    STL
    after two days of landing wires and fixing a couple leaks, it works! I havent calibrated the PID yet, but it is functional.

    I never was a great wiring tech, :p function over beauty.

    20210610_120413.jpg 20210610_120408.jpg 20210610_120419.jpg
     
    Trialben, Craigerrr and Hawkbox like this.

Share This Page

arrow_white