/arduino-i2c-sen5x-to-RS485

SEN5X to RS485

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Requirement

  1. SENS SEN55-SDN-T
  2. JST GHR 6 pin cable
  3. Arduino Nano Every
  4. TTL to RS485, MAX485
  5. (optional) USB-RS485-WE

The connection from SEN55 to Arduino

SEN5X Arduino Jumper Wire
VCC 5V Red
GND GND Black
SDA SDA Green
SCL SCL Yellow
SEL GND for I2C Blue

The connection from Arduino to TTL to RS485

Arduino TTL to RS485 Jumper Wire
TX DI Green
RX RO Orange
D2 DE Brown
D2 RE Brown

The connection TTL to RS485 to USB-RS485-WE

TTL to RS485 USB485 Jumper Wire
A DATA+ Orange
B DATA- Yellow

For the 5V supply conect the USB485 GND & 5V to the arduino or use the usb power supply.

Installation

  1. Download the latest SensirionI2CSen5x release with Arduino IDE via

    Sketch => Include Library => Manage Libraries => Search for SensirionI2CSen5x and install it

  2. Open the arduino_nano_every file within the Arduino IDE

  3. Click the Upload button in the Arduino IDE or

    Sketch => Upload

Read the data

  • Mode: RTU
  • Baudrate: 96000
  • Slave ID: 42
  • Parity: None
  • Data bits: 8
  • Stop bits: 8
Holding Register Data
0x00 PM1
0x01 PM2.5
0x02 PM4
0x03 PM10
0x04 Humidity
0x05 Temperature
0x06 Vox
0x07 Nox
0x08 Error

Troubleshooting

If you want use another Arduino device initialize the RS485Class with the proper serial port.