Show Posts
Pages: 1 2 [3] 4 5 ... 7
31  Forum 2005-2010 (read only) / Exhibition / Re: PID Reflow Toaster on: June 16, 2009, 06:10:29 am
Quote
they recommended to either directly wire the temperature sensor to the PCB you want to solder or to wire it to an old piece of PCB

makes sense to me!  I'll have to try it out both ways.  I'm also planning on using this rig for non-electronics purposes, so maybe I can make something removable.
32  Forum 2005-2010 (read only) / Exhibition / Re: PID Reflow Toaster on: June 15, 2009, 08:06:41 pm
I think one of the benefits of an oven is that it lets you do double-sided boards.  I'm not an expert at all though. as I said, I haven't soldered anything in it yet.  this was more of case of having a $6 toaster and an idea to try out.

I'd be curious to see what the temperature range on an iron is.  it might fluctuate too much.  if it worked it would be a pretty cool find though. EVERYONE could do SMT at that point.
33  Forum 2005-2010 (read only) / Exhibition / Re: PID Reflow Toaster on: June 15, 2009, 07:09:28 pm
you're correct about the I/O setup.  sorry I didn't put up a schematic.  the SSR was connected directly to an output pin and ground, and the thermistor was wired using this method: http://webzone.k3.mah.se/projects/arduino-workshop/projects/arduino_meets_processing/instructions/ntc.html
34  Forum 2005-2010 (read only) / Exhibition / Re: PID Reflow Toaster on: June 15, 2009, 12:35:38 pm
I had the same problem! ("c'mon, you can trust me!")

I wound up getting this one at the thrift store for 6$US.  It's probably better that way.  After I put solder in there it won't be safe for food anymore anyway.  (you can see my regular food toaster behind the one in the picture)
35  Forum 2005-2010 (read only) / Exhibition / PID Reflow Toaster on: June 14, 2009, 06:56:14 pm
ok, so I haven't actually used it to solder anything yet, but it can hold the temperature within 1 degree of setpoint, all the way from 200-450 °F, so I'm assuming it will work.



pid input comes from a thermistor (that's on the copper mast extending into the chamber,) and the output goes to an SSR.

More information here: http:// http://brettbeauregard.com/blog/2009/06/arduino-reflow-toaster/
36  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: November 21, 2010, 12:44:10 pm
Quote
no, what i meant to ask is how does the PID switch the direction of the motor to deal with overshoot
ah.  in that case, take a look at Post 16 on this thread.  maybe that will help.

Brett
37  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: November 21, 2010, 08:05:53 am
Quote
How is it that the direction of the motor is changed?

I understand your question to mean that the motor seems to be going backwards, forcing you away from setpoint.  if this is the case, you need to change the sign of the P term.  so instead of:
Code:
PID pid(&Input, &Output, &Setpoint,5,30,1);

you want:
Code:
PID pid(&Input, &Output, &Setpoint,-5,30,1);
38  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: August 16, 2010, 08:02:01 am
Quote
#define multFix(a,b) ((long)((((long)(a))*((long)(b)))>>12))

one of the main issues I've been wrestling with on the integer library is ensuring that overflow doesn't happen.  I haven't tried this, but if a and b were big enough wouldn't a*b overflow?
39  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 27, 2010, 01:00:28 pm
I started a new thread specific to PID Tuning:http:// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1280251311
40  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 12, 2010, 01:48:34 pm
Quote
By the way, why on earth is the I parameter equal to the reciprocal of the gain as it appears in the PID algorithm?

sorry for the confusion.  there's various forms of the pid equation.  (http://en.wikipedia.org/wiki/PID_controller scroll down to "Alternative nomenclature and PID forms")

they're mathematically equivalent, but the one listed as the "standard form" is the one i chose.  it's a little more work on the backend as you mentioned, but I find it easier to tune.  if you know the time constant of the process, you just make that the I term, then adjust P to get more aggressive or conservative)
41  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 12, 2010, 12:03:24 pm
Quote
my solution allows a single "on" window during each PWM period, and that window is pushed to the end of the period

I think that's an elegant solution for this process.  since your disturbance spikes will be increases in temperature, it's unlikely that you'll encounter a situation where the pid wants to suddenly back off.
42  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 10, 2010, 06:42:11 pm
first off,  I don't have any refrigerator-specific on/off style experience. the closest I've come is cryogenic distillation (which is AWESOME by the way.)  that isn't an on/off process though.  I can speculate with the best of 'em though.

Quote
In a pathological scenario, couldn't your system respond in a way that made the control oscillate as often as every PID cycle?

I have actually encountered this, and not just with a poorly tuned controller.  if the door is opened at just the right moment, the pid output could move in such a way that the compressor chatters.

this poses a tricky problem.   your transition enforcement fix would work, but if you're in minute 2 of your time window when the door opens, you want to respond NOW.  if you're restricted, you have to wait 8 minutes before the compressor kicks in to correct.  if that's fine, you're done.  if not...

maybe you could tie into the door open sensor; the one that turns on the light?  it seems that that's the major disturbance to the fridge process.  if you know when the door is open you can make more informed choices (e.g. chatter mitigation when the door opens, but allowing it to act as it wants as soon as the door closes)
43  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 10, 2010, 06:33:54 am
Quote
Am I missing something, or should SetSampleTime() take an unsigned long?

wow.  that is something I never thought would occur.  if I remeber correctly the backend variable (tSample) is an unsigned long because it's being compared to millis() and I wanted to make sure there were no casting issues.

in my experience, the only reason to make your sample time large is if you have to.  in plants with 20k pid loops there are legitimate processing issues, so they need to sacrifice on some loops and make the value bigger.  it didn't occur to me to allow it to be huge in the arduino setting.

instead of making the sample time really large, I'd recommend dealing with your concens on the Output side. you'll get your desired effect if you set up an output window as I did in Example 2 here: http://www.arduino.cc/playground/Code/PIDLibrary

you're free to set up a 10minute window, then have the pid tell you for how much of that window you should be on.  while the pid will be evaluating once a second (or every 30 seconds, whatever) your final control element will have a duty cycle of 10minutes.

and of course, the longer your duty cycle, the looser your control will be.  it's a balance you have to strike when you're using pid with an On/Off final control element.  that's why in industry it's generally connected to something that can range between 0-100%: valves, VFDs, gas flow to a burner, etc.

hope that helps,

Brett

Update: in the time it too me to craft my longwinded response, zer0vector jumped in with something much clearer.   smiley-wink
44  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 07, 2010, 09:32:43 am
first off, there's a timer library?!  why did I not know this?

your code looks good.  be advised that you will need to adjust the tuning parameters (3,4,1) depending on what you're connected to.  it's unlikely that the default values will give you the response you want, or that the same values will work for both the water bath heater and smoker.

Brett
45  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: July 01, 2010, 12:17:07 pm
Lance,
it's hard to know if you could "fake out" the pump. that is, it wants 0-? volts, while you'd be rapidly pulsing 5V.  it might be worth looking into a DAC (full disclosure, I'm a Chem-E, and my electrical advice should be viewed with suspicion.)

this may be a good place to start: http://www.arduino.cc/playground/Main/InterfacingWithHardware (scroll down to ADC/DAC)

Brett
Pages: 1 2 [3] 4 5 ... 7