Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: Stabilize analogRead? on: October 11, 2012, 02:06:25 pm
:hangs head, walks back into corner:

Thanks,
Chad
2  Using Arduino / Sensors / Stabilize analogRead? on: October 11, 2012, 11:19:51 am
I am using a SCA121T-D03 sensor and the values I am getting from analogRead are all over the map. How should I hook this up so I can get stable readings? I am able to get stable readings from my multimeter no problem but not in arduino. Since this sensor takes 7-35 volts I am powering the sensor w/ an external 12v battery, the arduino is powered via USB and I have the input wires hooked to A1 and A2. Simply doing this,

  int xVal = analogRead(1);
  int yVal = analogRead(2);
 
  float volX = xVal*5.0/1024;
  Serial.print("volX = ");
  Serial.println(volX);

in a loop produces,
volX = 0.81
volX = 0.90
volX = 2.30
volX = 3.31
volX = 3.93
volX = 3.82
volX = 2.98
volX = 1.64
volX = 0.79
volX = 1.09
volX = 2.54
volX = 3.57
volX = 4.01

w/ a delay(1000) between. How can I have this produce 2.5 when sensor is a rest (0*) like my multimeter? I have tried averaging 10 samples over 1 second and that didn't help much still produced very high highs and very low lows.

Thanks,
Chad
3  Using Arduino / Networking, Protocols, and Devices / Re: WizFi? on: June 28, 2012, 10:10:28 am
Sorry didn't know there were multiple 'WizFi' shields,
This is the one I have,
http://www.tinyosshop.com/index.php?route=product/product&product_id=163
w/ this chip
http://www.wiznettechnology.com/Sub_Modules/en/product/Product_Detail.asp?cate1=&cate2=&cate3=&pid=1132

I think I'm going to punt on using this chip. It's kinna flaky, 1/2 the time the WiFi doesn't reconnect upon power on. Seems a little expensive for all the trouble to get it working/debugging.

Thanks,
Chad
4  Using Arduino / Networking, Protocols, and Devices / WizFi? on: June 27, 2012, 10:01:16 pm
Does anyone have experience with the WizFi? I have gone through the configuration guide no problem. I am able to ping it from my computer and telnet into the server port but if it's stacked on my Uno R3 and I attempt to Upload a Sketch to it all I get is 'avrdude: stk500_getsync(): not in sync: resp=0x00'. If I unstack it I can Upload no problem. As a result I have been unable to test it to see if it's working b/c if it's stacked it's not talking to my PC.

Doesn't seem like many people use this shield so I may be out of luck...

Thanks,
Chad
5  Using Arduino / Sensors / Re: Temp Sensor Help on: June 19, 2012, 10:05:28 pm
Ok. I think I have something. So I did like you said and measured the 3 values A,B,C (used my multimeter and the 22k resistor though instead of lugging my stuff to the kitchen) and plugged them into the website and got this,

        double A = 4.717016E-4;
        double B = 1.90988E-4;
        double C = 9.955908E-8;

I then put those in the equation and stuck my probe in a bowl of ice water and this was output,

Code:
aval = 1017 32.0 F
aval = 1015 41.0 F
aval = 1016 36.0 F
aval = 1017 32.0 F
aval = 1014 44.0 F
aval = 1016 36.0 F
aval = 1021 4.0 F
aval = 1016 36.0 F
aval = 1017 32.0 F
aval = 1015 41.0 F
aval = 1016 36.0 F
aval = 1017 32.0 F
aval = 1017 32.0 F
aval = 1022 -8.0 F
aval = 1017 32.0 F
aval = 1017 32.0 F
aval = 1018 26.0 F
aval = 1016 36.0 F
aval = 1018 26.0 F
aval = 1016 36.0 F
aval = 1017 32.0 F

aval is the value from analogRead. That was on a 2 sec delay. Any idea why the values jump around so much? Is that normal? In my final program should I take the average of aval over say 10 seconds pass that to the equation and return that as the actual temp?  I even tried another sensor, same model, and got similar results.

Thanks for the help!
Chad
6  Using Arduino / Sensors / Re: Temp Sensor Help on: June 18, 2012, 04:13:49 pm
Yea, I think it's just a calibration issue. I removed all code except the Analog output and when sticking the probe up at a light it changed and removing it made it change. I must have a different one than the other guy used. Any idea how I can find the 3 values for the resistor? I can't seem to find a datasheet anywhere. If I can't find that I'll just do a test that makes it output 0 and 1023 and figure out a conversion chart, does that seem reasonable?

Thanks for the help,
Chad
7  Using Arduino / Sensors / Re: Temp Sensor Help on: June 15, 2012, 09:59:45 pm
With your code I get -14.2. I even tried another sensor same model I just bought 4 of them, same thing. Do you have the ET-732's? If I stick it up in my overhead light the 'C' value goes up the A0 value goes down, does that sound like its working correctly I just need to calibrate it?

I'll be out of town for the next few days but I appreciate all the help!

Chad
8  Using Arduino / Sensors / Re: Temp Sensor Help on: June 15, 2012, 02:48:44 pm
Well I _think_ i have it hooked up just like this,

Only no blower, no LCD and only 1 Temp Probe (in A0).

If you look at the larger pic (and zoom) you'll see I have an orangeish wire hooked to A0, which then goes to the breadboard column 'D'. Then the green wire in Column 'C' goes to the 'Tip' of the probe. 22k resistor is in Column A going to +5v. Ring of probe is grounded.

Make sense?
Chad
9  Using Arduino / Sensors / Re: Temp Sensor Help on: June 15, 2012, 02:36:47 pm
That would be my guess. I got them off ebay as replacements for this unit,
http://www.maverickhousewares.com/et732.htm

Chad
10  Using Arduino / Sensors / Temp Sensor Help on: June 15, 2012, 02:06:50 pm
Let it be known this is my first project. I'm trying to replicate some of the aspects of this project,
http://hruska.us/tempmon/

I have a uno and it is hooked up like so,

Larger Version
http://www.2kgt.com/s3/bbq/IMG_6221.jpg

I have uploaded a basic sketch that just writes the value coming from A0 to serial.
Code:
int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor
unsigned int food_temp = 0;

void setup() {
  Serial.begin(9600);
  Serial.println("Start bbq mon");
  delay(2000); 
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  food_temp = thermister_temp(sensorValue);
  Serial.println(food_temp); 
  delay(2000);
 }

int thermister_temp(int aval) {
double R, T;

// These were calculated from the thermister data sheet
// A = 2.3067434E-4;
// B = 2.3696596E-4;
// C = 1.2636414E-7;
//
// This is the value of the other half of the voltage divider
// Rknown = 22200;
        int Rknown = 21630;
// Do the log once so as not to do it 4 times in the equation
// R = log(((1024/(double)aval)-1)*(double)22200);
R = log((1 / ((1024 / (double) aval) - 1)) * (double) Rknown);
//lcd.print("A="); lcd.print(aval); lcd.print(" R="); lcd.print(R);
// Compute degrees C
T = (1 / ((2.3067434E-4) + (2.3696596E-4) * R + (1.2636414E-7) * R * R * R)) - 273.25;
       
// return degrees F
return ((int) ((T * 9.0) / 5.0 + 32.0));
}

The output from Serial just jumps back and forth from 7 and 9 sitting on my table in my office where it's about 75*F, so I get something like
7
9
7
9
7
9
9
7
7
7

That is a 22K Resistor and a Maverick ET-732 Probe.

Any ideas what I screwed up? Code? Connections? I'm not much of a hardware guy, mostly software but this stuff just seems too cool not to start messing around with.

Thanks,
Chad
Pages: [1]