Show Posts
Pages: 1 ... 5 6 [7] 8 9 10
91  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 29, 2011, 11:09:49 pm
The switch mode power supply to the Arduino is the culprit.  No noise when Arduino is powered by a wall adapter. Not inconvenient because I would like to keep adapters / leads to a minimum.
92  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 29, 2011, 06:36:21 pm
update: Resolved GND connection to stepper. Both anlaog temp sensors have a dedicated GND are reading correctly with caps smoothing out readings. Camera chassis is bonded to GND, which eliminated power supply connected (OFF and plugged in to mains) noise issues. All good until I turn the power on.

Noise in camera live view, which can be eliminated by coupling the temp sensor GND to power supply GND. As before temp sensor overreads by 10 - 20 degrees. Without this camera temp sensor is very erratic. I suspect this has something to do with the FET GND to the Arduino board. So the last resort before giving up in despair is to connect the FET GND to power supply GND and not the Arduino???

Short of writing code to adjust for the power on temp over reading with its GND to power supply GND I'm lost as to what to do...
93  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 29, 2011, 05:38:08 am
I am seeing interference lines in live view and lines in still images, plus odd readings from both temp sensors when power is applied, with temperature indications jumping up by 5 and 10 degrees, ambient temperature and camera temperature respectively.

I am also running a stepper motor and shutter release. The stepper is resonating and has little torque. I think this is all related to GND setup. Will try again tomorrow. It seems that I fix one problem to have another crop up at the moment.

Capacitors are doing there job and readings are more stable.
94  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 23, 2011, 06:31:45 pm
OK. I will replace the resistor.

The results of the posted code seem to be within the standard read error of the TMP36, +/-0.32C, with occasional spikes of 1 or 1.5C. I notice when removing power from the TEC that thermal inertia is about 2 or 3 seconds, so averaging the readings ignoring the outliers should be representative of actual temperature.
95  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 22, 2011, 07:15:51 am
Thanks GM. I might leave out a filter for now. On that score the FET is getting hot without a sink, but I think this may be related to the value of the resistor, 220ohms - too much current. I'm guessing 1meg would be better.

I'm reviewing the teacup heater files as we speak. The penny will eventually drop re PID.
96  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 21, 2011, 07:19:14 pm
While still working on a PID solution, below is a PWM sketch, which is a bit noisy because of the ~0.32 error in temp reading of both sensors. At least, that's what I think is happening. Otherwise, setting a fixed PWM value performs well with acceptable accuracy. But doesn't account for changing ambient air temp. Consequently, the actual temp of the cold finger changes too.

EDIT: In practice the temperature is fairly stable with transient readings of +/- 0.33. Accuracy is within 0.3 of the set point temperature and in one trial 0.05.

Following this approach should I use a resistor capacitor filter to smooth the pwm out. Or is there way to smooth things with code?

Code:
//Adapted from http://www.ladyada.net/make/logshield/lighttemp.html

/* Utilizing two TMP36 temperature sensors to read ambient air temperature and cold finger temperature, a PWM value is calculated to maintain constant cold finger temp i
 with changing ambient air temp. Includes allowance for sensor ambient readouts. Typically the cold finger sensor is lower than the ambient air sensor. */

#define setPointT 2 // target cold finger temp

#define deltaS 0.33 // sensor delta ambient air - ambient finger

#define aref_voltage 3.3

int fingerT;
int ambientT;

int tempPin = 1;
int tempPin1 = 2;

int tempReading;
int tempReading1;

void setup(void) {

  pinMode(10, OUTPUT);

  Serial.begin(19200);

  analogReference(EXTERNAL);

}

void loop(void) {

  tempReading = analogRead(tempPin);
  tempReading1 = analogRead(tempPin1);

  float voltage = tempReading * aref_voltage;
  voltage /= 1024.0;

  float voltage1 = tempReading1 * aref_voltage;
  voltage1 /= 1024.0;

  float fingerT = (voltage - 0.5) * 100;

  float ambientT = (voltage1 - 0.5) * 100;

  Serial.println(fingerT);
  //Serial.println(ambientT);

  /* PWM control - read ambient air temperature and apply PWM calibration (5.45) and sensor ambient delta to ambient temperature - setPoint temperature delta.
  
   Read cold finger temp and PWM max power to setPoint temp. Then within standard read error of the sensor apply variable PWM for set point. Note: cold finger response is slow decreasing temp and rapid when power is removed
   */

  int pwmV = (ambientT - deltaS - setPointT) * 5.45;

  //Serial.println(pwmV);

  if (fingerT > setPointT) {

    analogWrite(10, 255);

  }
  else
  {

    if (fingerT  > (setPointT + 0.1)) {

      analogWrite(10, pwmV);
    }
    else
    {
      if (fingerT < setPointT) {

        analogWrite(10, pwmV);
      }
    }
  }
}

97  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 20, 2011, 07:19:06 pm
Thanks GM. That is Apple software I think. The only other reference that approximates what I'm doing is the coffee machine in Playground.

Methinks another learning curve coming up. I did try a basic PID script but it froze the board an older Diecimila.

Back to PWM. In the short term I will drive the temp down to within 1/2 a degree of set point and set a PWM value to maintain at or near the setpoint. Main thing is stability rather than accuracy. Not so concerned whether stable at -5, 5.5 or -6.
98  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 20, 2011, 01:26:46 am
Thanks GM and Magician.

I want to read ambient air temp which varies while maintaining a constant and much lower temp at the cold finger.

It occurred to me after my previous post that the temp needs to be driven down to set point quickly. What I proposed wouldn't do that.

Apologies Magician PID is necessary. Important is a stable temp at the cold finger irrespective of ambient temp.

I have read the PID documentation beginning to end an will search around for some examples. Doesn't look straight forward, but is more appropriate than PWM from what I can see now.

Problem is, that regardless of the ambient temperature, the system is only capable of a max differential of 35C. So at 30 C ambient the lowest possible temp is -5. At 15 degrees -20. The power requirements are very similar. Using PWM ambient temperature will be 0, and at the lowest possible temperature 255, irrespective of the ambient or set point temp. The only constants using a TMP36 are voltage and temperature reading 0-1023. So drive down temperature at full power using PID to a set point voltage and then maintain that PWM style.
99  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 19, 2011, 10:08:27 pm
I'm not completely sure that PID will do what I plan with a better understanding of PWM.

If I use two temp sensors I can read ambient temp and monitor cold finger temp and set PWM as a variable of;

ambient temp - deviation from zero * (256 / max system delta.

e.g. 20 - -5 * (256 / 35) = 182 - where 35 is the maximum demonstrated temp differential. PWM will change to keep cold finger temp constant with changes in ambient temp. Assuming that PWM is linear.

That's the concept I have in mind...? As night time temps cool power requirements reduce, while all images have the ~same EXIF temp.

During winter lower temps can be achieved by declaring new values - say -10 or 15.
100  Using Arduino / Motors, Mechanics, and Power / Re: Peltier current control on: December 19, 2011, 03:45:10 pm
Thanks GM. Clear as day. Great instructional.

Now working. Temperature becomes readout only in the simplest form, setting a value for a given temp. There must be a way of setting PWM in response to temperature to achieve a set point. Manually a pot might do it crudely, but in a filter that would mean varying the value of the capacitor. Alternatively, I could set up some tables temp/PWM value.
101  Using Arduino / Motors, Mechanics, and Power / Peltier current control on: December 19, 2011, 01:47:05 pm
Apologies. Moved from Sensor section. Topic removed.

The camera CMOS cooling project is nearing completion. Recapping, a Peltier cools a copper finger attached to the back of the CMOS. Max deltaT is 34C from ambient with no temp control. A TMP36 is located near the CMOS on the cold finger.

I want to control the temperature of the cold finger using the readings from the TMP36 using (as previously suggested) a Logic Level N-Channel MOSFET low rds(on) controlling current to the TEC  (-ve to Drain).

This is working at the moment by setting a digital pin HIGH and LOW. Effectively hard banging. There is a lag in response to the TMP analog input and switching the digital pin equal to the frequency of polling the temperature. This doesn't seem ideal and using PWM is making more sense for smoother results.

As I understand PWM pulse width is related to current flow and therefore a fixed temperature for a given system. The cold finger is very sensitive to temperature deviation at minus temperatures, and a different temperature may be required for each imaging session (dew point).

I am not clear on the best approach or how to write a PWM sketch. In-fact understanding how to implement PWM is not clear to me at all. Missing something here?

Many thanks.

102  Using Arduino / Sensors / Re: Peltier temp control PWM method - sensor analog reading value on: November 19, 2011, 07:51:12 pm
Thanks again to you both. I am talking to Avnetexpress about their shipping costs to see if regular mail is an option, as they have the STP60N3LH5 and IRLB8743.
103  Using Arduino / Sensors / Re: Peltier temp control PWM method - sensor analog reading value on: November 17, 2011, 02:57:22 pm
Thanks again... The problem is freight costs to Australia. However, I have found JK Devices who do post at a very reasonable price. I balk at paying $$$$ for freight for small cheap components. I will follow up your suggestions. I think I have enough to work with.

I must check the specs on the TMP36 again. 0.5 is preferable for dark frame consistency (low light photography). +/- 2 means shooting many more dark frames to better the average.
104  Using Arduino / Sensors / Re: Peltier temp control PWM method - sensor analog reading value on: November 17, 2011, 05:51:57 am
Thank you.

RFD12N06RLE - This fits the specifications. http://www.mouser.com/catalog/specsheets/RFD12N06RLE.pdf
105  Using Arduino / Sensors / Re: Peltier temp control PWM method - sensor analog reading value on: November 17, 2011, 01:48:09 am
They are not too easy to find and ship OS at a sensible price.

These are not too easy to find.

IRLIZ24N International Rectifier logic level N-channel FETs - 55 volt, 14 amp, with an Rds of 0.075 ohm at 5 volts Vgs, 0.060 ohm at 10 volts Vgs.

FDP8878 N-Channel MOSFET has been designed specifically to improve the overall efficiency of DC/DC converters using either synchronous or conventional switching PWM controllers. It has been optimized for low gate charge, low rDS(ON) and fast switching speed.

rDS(ON) = 15mΩ, VGS = 10V, ID = 40A
rDS(ON) = 19mΩ, VGS = 4.5V, ID = 36A
High performance trench technology for extremely low rDS(ON)

The top one is available locally.
Pages: 1 ... 5 6 [7] 8 9 10