Friday, March 21, 2008

Data logging

I try to data log with Do son chip and Micro SD card.


First I try to make and save data at SD card from potentiometer.



I can save data easily at computer by processing, but it seem not the exactly same data at Arduino.

It looked like a kind of BYTE , HEX problem.




After I saved a file used processing, I couldn't nothing to do with.

I try to save at SD card, but I failed to save.

I used all of sample code at class wiki.


Those are result files


All of text files are meaningless.


http://itp.nyu.edu/physcomp/sensors/Code/4dSystemsByte

from this code.


1. http://itp.nyu.edu/~sk2745/sensor/3.TXT

2. http://itp.nyu.edu/~sk2745/sensor/1.TXT



Arduino
Code.
//-------------------------------
byte fileCounter = 5 ;
byte sensorCounter = 0;
boolean done = false;
void setup(){
pinMode(11,OUTPUT);
Serial.begin(19200);
// have device warm up
delay(1000);
// send two Carraige Returns to AutoSet Baudrate
Serial.print('\r',BYTE);
Serial.print('\r',BYTE);
delay(1000);
Serial.print('q',BYTE);
Serial.print('\r',BYTE);
delay(1000);
setupFile();
delay(1000);
}
void loop(){
if(!done){
if(sensorCounter <>
byte analog = analogRead(0) / 4;
Serial.print("w #1 2"); // send 2 bytes (one is the sensor number,one is the \n for reading later)
Serial.print('\r',BYTE);
delay(1000);
Serial.print(analog,BYTE);
Serial.print('\n',BYTE);
Serial.print('\r',BYTE);
sensorCounter++;
} else {
digitalWrite(11,HIGH);
done = true;
}
}
delay(1000);
}
void setupFile(){
Serial.print("ow A:\\DATA");
Serial.print(fileCounter,DEC);
Serial.print(".TXT");
Serial.print('\r',BYTE); // CR to send message
}
//------------------------------------------------------------------------


from this code.


3. http://itp.nyu.edu/~sk2745/sensor/DATA3.TXT

4. http://itp.nyu.edu/~sk2745/sensor/DATA5.TXT




Problem
1: How to save exactly right serial data to computer and micro SD card

2: How to read data inside micro SD card

3: Is it possible to use Arduino as a serial to usb device?

Sunday, March 2, 2008

Datasheet Report:

Datasheet Report

LHI878 - LHi 878 Standard Dual Element Detector
http://optoelectronics.perkinelmer.com/

Human and animal emitte infraed light which range is 9.4uM.
The LHi 878 can detect 8~14uM infraed light.

The LHi 878 pyroelectric infrared-detector series are the standard dual element design recommended for all variants of motion control. They include a dual element pyro-electric ceramic with FET in source follower connection. The LHi 878 is available as TO-5 housing with standard infrared filter. It provides for high responsivity with excellent common mode performance (match). RF improved options are available.

*view*
D- supply a voltage to 'Drain'
s - get the signal from the 'Source' which require a load resistor which is recommended to 47 kohm
g - supply GND

*how work*
*configuration*


Datasheet:
click the image



Question.
How can I work with this sensor at Arduino?
Do I have to make some citcuit or something?