Skip to content

How to use SDS011 as a mobile PM sensor

MagTun edited this page Jul 24, 2019 · 9 revisions

Option 1: read the sensor with your phone using a USB cable

How it works: The SDS011 is connected via a USB cable adapter to an Android device and the data are retrieved in an app.

Advantages:

  • live measurement
  • no NodeMCU
  • the Android device powers the sensor via USB so no need for an external battery or a USB charger

Inconvenient:

  • there is no interval between the measurements (this significantly reduces the sensor life span),
  • it doesn't save the data

You need:

Steps:

  • Download the MobileFeinstaub.apk, transfer it on your Android, an install.
  • Connect together the SDS011, the data cable, the USB key, the Micro-USB-to USB Adapter, your Android
  • Open MobileFeinstaub app. If needed allow the USB connection

Option 2: read the sensor data using a device with a wifi hotspot (no internet connection required)

How that work: The SDS011 is connected to a NodeMCU with the Luftdaten software installed and the data are sent to a phone via it Wifi hotspot (a connection to the internet isn't required unless you want to save the PM values).

Advantages:

  • intervals between measurement (this saves the lifespan of the sensor)

Inconvenient:

  • you need a way to power the sensor: USB charger or battery

In brief: first you create a hotspot on your phone. When the NodeMCU starts, it looks for a Wifi connection, if it can't connect to a Wifi, the NodeMCU creates its own hotspot. With your smartphone, you connect to this hotspot which allows you to change the settings of the network it should connect. When you restart the NodeMCU, it will connect to the network (in this case your phone hotspot). Then you get the PM values via the web page generated by the NodeMCU.

You need:

  • an SDS011 and a NodeMCU with the luftdaten software installed
  • a device with hotspot capacity (ex: a smartphone - in this example we use an Android phone)
  • a way to power the sensor (ex: battery)

Steps (with an Android phone):

  • on your Android, create a hotspot name and set a password to it. Do not switch the hotspot ON yet.
  • Switch OFF your home wifi and restart your NodeMCU (by unplugging/re-plugging it). The NodeMCU will create a hotspot (it switch to "access point mode")
  • on your Android, go to the list of available Wifi and click on "Feinstaubsensor-ID",
  • on your android, open a browser and go to the URL 192.168.4.1
  • enter your Android hotspot name and password and click "save and restart", wait 30 secs.
  • unplug your NodeMCU, switch on your Android hotspot, plug the NodeMCU wait 30 sec
  • to see if the NodeMCU is connected to your Android hotspot, open a terminal app and enter IP neigh, you should see something like this https://i.stack.imgur.com/lR8Qxl.png. Copy the IP address (in this example 192.168.43.72) [for other methods to retrieve the IP address: see StackExchange or StackExchange]
  • open a browser, enter the IP address: you should see the home page of Luftdaten where you can get the PM values by clicking on "Current Data" (the data and the HTML formating are generated by the NodeMCU)
  • if you have the data(3G/4G/5G) enable on you Android, the measurement will be transmitted to madavi (and luftdaten map if you registered) and the other APIs you added (like OpenSenseMap). If there is no connection, the data will be only displayed but not saved.

Seiten

Dokumentation

Protokolle

for more, see Protokolle

Clone this wiki locally