connecting two PM2.5 air quality sensors and receiving data simultaneously

Hello, I have been trying to figure out the code needed to successfully receive data from two of the PM2.5 air quality sensors at the same time, while hooked up to my arduino/uno. I have been able to connect one and get data out of that, but I am in need of having two running simultaneously. If anyone has any suggestions on how to do that, that would be great!

-Thanks

A link to the sensor data sheet would help.

http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf

mayabell7:
Hello, I have been trying to figure out the code needed to successfully receive data from two of the PM2.5 air quality sensors at the same time, while hooked up to my arduino/uno. I have been able to connect one and get data out of that, but I am in need of having two running simultaneously. If anyone has any suggestions on how to do that, that would be great!

-Thanks

NO wonder you can't figure it out. Can't be done with a UNO. You need a serial port for each of the two devices. Get an Arduino with two or more hardware serial ports.

Paul

mayabell7:
http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf

That's not a link. Its just a pasted address. This is a link.

Default baud rate:9600bps Check bit:None Stop bit:1 bit

As the baud rate is quite slow, the Software Serial library can be used to communicate between Uno and the sensors, I think.

However, by default, the sensor starts up in "Active Mode" where it sends data automatically at a rate depending on the rate of changes in sensor readings. This will result in both sensors sending data at the same time, which the Software Serial library won't be able to process.

By switching the units to "Passive Mode" (by sending a command at startup) will tell the sensors only to send their data on request. In this mode, the Arduino can request readings from each sensor in turn at whatever rate you like.