[SS2S-Main] Re: temperature controller with arduino

  • From: "Lampe, Mattias SLC CT PEK" <mattias.lampe@xxxxxxxxxxx>
  • To: "sugarshot@xxxxxxxxxxxxx" <sugarshot@xxxxxxxxxxxxx>
  • Date: Thu, 3 Jul 2014 18:41:17 +0800

Hi Nathan,

according to my understanding, the behavior you observe only indicates that the 
P, I and D coefficients – which depend on a number of factors – are not optimal.

Without looking at the code, I’d suppose these three parameters are 
configurable somewhere, and for the temperature control application it should 
be possible to optimize them by trial and error. I think there are some 
websites explaining the best strategies for that.

“Maxing out” of the corrective value should not  generally be a problem – after 
all, you want to be get to your target temperature as quickly as possible – but 
you are right that at a difference of 2 degrees it’s a bit unexpected, at best.

My approach (which might be wrong) would probably be to start with the I and D 
coefficients set to 0 and adjust P in such a way that you’re not oscillating 
too much around the target value. If I remember correctly, the I component will 
remove the residual temperature offset, so if you have found a P that doesn’t 
oscillate too much but doesn’t hit the desired value exactly, you can fix that 
by the I. Not too sure how to optimize the D. If speed is not important, I 
think keeping it at 0 might not do too much harm in this case.

(I hope others will correct me if I’m writing nonsense ;-)  )


From: sugarshot-bounce@xxxxxxxxxxxxx [mailto:sugarshot-bounce@xxxxxxxxxxxxx] On 
Behalf Of Nathan Asdourian
Sent: Thursday, July 03, 2014 6:15 PM
To: sugarshot@xxxxxxxxxxxxx
Subject: [SS2S-Main] Re: temperature controller with arduino

I took a look at the pid library available for arduino and while it is 
functional, unless I have the concepts wrong, it is less than ideal.
In my mind, while functioning properly, the modified control values should 
rarely hit the limits, and the control loop should actively attempt to maintain 
the target value.
The first obvious issue was that with a 2 degree deficit the control loop was 
able to max out just as it started to see the temp change.
When I reset it slightly above the target temp, initially it would click on and 
off  with the on cycle getting shorter and shorter....then the control loop 
stayed bottomed out as the temp dropped right past the target...

My test setup was a basic 12v resistive heating element controlled by an 
arduino through a relay, with a ds18b20 sitting on top of the heating element 
and a thin plate of aluminum as a heat spreader between them..
The program took all of maybe 30m to put together and debug. No failsafes, or 
error checking...just the control loop and temp sensor.

On Jul 2, 2014 3:28 AM, "waaslandwolf" 
<waaslandwolf@xxxxxxxxx<mailto:waaslandwolf@xxxxxxxxx>> wrote:


I understand where you're coming from. On one side of the spectrum you can buy 
an off the shelf rocket and push the launch button, on the other hand you can 
mine your own ore for metals to construct the rocket with from scratch. 
Anything in between is a question of which balance point you choose.


On Tue, Jul 1, 2014 at 12:36 AM, Redacted sender 
monsieurboo@xxxxxxx<mailto:monsieurboo@xxxxxxx> for DMARC 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> wrote:

Seems to me guys like Vicente epitomize the original Day 1 spirit of the SS2S 
venture.  Looking back, and particularly considering the wealth of talent and 
experience in our group, we surely could've met our altitude goal years ago 
with a fundraising effort, COTS parts and APCP as the motivator.  We chose a 
different path, partly as a salute to amateur rocketeers throughout the decades 
who had to "roll their own" more often than not.

Certainly we owe it to ourselves to make the best use of technology.  When SS2S 
was first conceived, there were no GPS modules available for what we needed.  
(IIRC, they hadn't even unlocked the high-accuracy version for civilians yet.)  
 Today, of course, we'd look foolish if we didn't embrace that kind of 
capability.  Sometimes there's only one sensible choice.  When it comes to a 
homebrew curing oven, though, there's more than one path to the top of that 
hill.   The usual tradeoff applies:  The cheaper, the steeper!

I'm not suggesting there's any right or wrong here, or that anyone is *not* 
totally in tune with the SS2S vibe.  In fact, as usual there's been a wide 
response with lots of suggestions and options offered -- a win-win for all of 
us, and exactly what I've come to expect from this group.  I mainly wanted to 
tip my hat to Vicente, another guy who likes to build things from scratch while 
spending no more than he has to.

Mark L.

-----Original Message-----
From: John Doe <waaslandwolf@xxxxxxxxx<mailto:waaslandwolf@xxxxxxxxx>>
To: sugarshot <sugarshot@xxxxxxxxxxxxx<mailto:sugarshot@xxxxxxxxxxxxx>>
Sent: Mon, Jun 30, 2014 5:19 pm
Subject: [SS2S-Main] Re: temperature controller with arduino

Either go with the PID if it meets your requirements on programming the 
temperature profile, or with the BCS brewing controller which certainly does.

What I've learned from years of developing electronics: if it already exists as 
a product, it is likely to be cheaper to buy it than to build it. The time 
saved can be invested elsewhere.

Which doesn't mean building isn't fun, educational etc, but if the product is 
only a small part of a programme, It's better to get it out of the way and 
proceed towards the bigger goal. When laying a 10.000 piece puzzle you don't 
want to make each piece by hand, you just buy them and focus on completing the 


Op 30-jun.-2014 om 15:16 heeft Vicente Alvero Zambrano 
<vicente_alvero_14@xxxxxxxxxxx<mailto:vicente_alvero_14@xxxxxxxxxxx>> het 
volgende geschreven:

Your opinion is to use the existing PID device?

> Subject: [SS2S-Main] Re: temperature controller with arduino
> From: waaslandwolf@xxxxxxxxx<mailto:waaslandwolf@xxxxxxxxx>
> Date: Mon, 30 Jun 2014 14:21:03 +0200
> To: sugarshot@xxxxxxxxxxxxx<mailto:sugarshot@xxxxxxxxxxxxx>
> I agree with Peter. Trying to save a mere 180$ by developing a solution that 
> already exists isn't good use of resources.
> > Op 30-jun.-2014 om 00:52 heeft Peter Johansson 
> > <rockets4kids@xxxxxxxxx<mailto:rockets4kids@xxxxxxxxx>> het volgende 
> > geschreven:
> >
> > On Sun, Jun 29, 2014 at 6:36 PM, Vicente Alvero Zambrano
> > <vicente_alvero_14@xxxxxxxxxxx<mailto:vicente_alvero_14@xxxxxxxxxxx>> wrote:
> >
> >> My idea is to use an old oven heater like the picture.
> >> With respect to the PID controller, maybe it is cheaper to do it manually,
> >> without writing code.
> >
> > One option to consider -- and an advantage to going with a homebrew
> > solution -- is to simply read a configuration file containing the
> > temperature profile and PID tunings over over the serial port.
> >
> > This way you get the maximal possible control with the minimal
> > hardware cost and minimal software development time.
> >
> > -p.
> >

Other related posts: