View Single Post
  #103  
Old 31-08-2009, 03:40 PM
hikerbob's Avatar
hikerbob (Bob)
Registered User

hikerbob is offline
 
Join Date: Jan 2008
Location: Redlands, Australia
Posts: 253
Tom, with the existing code I start to ramp up the duty cycle of the PWM from 5 degree's above dew point .

I'll refine this after some field testing but at the moment it's pretty basic

if ( ChTempVal[TCount] <= dew_point + 5 ) {
ChPWMVal[TCount] = (dew_point + 5 - ChTempVal[TCount]) * 50;
if ( ChPWMVal[TCount] > 255 ) {
ChPWMVal[TCount] = 255;
}
}
else ChPWMVal[TCount] = 0;
analogWrite(ChPWMPin[TCount], ChPWMVal[TCount]);

Once I get the current sensing working properly I hope to use the current flows for each output to estimate the size of strap attached (and hence the size of the optics) and alter the behaviour of the channel to suit. I'm expecting that I might want to start heating a bit sooner and ramp up more quickly.

During the initialisation stage each channel is turned on individually and briefly and the current measured and recorded.

I've not put much thought into managing the peak power load yet, so far it's been a back of the mind thing. Once I get the electronics right the rest should be a matter of tweaking the code based on experimentation.

Bob
Reply With Quote