TTN meets RIVM. or: how to-make your own lora air quality sensor

Visualizing the data

For the time being we use a straight forward dashboard which is connected to the TTN application. If you would like to connect your node to it too please contact @jdelaet for credentials and more details.

This is an intermediate solution. I hope that in the next few weeks it becomes clear when RIVM is able to open their network for external sensors. If it won’t take too long that would be a great option and then there’s no need to develop a separate dashboard. If it takes longer we’ll have to look how proceed and build something ourselves.

And next…

Saturday is the big day :slight_smile:

Open issues

  • Modifying the PCB in particular to get rid of the level shifter
  • Possibly building something to visualize the data
  • Figure out how to convert the measurement count to actual particle mass. This may need some explanation. The formula from the dustduino doesn’t work on nodes. I suspect that the level shifter has got something to do with it, although it’s not that likely since it’s a digital signal. Another option could be that the LMIC timing/scheduling mechanism does something I can’t explain.

Feel free to join!

@arjanvanb @lex_ph2lb @douglarue @iserve-it (what’s martijn’s/woerden forumname?)

2 Likes

Sorry it won’t be in time but I’ll try to start working on updates to help out your project. Specifically to the ProMini PCB.

We got media coverage :slight_smile:

edit: just got a phone call from them. The lack of a reference was based on a misunderstanding. They will add it right away.

3 Likes

HI TijnOnlijn

I think the schematics can be simplified be replacing the level shifters with just a simple (two resistor) voltage divider. The pulses from the sensor are relatively slow (5ms to 100ms) so a simple 2k2 + 3k9 divider should work just fine.

1 Like

Thanks, I got that feedback from some other users too per pm/slack/mail. Initially choose the level shifter because a general thought about this seemed to be that using resistors is a bad practice. This would be because you theoretically would never know what the input would be.

On the other hand this is a digital signal which means you can safely assume it will always be more ore less 5v. I guess it’s correct but I didn’t have time to dig into the subject yet. What I don’t understand though is why you need 2 instead of 1 resistor per line. To my surprise this is what everyone tells me, but could someone explain me why? Wouldn’t one single resistor per line drop the voltage too?

One resitor will only limit the current but not the voltage. So you need a voltage divider using two resitors.

Vin are the 5V pulses from the sensor, using a 2k2 (R1) and a 3k9 (R2) resistor will limit the output voltage (Vout) to a safe 3.2V puls.

1 Like

I’m wondering why you don’t store the raw (Lo Pulse Occupancy Time) values and do the math (conversion to particle mass) when visualising the data. This makes it more flexible to optimise the conversion (without reprogramming all your nodes).

1 Like

For the actual sensor I do, good remark. It seems like I’ve put a proof of concept sketch on github. I’ll update the sketch.

We lack some time to do a proper analysis of the data so far. Is there someone willing to help on this?

The wiring

update 28/3/17: There was a bug in the wiring, the 2k2 resistors should be ‘left’ of the 4k7 split. The current image is correct.

And this is pretty cool. We’re currently in the technical testing phase so we didn’t really pay attention to calibration yet. After deploying 4 sensors in a 100 meter radius this is a snapshot of the result. As you can see the are remarkably consistent, but the yellow sensor is very interesting… this one initially was almost identical with the red one until the tape covering the cleaning hole came off due to moisture. It was then put back again but after that incident it seems to measure more extreme results, so during the next round of maintenance i’ll check if the tape is really still where it should be.

We also fitted two of them with HTU21d temparature/moisture sensors. I’m not sure if it’s really needed but we’ll find out :slight_smile:

On February 11 and 12 there was a long and high peak in the measurements. Initially I though there was something wrong with the sensors, but then we compared it with 2 RIVM stations 25km away:

They measured the same peak, so our sensors are still fine and it was a real measurement. And then I read this . Great to see our sensors signaled it too.

1 Like

Do i understood your sketch right, that you turn on the sensor every 33 minutes for 5 minutes and transmit the result? Is the running interval long enough to get a good reading and could it be shortend to lets say 3 minutes or so to reduce power consumption? I ask because i thought about running this sensor from a LiPo (with step up for the sensor) - do you got any data how much mA the sensor uses, or is this totally out of reach?

Hi TijnOnlijn, did you ever tried the newer type Nova SD011 sensor ?

no, it does measure permanently and every 5 minutes it calculates the result of the measurements and it transmits. Low power is simply impossible with this kind of sensors because regardless any sleep modes on the controller you still need something to maintain an air flow. This could be a serious resistor that gets hot or a fan but whatever you choose it will consume a lot of power

edit: not sure what you’re aiming to measure, but few weeks ago I spoke with someone who tried to use the sharp dust sensor for smoke detection. If that is what you also try to achieve low power would be possible though, because of the high concentrations you don’t need much airflow. Besides that one works with analog readings so I guess you could figure something out with a threshold connected to an interrupt. For air quality measurements it seems to be less suitable though.

I didn’t but I believe it may be slightly better in particular on shorter time spans. Although a fan on a PPD42NS might fix this to a large extent. Still with this kind of experiments the technical implementation is not that hard; interpretation of the results is what makes life difficult. By sticking to the PPD42NS setup it stays compatible with the RIVM setup. This means it will take much of the load of interpretation of our shoulders since they’re the experts on this.

Thank you @TijnOnlijn i thought you used “TX_INTERVAL = 2000;” somewhere - that was my confusion about the timing. I want to build something similar you did, getting readings on pm2.5 and pm10, but the thing is that we don’t get power everywhere and if we get power we most likely have access to wifi too, so i can use a build with a esp8266 (like http://luftdaten.info/ does). So i would love to have a build (arduino pro mini based) lowpower enough to maybe get it solar powered to use it outside the city (i am from a very rural town with over 100 villages counting to our town).

The PPD42NS is does measure PM2.5, but from what I’ve seen it doesn’t work that well because it would not be sensitive enough. The sharp sensor is said to be better on this, but then again that one doesn’t measure PM10. Perhaps just picking either PM2.5. or PM10 would be a good start.

I don’t understand your power issue though. It sounds counter intuitive that you do have WiFi access available but no power. Is there really no way to get power somewhere? With solar it’s easy to a certain extent… just get a solar panel that’s big enough. I didn’t measure it myself but I believe I read somewhere that the sensor itself draws about 90mA.

Thank you for the info about the sharp sensor!

About the power, what i wanted to say was, that if a location has a power supply i will have in 99% of the cases wifi there too (so i do not need lorawan), the spots without power are the ones where i will need lorawan, because those spots will not have wifi.