Go to Post wait a minute...Dave posted a hint here yesterday. but no one has tried to analyze it word by word. has something changed since the kickoff??? - jerry w [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2010, 23:43
Golto's Avatar
Golto Golto is offline
Registered User
AKA: Pat Plude
FRC #4572 (BArlow RobAutics)
Team Role: Mentor
 
Join Date: Oct 2006
Rookie Year: 2007
Location: Bethel, CT
Posts: 91
Golto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of lightGolto is a glorious beacon of light
Signal Noise

I don't know how useful this info will be, but I was able to graph out signal noise across a couple KOP sensors.

The hardware was tested on an Arduino Diecimilia, Analog port 0, the code will be posted later. I also used a program called Gobeteeno to assist in logging the data. Then in Excel I manipulated the data and generated a graph. The data was taken over 100 samples 1/10 of a second apart.

The sensors tested were the 2009 KOP 3-axis Accelerometer and the 2010 KOP Gyro, rate and temp. The graphs are attached as a .zip, inside are the PDFs generated.

INSTRUCTIONS:
  1. Download Betweeno from http://mikmo.dk/gobetwino.html
  2. Consulting documentation, add a process for EXCEL in Gobetwino
  3. program the arduino with the following code
  4. start gobetwino
  5. press reset on the Arduino
  6. watch as the data populates!

Code:
/*****************************
 * ANALOG SENSOR NOISE TEST  *
 * 2010 Patrick Plude        *
 *****************************/
 
// some setup variables
int serInLen = 25;
char serInString[25];
int pId =0;
int result;

void setup() 
{ 
  Serial.begin(9600); 
  Serial.println("#S|EXCEL|[]#");        // start EXCEL
  readSerialString(serInString, 5000);  // wait  5  seconds (max) for answer from Gobetwino (=porcess ID)
  pId= atoi(serInString);               // convert result to integer 
  sendAnalogValues();                       // send some data to Excell
} 
 
void loop() 
{ 
  // no code here, all carried out in subroutines!
} 

void sendAnalogValues() 
{
   char buffer[5];
   int sensorValue;
   
   for (int i=1; i<=100; i++){
     //Read the sensor values
     sensorValue=analogRead(0);
  
    //Send the values as though it was typed into Excell, using the SENDK command
    // This is the total line that is send: #S,SENDK,[pId; sensorValue {TAB} potValue2 {DOWN} {LEFT} ]#
     Serial.print("#S|SENDK|[");
     Serial.print(itoa((pId), buffer, 10));
     Serial.print("&");
     Serial.print(itoa((sensorValue), buffer, 10));
     Serial.print(" {ENTER} ");
     Serial.println("]#");
     // wait up to 1000 ms for answer from Gobetwino, answer will be in serInString, answer is 0 if all is OK
     readSerialString(serInString, 1000);
     //Deal with answer here - omitted in this example
     delay(10);
  }    
} 

//read a string from the serial and store it in an array
//you must supply the array variable - will return if timeOut ms passes before the sting is read so you should
//check the contents of the char array before making any assumptions.
void readSerialString (char *strArray,long timeOut) 
{
   long startTime=millis();
   int i;

   while (!Serial.available()) {
      if (millis()-startTime >= timeOut) {
         return;
      }
   }
   while (Serial.available() && i < serInLen) {
      strArray[i] = Serial.read();
      i++;
   }
}
Enjoy! Any questions, send me a PM
Attached Files
File Type: zip noise data.zip (285.5 KB, 44 views)
__________________
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoders — Noise keehun NI LabVIEW 5 19-01-2009 01:37
CIM Noise whytheheckme Motors 5 14-02-2008 11:34
PWM Signal Noise? Danny Diaz Electrical 3 28-01-2007 17:02
Noise Makers!!!! skitz547 Chit-Chat 26 02-02-2003 00:30


All times are GMT -5. The time now is 07:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi