Close
0%
0%

Environmental Sensor Using Arduino Feather

Uses an Arduino, a color Display, an ENS160 and a BME280 sensor, to show your air quality (TVOCs, eCO2), temperature, humidity, and Pressure

Similar projects worth following
Using a Novaduino color display, an ENS160 sensor and a BME280 sensor, you can see your air quality (TVOCs, eCO2), temperature, humidity, and barometric pressure. Keep track of your surroundings using this advanced sensor, perfect for learning about Arduino programming, soldering electronics, and 3D printing Instantly view the carbon dioxide levels in your room along with various Volatile Organic Compounds (VOCs), such as ethanol, toluene, hydrogen, and other oxidizing gases. These readings are combined to give you an Air Quality Index (AQI) indicator. It also measures temperature, humidity, and barometric pressure, displaying all results on a Novaduino® 2.4” touchscreen color display powered by open-source software on an Arduino-compatible Feather processor. Because the system is open source, you can add more sensors and personalize the display.

This project uses an Adafruit Feather M0 Express module with a Microchip ATSAMD21 processor running at 48 MHz and can be purchased from Adafruit. Alternatively, you can use almost any Feather compatible processor module such as the SparkFun ThingPlus SAMD51, or the Adafruit Feather M0 WiFi, or even an RP2040 Feather processor module. These have all been tested with the software (some pin numbers and variable definitions need to be changed, but that is noted in the software comments).

The Feather processor plugs into the back of the Novaduino Display PCB after soldering the headers. The Novaduino PCB comes with a color resistive touch 2.4" display, 3 tact switches, and one rotary encoder as well as an enable switch. The Novaduino Display KIT001 can be purchased on Tindie.

One change that is needed for every new build is to set your elevation in the code. To display Barometric Pressure at equivalent sea level, you need to adjust MYALTITUDE in the software to match your actual altitude above sea level (in feet). This can be found on the internet by doing a search for “what is my elevation.” We have used "whatismyelevation.com" to successfully determine our altitude.

You can also set MYALTITUDE to 0.0 to determine the actual Barometric Pressure at your location. Weather stations, however, typically provide equivalent sea level Barometric readings.

We plan to add the ability to set the MYALTITUDE variable via the rotary encoder in a future release of the software.

You should probably also calibrate your sensors. We have provided variables for this purpose for temperature, humidity, and pressure, but these are not guaranteed to be the best method of calibration as it is only a calibration at one point. Actual calibration may not be linear, we have not determined this, so it is up to you to determine.

Although the sensors are high quality, please do not use this Environmental Sensor for any critical applications, we do not guarantee its accuracy. Please refer to the BOSCH ENS280 and the SCIOSENSE ENS160 data sheets and specifications.

If the assembly and software loading directions below are too brief to follow, I have included much more detail, photos, and screen shots in the Environmental Sensor Assembly Manual linked below.

The cardboard gasket along with the sensor enclosure serves to thermally isolate the BME280 temperature/humidity/pressure sensor from the rest of the unit for more accurate readings. The first time we built this Environmental Sensor we used a module that had both the BME280 and the ENS160 right next to each other on the same pcb module. Strangely the temperature seemed very accurate when we first turned the unit on but within a few minutes it was reading too high by about 10 degrees F. We later figured out that the ENS160 internal air quality sensors function by heating up the air with a small heater that was affecting the adjacent BME temperature readings. We devised a sensor enclosure and spaced the two sensors as far apart as possible to reduce this effect. Even with this thermal isolation, we have found that the temperature measurement is about 2 degrees too high, so we added the TEMPCAL variable to the software to allow correction. We don't guarantee that our calibration is correct, it is up to you to calibrate your own Environmental Sensor and to determine if a more complex calibration algorithm is necessary. This statement also goes for the Humidity calibration and the pressure calibration; it is up to you to determine their suitability.

  • 1 × BME280 Sensor -Temp/Humid/Press SparkFun SEN-15440 with Qwiic connectors
  • 1 × ENS160 Sensor - AQI/TVOC/eC02 SparkFun SEN-20844 with Qwiic connectors
  • 1 × Novaduino Display KIT001 includes 2.4" LCD, PCBA, LCD Spacer, Enable Switch, Headers, light pipes, EZ-LOKs, and screws. Add option for 3 tact switches and 1 Rotary Encoder
  • 3 × Tactile Switch and Key Cap E-Switch TL1105SPF160Q. you may add this option to the Novaduino Display KIT001 on Tindie
  • 1 × Rotary Encoder and Knob E-Switch PEC12R-3220F-S0024. you may add this option t the Novaduino Display KIT001 on Tindie.

View all 10 components

  • 1
    Building The Hardware

    Solder the enable switch, the 3 tact switches, the rotary encoder, and the Feather Header sockets to the Novaduino PCB. You can also add a 5-way navigation switch if you would like, however this software does not yet support that, but you can change the software as you like.

    Next very carefully attach the display module to the Novaduino PCB using the 40 pin FPC connector on top. Use the LCD Spacer that came with the Novaduino KIT001 to hold the display in place.

    Plug the Feather Processor into the socket on the back of the board and then plug the ENS160 sensor into the Qwiic socket on the baoard using the 100mm Qwiic cable. Next plug the BME280 sensor into the 2nd jack on the ENS160 board using the 2nd 100mm Qwiic cabel. Now you are ready to load the software before mounting the Environmental Sensor into its case.

    This shows the Novaduino Display using an Adafruit Feather RP2040 with an Internal USB programming cable.

  • 2
    Loading The Software

    The software can be downloaded from GitHub the link provided below. Once it is downloaded, save it to your Arduino folder then open the Arduino IDE and open it up. Before making changes to the software, I suggest making it your own by saving it to a new file name on your computer. 

    Now that the software is loaded into the Arduino IDE, connect a USB cable to your computer and to the USB micro-B socket that is directly on your Feather (or you can plug your computer directly to the USB-C connector on the Novaduino PCB if you have the internal USB programming cable.) Next select your specific processor in the Arduino IDE Tools/Board/Boards Manager... menu. 

    Next turn the enable switch on, then you should hear a chime on your computer. Now go to the Tools/Port menu on the IDE and select the port for your processor, it should indicate the name of your processor.

    Make the changes to your code as indicated in your copy of the software for your specific display driver and for your specific processor if needed. 

    One change that is needed for every new build is to set your elevation in the code. To display Barometric Pressure at equivalent sea level, you need to adjust MYALTITUDE in the software to match your actual altitude above sea level (in feet). This can be found on the internet by doing a search for “what is my elevation.” We have used "whatismyelevation.com" to successfully determine out altitude at 4305 feet.

    You can also set MYALTITUDE to 0.0 to determine the actual Barometric Pressure at your location. Weather stations, however, typically provide equivalent sea level Barometric readings.

    We plan to add the ability to set the MYALTITUDE variable via the rotary encoder in a future release of the software.

    You should probably also calibrate your sensors. We have provided variable for this purpose for temperature, hunidity, and pressure, but these not guaranteed to be the best method of calibration as it is only a linear calibration. Actual calibration may not be linear, we have not determined this, so it is up to you to determine.

    Please do not use this Environmental Sensor for any critical applications, we do not guarantee its accuracy.

    Now compile the code to make sure it has no errors and then download it to your processor. 

    If these directions are too brief to follow, I have included much more detail, photos, and screen shots in the Environmental Sensor Assembly Manual linked below.

    One note, if your display shows the text and graphics upside-down and sideways etc... then you probably need to switch the display driver between the 2 drivers in the code. There are two display drivers: ILI9341 or ST7789. Change the code near line 51. It should be either:  "define ILI9341" or "define ST7789". 

  • 3
    3D Print the Case

    3D-print the STL files. I am still working to publish the STL files, in the meantime, please email me at support@novaradiolabs.com to request the 4 files listed below and I will email you the latest files. 

    We use PLA but you may print in other materials. If the size of mounting holes and other parts are too small or too large you may need to scale the STL model in your slicer software. We have printed each file many times with the layer heights listed above on our Bambu Lab P1S printer with good success. You may need to experiment a bit.

    We provide STL, STP and F3D (Autodesk Fusion model) files for the Faceplate so that you can customize it to your liking.

    1. Faceplate                         PLA      0.2 mm layer height        No Support Needed
    2. Front Bezel                      PLA      0.2 mm layer height        Some Support Suggested
    3. 50 mm Vented Case       PLA      0.2 mm layer height        No Support Needed
    4. Sensor Enclosure            PLA      0.2 mm layer height        Some Support Suggested

    You may also purchase these 3D-printed items on Tindie, please see the links below.

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates