Home Forums PID Control / Tuning Setpoint Profiles (for Reflow et al)

Viewing 15 posts - 1 through 15 (of 36 total)
  • Author
    Posts
  • Brett
    Keymaster
    Post count: 101

    I’vejust posted the new firmware / front-end that allows for setpoint profiles. It’s fairly straight-forward, but I thought I would create this thread for Q&A.

    the jist:
    -The osPID can hold one profile at a time. This is stored in EEPROM and can be executed from the main osPID menu, or from the “profiles” tab on the front-end
    -A profile is a sequence of up to 15 steps, made up of RAMP, STEP, and WAIT Commands
    -To create / load a profile
    1. create a txt file in the “profiles” sub-folder of the front-end application. follow the form laid out in reflow1.txt
    2. start the front-end. the profiles folder will be read and you will see your new profile int the “available profiles” list on the profile tab
    3. connect to the osPID
    4. highlight the desired profile and click “send_profile” the profile will be sent to the osPID and you will be notified of progress / success.
    5. at this point you can run the profile either from the main osPID menu (last option) or by clicking “Run_Profile” on the profile tab.

    as I said, the profile is stored in the osPID’s non-volatile memory, so it will stay on-board after a reset. you will only need to re-load if you wish to change the profile to be run.

    dchris01
    Participant
    Post count: 17

    I am a bit confused on the reflow chart to edit for my own profile I have tried to set up my profile but unable to succeed any help is good. This is my profile that I am trying to upload. To reflow profile so I can run from front end.
    Time. Temp.
    30 sec. 100
    60 sec. 150
    90 sec. 170
    120 sec. 200
    130 sec. 217 reflow temp
    150 sec. 245
    180 sec. 255
    200 sec. 210
    210 sec. 75
    240 sec. –
    270 sec. –

    Brett
    Keymaster
    Post count: 101

    if you would like those hard steps, then the profile file would contain the following:

    [profile name, 7 chars max]
    3, 100, 30 //step (3) setpoint to (100) and wait (30) seconds
    3, 150, 30 //step (3) setpoint to (150) and wait (30) seconds
    3, 170, 30 //step (3) setpoint to (170) and wait (30) seconds
    3, 200, 30 //step (3) setpoint to (200) and wait (30) seconds
    3, 217, 10 //step (3) setpoint to (217) and wait (10) seconds
    3, 245, 20 //step (3) setpoint to (245) and wait (20) seconds
    3, 255, 30 //step (3) setpoint to (255) and wait (30) seconds
    3, 210, 20 //step (3) setpoint to (210) and wait (20) seconds
    3, 75, 10 //step (3) setpoint to (75) and wait (10) seconds

    just so we’re clear, this will adjust the setpoint of the oven (the green line on the front-end.) the actual oven temperature (the red line) will lag behind and will respond to these changes based on your specific oven, and your tuning parameter values (Kp, Ki, Kd). for a smoother profile, it might be more advantageous to use the available Ramp command instead of so many step commands:

    [profile name, 7 chars max]
    3, 100, 0 //step (3) setpoint to (100) and immediately go so the next step
    2, 0, 0 //we have no idea where the oven temperature was at the start, so wait (2) until it crosses the setpoint from the previous command (100)
    1, 217, 100 //ramp (1) the setpoint to 217 over the next 100 seconds
    2,0,0 //because the oven temperature is likely lagging behind the setpoint ramp from the previous step, wait (2) until it actually GETS to 217 before proceeding the next step
    1, 245, 20 //ramp (1) the setpoint to 245 over the next 20 seconds
    3, 255, 30 //step (3) setpoint to 255 and wait 30 seconds
    1, 210, 20 //ramp (1) the setpoint to 210 over the next 20 seconds
    3, 75, 30 //step (3) setpoint to 75 and immediately go so the next step
    2, 5, 3 //wait (2) for input to be within (5) degrees of the of the last setpoint (75) for (3) seconds before proceeding to the next step (END)

    Again, this is specifying the REQUESTED temperature (the PID Setpoint,) not the actual temperature. how well the actual temperature tracks with these request will be based on the oven & tuning parameters.

    hope this helps

    (updated: when I first wrote this, I accidentally got the red/green designation backwards. whoops)

    dchris01
    Participant
    Post count: 17

    This is my first go at running profiles on my Homemade IR station top plate controlling this is step profile.
    http://img829.imageshack.us/i/imagehyh.jpg/

    http://img843.imageshack.us/i/imagephqn.jpg/
    This is ramp profile. I didn’t get Autotuning to work to Autotuning at 235.
    20oC Temp difference between osPID TC and thermometer TC both where within around 5mm of each other sitting beside chip I was testing for solder liquidous. Still learning about osPID which is a superb gadget if thats what you to call it.

    Brett
    Keymaster
    Post count: 101

    @dchris that second picture looks great! (the first one had been removed)

    it looks like your temperature is tracking pretty well with the setpoint. I’m not sure how much you would gain by changing the tuning parameters. I know that the cool-down looks slow, but if you look at the output you can see that the PID (correctly) dropped the output to 0 early on. the slow rate of cooling is due to the nature of your system. no set of tuning parameters will make that cool-down happen more quickly.

    you must MUST post pictures once you start reflowing!

    also, just as a side note, if you could comment on the challenges you had getting to this point I think that would be really helpful. I’ve been doing this for a long time, and I do my best to make thing accessible to the beginner, but sometimes it’s hard to forget what I know. there’s no substitute for someone saying “yeah, I was really confused by ____. if you had said ___ it would have made things much easier.”

    dchris01
    Participant
    Post count: 17

    Click on picture again I have it fixed Brett cheers

    Brett
    Keymaster
    Post count: 101

    @dchris I’m glad you posted that first picture. it’s very revealing about the nature of your oven’s heating. similar to the cooling thing, I can see that the output is fixed at 100% during the entire heating portion. the heaters can’t give any more. so this is as fast as your oven can heat up. no PID in the world can make it go faster.

    dchris01
    Participant
    Post count: 17

    I am having problems with loading a profile from pc to ospid. When i select a profile i select send then when it completes i run and it works then say I do another test in 30 mintues time and load another profile the same way, it wont load up and nothing shows on status bar but its running on the ospid but not on pc. This has happen a few times. I would rather use the pc for seeing what is happening rather than looking at ospid it seems to me i am controlling the reflow better. That is my option.

    dchris01
    Participant
    Post count: 17

    This was the ramp profile. I changed first Step from 100 to 130 and it did help as you see in picture. Only thing was temp on ospid and tc beside chip was that they were around 30oC of a difference. http://img685.imageshack.us/i/imagedwv.jpg/
    This was the step profile 30 min before didn’t look good compared to ramp profile.
    http://img13.imageshack.us/i/imagetit.jpg/

    And here is my setup not a finished project as you see but working and like everything else a lot of testing.

    http://img23.imageshack.us/i/imagewjj.jpg/

    Maddox
    Participant
    Post count: 13

    I wired up a toaster oven to ac hot and I know that is working since the 1/2 second oscillation on the relay is flashing the oven light and it is warming up (swiftly) using the sample reflow profile. I *believe* the thermocouple is wired correctly, but I don’t can’t find any indication that the osPID is reading it, since the sample reflow profile is waiting for the oven to reach 50, and my standalone thermocouple continues to rise over 120 before I killed the run.

    Is there a simple thermocouple test that I have missed?

    Thanks for any help.

    rocketscream
    Keymaster
    Post count: 65

    Look at the Dashboard menu on the LCD? Check the input parameter, it should be going up.

    Brett
    Keymaster
    Post count: 101

    Is there a simple thermocouple test that I have missed?

    can you confirm that you have set the osPID to read from the thermocouple input rather than the thermistor input? when connected, this setting will be visible on the front-end config tab

    Maddox
    Participant
    Post count: 13

    I did select thermocouple on the input.

    The input parameter line was not changing.

    I will recheck all the connections and try again.

    I guess I can write this when I get a chance – a little test program that just displays the temperature on the LCD would be a useful tool!

    Brett
    Keymaster
    Post count: 101

    I guess I can write this when I get a chance – a little test program that just displays the temperature on the LCD would be a useful tool!

    the 2nd item on the osPID dashboard is the current value of the input. is this not working? (menu reference)

    Maddox
    Participant
    Post count: 13

    Well, I swapped the thermocouple leads and it started to work 🙂

    As soon as I select the relay on the config menu, it begins to switch at a regular .5 second rate. I started the sample profile and the temperature rose above 50, then 100, and kept on going, still switching at .5 hertz. Here’s the picture:

    http://www.flickr.com/photos/77705680@N06/7117627567/

    How do I get the PID output to engage to control the temperature? I know it must be something simple – would be grateful for a nudge in the right direction.

Viewing 15 posts - 1 through 15 (of 36 total)
  • You must be logged in to reply to this topic.