Hi, I'm using a particulate matter sensor (PMS5003) to measure particles and display it on a 20x4 LCD display, I was facing a lot of errors due to the libraries but I figured it out and the full code runs now, but I'm not receiving any data from the sensor, this is my code:
what Arduino are you testing the PMS5003 with?
it uses 3.3V logic so don't connect it directly to an Arduiono which uses 5V logic such as the Uno
how have you connected it?
the voltage divider should be OK - have you an oscilloscope to look at the lines?
perhaps take pin 3 SET and pin6 reset to 3.3V thru a 10Kohm resistor as Figure 3 Typical Circuit as in plantower-pms5003-manual_v2-3
Hi, I'm using a particulate matter sensor (PMS5003) to measure particles and display it on a 20x4 LCD display, I was facing a lot of errors due to the libraries but I figured it out and the full code runs now, but I'm not receiving any data from the sensor, this is my code:
Could it be that I'm connecting pin 4 and 5 (RX and TX of the sensor) to pin 3 and 2 of the Arduino, instead of connecting them to RX and TX (pin 1 and 0) of the Arduino?
Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting can result in a suspension from the forum.
In the future, please take some time to pick the forum category that best suits the subject of your question and then only post once to that forum category. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.
the example project is using pins 2 and 3 and SoftwareSerial - I assume you have 2 and 3 the correct way around
if I was doing this I would use an Arduino with 3.3V logic and hardware serial such as the Arduino Due - it makes like much simpler
for now just connect them to 3.3V thru 10Kohn and hopefully it should run
I cannot see anything the basic example of PMS library where SET and RESET are used
So, weeks ago I got readings from the pms5003 and it was only once that it worked, since then I haven't been getting any data from it.
I'm using the same code: