Post a new topicPost a reply Page 1 of 3   [ 21 posts ]
Go to page 1, 2, 3  Next
Author Message
 Post subject: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Fri Oct 07, 2011 1:56 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
we ordered the smart city sensor board, and the Dust and Noise sensor, but i am confused of the correspondence between the sockets and the sensor, for the Dust sensor, there are 6 pin with the color of Red, Green, Black, White, Blue and orange, is the Red one the V-LED ? Green - LED-GND, black - LED, white - S-GND, blue - Vo, and orange - Vcc ?

second question,
i connected the Noise sensor to the Microphone socket (pin 1 and 2), but i am afraid that i connected them in the wrong way, i am confused of how to take them out, it was said in the document, 'press the above the input pin' , where is it ?

anybody can help me? thanks very much.

Jessie


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Fri Oct 07, 2011 3:11 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7470
Hi jessie,

the colour code of the dust sensor probes will be included in the next technical guide version, but you should have received a sheet with the board indicating the connections. If you didn't, please contact our commercial department and we will send it to you in pdf format.

About the second question, in page 28 in the technical guide there is a picture of the front view of the connector. You should press inside the slot just above the input whole.

Regards.


Top
 OnlineProfile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Fri Oct 07, 2011 4:17 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
Hi Libelium-dev;

thanks very much for your reply, but i do not have the sheet now, and the person ordered these sensors are currently away, i only have the Delivery Note Document NO 502905, - 07/26/2011
Can send the pdf file to me please? my email: jessie.jie.wan@gmail.com
thanks a lot.

Jessie


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Mon Oct 10, 2011 1:10 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7470
Hi jessie,

you may download the document with the color code of the dust sensor probe from this link:

libelium_files/dust_sensor_color_code.pdf

Regards.


Top
 OnlineProfile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Mon Oct 10, 2011 2:11 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
thanks a lot.


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Mon Oct 10, 2011 6:42 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
Hi;

i am stuck on the noise and dust sensor now, Please see below, which is the code i more less copied from the online document, basically i just want to read the value from the dust / noise / temperature sensors, i tried few different way, but the values i got are
Dust value : 0.0000000000
the noise value : 0.0000000000
the temperature value : -50.0000000000

for the dust and noise sensor, i think they should be connected correctly, but why the values are always 0. and for the temperature value, in the new API, is the temperature converted into Celsius value? but why it is -50 ..?

anybody knows what's the problem?



void setup(){

//setup for Serial port
USB.begin();
USB.println("Setting up smart city sensor board...");
//switch on the smart city sensor board

SensorCities.setBoardMode(SENS_ON);

//SensorCities.setLoadResistor(24);


SensorCities.setThreshold(SENS_CITIES_DUST,1.5);
SensorCities.setThreshold(SENS_CITIES_AUDIO,1.6);
SensorCities.setThreshold(SENS_CITIES_TEMPERATURE,1.7);

SensorCities.setAudioGain(10,2);


}


void loop(){

SensorCities.attachInt();
//PWR.sleep(UART0_OFF | UART1_OFF | BAT_OFF | RTC_OFF);
SensorCities.detachInt();
SensorCities.loadInt();

// USB.begin();
// USB.println("Setting up smart city sensor board...");

//if (SensorCities.intFlag & SENS_CITIES_DUST){

SensorCities.setSensorMode(SENS_CITIES_DUST, SENS_ON);
//SensorCities.setThreshold(SENS_CITIES_DUST,1);
delay(100);
float dust = SensorCities.readValue(SENS_CITIES_DUST);
USB.print("Dust value : ");
USB.println(dust);
// USB.println(SensorCities.readValue(SENS_CITIES_DUST));
//}

//if (SensorCities.intFlag & SENS_CITIES_AUDIO){

SensorCities.setSensorMode(SENS_CITIES_AUDIO, SENS_ON);
//SensorCities.setThreshold(SENS_CITIES_AUDIO,1);
delay(100);
float noise = SensorCities.readValue(SENS_CITIES_AUDIO);
USB.print("the noise value : ");
USB.println(noise);
// USB.println(SensorCities.readValue(SENS_CITIES_AUDIO));
// }


//if (SensorCities.intFlag & SENS_CITIES_TEMPERATURE){
SensorCities.setSensorMode(SENS_CITIES_TEMPERATURE, SENS_ON);
//SensorCities.setThreshold(SENS_CITIES_TEMPERATURE,1);
delay(100);
float tem = SensorCities.readValue(SENS_CITIES_TEMPERATURE);
USB.print("the temperature value : ");
USB.println(tem);
// USB.println(SensorCities.readValue(SENS_CITIES_TEMPERATURE));

// }

//USB.close();
SensorCities.attachInt();


delay(5000);


}


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Tue Oct 11, 2011 12:48 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
Image

just upload the pictures to make sure that i connected the sensors correctly.

Regards
Jessie


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Fri Oct 14, 2011 1:58 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7470
Hi jessie,

connections are right, but you should change the setSensorMode lines in your code, owing to an error in the documentation the order of the parameters is inverted. This is the way they must be called:

Code:
SensorCities.setSensorMode(MODE, SENSOR);


We are very sorry for the inconvenience, best regards.


Top
 OnlineProfile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Fri Oct 14, 2011 2:35 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
Hi Libelium-dev;

i have changed that, but it doesn't solve the problem completely; cos i only can get the noise value once,
the result i got is :

Setting up smart city sensor board...
Dust value : 0.0916129016
the noise value : 77.3039779663
the temperature value : 20.9677429199

Dust value : 0.0877419376
the noise value : 0.0000000000
the temperature value : 20.9677429199

Dust value : 0.0890322589
the noise value : 0.0000000000
the temperature value : 21.2903194427

Dust value : 0.0864516162
the noise value : 0.0000000000
the temperature value : 20.9677429199


you can see that the noise value only appears in the first loop, please see below, which is my code:


void setup(){

//setup for Serial port
USB.begin();
USB.println("Setting up smart city sensor board...");
//switch on the smart city sensor board

SensorCities.setBoardMode(SENS_ON);

SensorCities.setAudioGain(20,2.4);
SensorCities.setThreshold(SENS_CITIES_AUDIO,1.6);

}


void loop(){

SensorCities.setSensorMode(SENS_ON, SENS_CITIES_DUST);
float dust = SensorCities.readValue(SENS_CITIES_DUST);
USB.print("Dust value : ");
USB.println(dust);
delay(1000);

SensorCities.setSensorMode(SENS_ON, SENS_CITIES_AUDIO);
//SensorCities.setAudioGain(20,2.4);
float noise = SensorCities.readValue(SENS_CITIES_AUDIO);
USB.print("the noise value : ");
USB.println(noise);
delay(1000);

SensorCities.setSensorMode(SENS_ON, SENS_CITIES_TEMPERATURE);
float tem = SensorCities.readValue(SENS_CITIES_TEMPERATURE);
USB.print("the temperature value : ");
USB.println(tem);

delay(5000);


}


Top
 Profile  
 
 Post subject: Re: smart city sensor board, with Dust sensor and noise sensor.
PostPosted: Mon Oct 17, 2011 5:12 pm 

Joined: Wed Sep 07, 2011 4:06 pm
Posts: 96
Problem solved. by switch off the sensors in every loop;
void loop(){

SensorCities.setSensorMode(SENS_ON, SENS_CITIES_AUDIO);
noise = SensorCities.readValue(SENS_CITIES_AUDIO);
USB.print("the noise value : ");
USB.println(noise);

SensorCities.setSensorMode(SENS_OFF,SENS_CITIES_AUDIO);

SensorCities.setSensorMode(SENS_ON, SENS_CITIES_DUST);
dust = SensorCities.readValue(SENS_CITIES_DUST);
USB.print("Dust value : ");
USB.println(dust);
//SensorCities.setSensorMode(SENS_ON, SENS_CITIES_TEMPERATURE);
tem = SensorCities.readValue(SENS_CITIES_TEMPERATURE);
USB.print("the temperature value : ");
USB.println(tem);
USB.println(" \n-------------------------------------------------\n");

SensorCities.setSensorMode(SENS_OFF, SENS_CITIES_DUST);

delay(3000);
}

is this the right solution? i guess it is not, any other solutions ?

Jessie


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 3   [ 21 posts ]
Go to page 1, 2, 3  Next


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