Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Possibly Defective Noise Sensor
PostPosted: Mon Jul 02, 2012 8:30 am 

Joined: Wed Jun 06, 2012 7:03 pm
Posts: 68
Hello!

I was trying to get the noise sensor to work, but for some reason I would only receive values of 50 and 100 from the smart cities sensor board, so I looked on the forums and tested out this code here: http://www.libelium.com/forum/viewtopic.php?f=15&t=8612&p=19091&hilit=microphone+problem#p19091
Apparently, it was tested by Libelium, but for some reason the sensor is still returning values of only 50 and 100. The code and the noise sensor setup is shown below. Please let me know what went wrong. Thanks!

Code:
float noise;

void setup(){

  //setup for Serial port

  USB.begin();
  USB.println("Setting up smart city sensor board...");
  USB.println("\n-------------------------------------------------\n");
 
  //switch on the smart city sensor board
  SensorCities.setBoardMode(SENS_ON);
}

void loop(){

  SensorCities.setSensorMode(SENS_ON, SENS_CITIES_AUDIO);
  RTC.ON();
  SensorCities.setAudioGain(50,5); //frozen!!!
  delay(500);

  noise = SensorCities.readValue(SENS_CITIES_AUDIO);
 
  USB.print("the noise value : ");
  USB.println(noise);
  USB.println(" \n-------------------------------------------------\n");
 
  SensorCities.setSensorMode(SENS_OFF,SENS_CITIES_AUDIO);
   
  delay(3000);
}


Image


Top
 Profile  
 
 Post subject: Re: Possibly Defective Noise Sensor
PostPosted: Mon Jul 02, 2012 9:48 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi uilt,

do you have a calibrated board and sensor.

If this is the case, the sensor has been checket here at Libelium and it should work properly, but you'd need to do a couple of things regarding your code:

First of all, please use the API 025 version, where automated gain selection and calibration compensation has been included, and remove the setAudioGain line.

Secondly, turn on the RTC just after turning on the board, in the setup, and before turning on the sensor (it is within this function where the gain is configurated).

Please, try this and let us know.

In case your board was not calibrated (you should have a board, sensor and Waspmote labeled to work together) please contact our sales department fulfilling this form.

Regards.


Top
 Profile  
 
 Post subject: Re: Possibly Defective Noise Sensor
PostPosted: Mon Jul 02, 2012 8:42 pm 

Joined: Wed Jun 06, 2012 7:03 pm
Posts: 68
Thanks for the suggestions. I edited the code, but it's still returning the same values of 50 and 100.

I'm not clear on how to tell if the board and sensor are calibrated. If it helps, the audio sensor was welded to the sensor board when I received the order.

Here's the new code:
Code:
float noise;

void setup(){

  //setup for Serial port

  USB.begin();
  USB.println("Setting up smart city sensor board...");
  USB.println("\n-------------------------------------------------\n");
 
  //switch on the smart city sensor board
  SensorCities.setBoardMode(SENS_ON);
  RTC.ON();
}

void loop(){
  RTC.ON();
  SensorCities.setSensorMode(SENS_ON, SENS_CITIES_AUDIO);
 
  //SensorCities.setAudioGain(50,5); //frozen!!!
  delay(500);
 
  noise = SensorCities.readValue(SENS_CITIES_AUDIO);
 
  USB.print("the noise value : ");
  USB.println(noise);
  USB.println(" \n-------------------------------------------------\n");
 
  SensorCities.setSensorMode(SENS_OFF,SENS_CITIES_AUDIO);
   
  delay(3000);
}


And the output the code returns:
Image


Top
 Profile  
 
 Post subject: Re: Possibly Defective Noise Sensor
PostPosted: Tue Jul 03, 2012 9:22 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi uilt,

a way to find out if your board is calibrated is that your board, sensor and Waspmote must be labeled to identify as a whole operating unit. If not, please contact our sales department fulfilling this form so we can check it and start an RMA process.

Anyway, it is pretty weird you are getting only 50 or 100, the code is working properly here.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use