Introduction

Measure PAR in μmol/M²/S

Characteristics

  • Spectral Range: 400~700nm
  • Accuracy: ±5%
  • Range: 0 - 2500 μmol/M²/S
  • Interface: I2C
  • Voltage Range: 3.3 - 5 V

Connections

I2C Connections

If you use the Qwiic connector, it is keyed and can only be inserted one way.

A 2.54mm through-hole header is also available. The pins are as follows:

EC Probe Interface Master device
GND Ground connection
SCL SCL
SDA SDA
3.3/5v 3.3 - 5 V power source

PAR Sensor Connections

The sensor is connected to the sensing circuit by three wires, red (power), green (ground), and yellow (signal). The connector on the board is a push to fit connector; push the red wire into the slot labeled R, green into the G slot, and yellow into the Y slot.

To disconnect the wires, depress the small hole on each slot and pull out the wire.

I2C Bus Pull-ups

There only needs to be one device with active pull-up resistors. Each board comes with the resistors active. Several boards can typically be connected with active resistors, however if connection problems are present, choose one board to keep the resistors active and disable to rest.

Each device comes with 4.7k resistor pullups on the I2C bus. They pass through a 3-pad solder paste jumper. The outer pads are connected to the middle pad by thin traces. To disable the pullups, use a utility knife to cut both traces. To re-enable the pullups, connect all three pads together with solder.

solder paste jumper

Getting Started

To start using the device, you need to install a library for your board/platform.

  • Arduino IDE: go to the library manager (Sketch / Include Library / Manage Libraries...) and search for uFire PAR Sensor.

  • PlatformIO: install the library using the library manager (PlatformIO / PlatformIO Home / Libraries) and search for uFire PAR Sensor.

  • Particle.io: search for uFire PAR Sensor in the Libraries section of the IDE.

  • Raspberry Pi: clone the GitHub repo. The library is located in the python/RaspberryPi directory. Have a look at the README for instructions. Be sure to read the section below for instructions.

  • Rust: Download/install/documentation for the crate

Raspberry Pi

Before you can begin, you will need to enable software I2C. The Pi's hardware I2C implementation has a clock-stretching bug that will prevent it from working reliably. From a terminal, type:

  1. sudo nano /boot/config.txt and scroll to the bottom

  2. Add dtoverlay=i2c-gpio,i2c_gpio_sda=<pin>,i2c_gpio_scl=<pin> replacing <pin> with whatever pin you'd like to use. Refer here for the pin functions, you will need to use the orange GPIO xx labels in the picture to locate the pins.

  3. ctrl + x to exit, y to save, and enter to confirm the filename.

  4. reboot

The shell Example

An interactive shell interface is provided and is a quick and easy way to get started using the device. You will find the equivalent commands in the code area below when applicable. Upload it to your device, start a serial terminal and you will get a > prompt where you can enter commands and receive a response like a terminal or REPL. It is often quicker to experiment with things this way rather than rewriting, compiling, and uploading new versions every time.

Changing the I2C Address

If needed, the I2C address can be changed programatically by calling setI2CAddress. The device will permanently change the address and continue to use it after a power reset. If you forget the new address, you will need to use an I2C bus scanner to recover it.

Class Initialization

  • C++: There are several class constructors available.
    • Default: uFire_PAR par;
    • Custom I2C Address: uFire_PAR par(0x4B);
    • ESP32 I2C Pins (SDA, SCL): uFire_PAR par(19, 23);
    • ESP32 I2C Pins and I2C Address: uFire_PAR par(19, 23, 0x4B);
  • Raspberry Pi Python: You can optionally pass the I2C address and/or bus.
    • Default: par = uFire_PAR()
    • Custom I2C Address: par = uFire_PAR(address=0x4B)
    • I2C System Bus: par = uFire_PAR(i2c_bus=3)
    • I2C System Bus Address: par = uFire_PAR(i2c_bus=3, address=0x4B)
  • Rust: Always pass the I2C system bus, and I2C address.
    • Default: let mut par = PARSensor::new("/dev/i2c-3", 0x3c);

Calibration

The sensor comes pre-calibrated and no further calibration is needed.

Use

Position the sensor at the location and height to measure PAR. The sensor includes a bubble level to ensure the probe is perfectly horizontal; the ideal angle of light hitting the sensor is perfectly vertical.

Measurement Time

Each PAR measurement takes 250ms.

More Help

If you have any questions, find a bug, or have any suggestions, go to this project's GitHub page and submit an Issue or Pull Request. Or you can send an email to [email protected].