Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.54 KB

README.md

File metadata and controls

70 lines (49 loc) · 2.54 KB

JS Station

This is a node.js based sensor station, it reads data from USB serial device and send them to SensorWeb. You can run it on Mac OS, Linux, and Windows.

Since our first initiative is to build a PM2.5 sensor network, we will demostrate below how to setup the station with PM sensor connected.

Hardware Requirements

  • Arduino Board
    • Currently we only develope and test it on Arduino Uno.
  • USB 2 TTL Adapter
    • Currently tested adapters are based on PL2303/FT232RL/CP2102 chipsets, make sure yours have 5V output.
  • Plantower PM Sensor with Cable

for Arduino and USB 2 TTL adapter, you only need one of them to get started.
Arduino will allow you to connect more different sensors in the future.

Setup Steps

Step 1: Install Arduino Firmware or USB to TTL Driver

If you use Arduino, simply upload the Plantower PMS3003 firmware with Arduino IDE.

If you use an USB to TTL Adapter but your computer can't detect it, try to install it's official driver. Below are driver download links for supported adapters:

Step 2: Connect Sensor

You only need to connect 4 pins of the PM Sensor, others should be left unconnected.

PM Sensor Pins USB Adapter Pins
VCC (PIN1) +5V
GND (PIN2) GND
RXD (PIN4) TXD
TXD (PIN5) RXD

Step 3: Setup and Run

Clone the repo: git clone https://github.com/sensor-web/js-station

Go to the js-station directory.

Do npm install to install dependencies.

Edit config.js to put your sensorId and apiKey in it, serialDeviceType: 'arduino' if you're using Arduino or set serialDeviceType: 'usbttl' if you're using supported USB to TTL Adpater.

Run node app.js then you'll see console output if success.

Maintainers