Skip to content

evanxd/js-station

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The sensor station built by Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published