1. Pressure Logger Construction - sunny-day-flooding-project/tutorials_v1 GitHub Wiki

Table of Contents

  1. Tutorial Overview
  2. Hardware & Equipment
  3. PVC Housing
  4. Building Electronics Carrier
  5. Electronics Carrier
  6. Final Pressure Logger Assembly

Tutorial Overview

The Pressure Logger is the part of the Sunny Day Flood Sensor (SuDS) that is installed in the storm drain. The key components include the pressure transducer, the OpenLog Artemis (OLA) and Bluetooth Low Energy board (BLE) which work together to send data to the Communications Gateway. All electronics and batteries are secured in PVC housing that is waterproof.

Fully built pressure logger

Hardware & Equipment

Hardware List

Name Amount Required Picture
3D Printed Electronics Carrier 1 Link to CAD Files
PVC Pipe Primer 1
PVC Pipe Cement 1
PVC Reducing Tee 1
1” to ½” PVC Reducing Adapter 1
1” NPT to 1” PVC Straight Adapter 1
½” PVC Union 1
½” PVC 2", plus length of storm drain
2” PVC 10.5"
3D printed index 1
2" PVC Rubber Cap 2
OpenLog Artemis (OLA) 1
Bluetooth Low Energy board (BLE) 1
Qwiic Adapter 1
50mm Qwiic Cable 2
Pressure Transducer (Bar02 Ultra-High Resolution 10m Depth/Pressure Sensor, or equivalent) 1
1" NPT PVC Threaded plug 1
PVC Pipe Threaded Sealant 1
SanDisk High Endurance 64GB uSD 1
Battery Holder 1
D-Cell Batteries 3
3D printed Electronics Carrier 1
Wire Various colors needed
Heat shrink 2, various sizes needed
JST SM 2-pin Female and Male Connector Adapter 1 female and 1 male
Dupont Connector Shroud 2
Female Dupont Pin Connector 9
Male Pin Header 2
M2.5x20mm Hex head machine screws 8
Desiccant Packs 2-4

Equipment List

  • Ratcheting PVC cutter
  • Measuring tool
  • X-acto knife
  • Voltmeter
  • Soldering iron
  • Solder Sucker
  • DuPont Connector Crimper
  • Screwdriver
  • Wire stripper

PVC Housing

  • Cut all of the PVC pipe pieces in the following lengths:
    • 2” PVC pipe: 7" piece (for battery side of tee, referred to as 2" PVC long piece)
    • 2” PVC pipe: 3.5” piece (houses the electronics side of tee, referred to as 2" PVC short piece)
    • ½” PVC pipe: 2” piece (tee to threaded ½” PVC connector, referred to as ½” PVC short piece)
    • ½" PVC pipe: length of this piece determined by stormwater infrastructure depth. If length is unknown at the moment, cut a piece that is 80 cm or 32" long. (for down tube, referred to as ½” PVC long piece)
  • If not using a PVC rubber cap, glue a PVC Threaded Plug to one end of the 2" PVC long piece
  • Glue one end of the 2" PVC long piece to one of the 2” PVC ends of the PVC Reducing tee. When gluing all these PVC pieces together, first use PVC Primer and then PVC cement.
  • Glue one end of the 2" PVC short piece to the other 2" PVC end of the PVC Reducing tee
  • Glue the ½” PVC short piece to the ½” PVC end of the PVC Reducing tee.
  • Glue the ½" PVC Union to free end of the ½” PVC short piece with the female part oriented up.
  • Attach the PVC Reducing Adapter to the PVC Straight Adapter. This unit will house the pressure transducer and will be the bottom part of the Pressure Logger.

Attaching the PVC Reducing Adapter to the PVC Straight Adapter

  • Attach the ½” PVC long piece to the PVC Reducing Adapter.
  • If the ½” PVC long piece has been cut to the correct length of the storm drain, glue the free end of the ½” PVC union (may still be attached to the tee) to the free end of the ½” PVC long piece. Otherwise, leave this un-glued until the correct length has been established.

Building Electronics Carrier

Data Logger

The current design uses the Open Log Artemis (OLA) board. When working with electronic boards, make sure you are ground and handle all electronics on a static mat.

  • Use an x-acto knife or similar to cut the MEAS jumper on the OLA board (as described in the "Vin Pin" section in SparkFun's OLA Overview). Before powering on the pressure logger, either by battery or via computer, make sure you read the Pressure Logger Precautions. Since we are cutting the MEAS Jumper, you must be careful powering the OLA so that you don't fry the board.
  • Use a voltmeter on Ohm setting to check resistance between the 2 connected pins – before cut, it should be 0 (no resistance), after the cut you should see a large reading (e.g., mega-ohm order of magnitude).

Cutting the MEAS Jumper on the OLA with an x-acto knife

  • Solder the 8-pin header on the OLA board by inserting it into the 8 holes on the OLA, with the black part of the header pin resting on the top-side of the OLA board. The side of the header pins that are shorter are exposed on the bottom of the OLA board and this is where solder needs to be applied to ensure they are connected to the OLA board. The bottom of the OLA board houses the micro-SD card, and the top of OLA board has the USB port.
    • The header pins should be perpendicular to the board so that the shroud can fully connect onto the header pins.
    • To ensure that the header pins are perpendicular, first solder the pins on either end and make sure they are properly aligned before soldering the rest. Use the solder sucker to remove solder from the end pins to start-over if the header is no perpendicular to the board.
    • When soldering, make sure that each pin itself is fully soldered to the board but not to the neighboring pins. When using clips to solder any boards/ adapters for this project, make sure the clips are only applied on the corners or the flat side of the board. Reference the picture below.

Soldering the pin headers on the OLA board. View of the bottom of the OLA board.

  • Insert formatted micro-SD card into OLA and listen for the click. Be careful so that the card holder on the sensor doesn’t fail.

Inserting the micro-SD card into the bottom of the OLA board

Bluetooth (BLE) Board

The current design uses the Adafruit Bluefruit LE UART Friend board as the Bluetooth Board.

  • Solder the 8-pin header on the BLE board by inserting it into the 8 holes on the BLE. The same orientation of the header pins on the OLA board should be used for the BLE board, along with the steps that outline how to solder the header pins onto the board. The top of the BLE board houses the main module and switch, and the bottom of the BLE board is flat.

Soldering the pin headers on the BLE board. View of the bottom of BLE board.

  • Check that the switch on the top of the BLE board is set to UART mode (not CMD)

Making sure the BLE is set to UART mode. View of that top of the BLE board.

QWIIC Adapter

  • Cut 3" of red wire and black wire, respectively. Also cut two pieces of black wire with each being 2" long. Strip both ends of all the wires, making sure that none of the wires are lost in the process.
  • Solder the red wire to power (3.3V) and the black wire to ground (GND) on QWIIC Adapter by threading the wires through the holes and soldering on the back of the QWIIC Adapter (flat side).

Soldering the wires to the QWIIC Adapter. View of top of the QWIIC Adapter.

  • The free end of the black wire is soldered to two 2” black wires. Heat shrink the conjoined black wires.
  • Crimp the free end of the red wires and the two free ends of the 2" black wires with female Dupont Connectors. Attach the 50mm QWIIC Cable to the QWIIC Adapter on the side closest to the "SLC" so that the QWIIC Adapter can connect to the OLA board. Reference the picture below.

Final product for the QWIIC Adapter with a heat shrink over the shouldering and female Dupont Connectors on all free ends

Pressure Transducer

  • The pressure transducer will be connected to the other end of the QWIIC Adapter. Cut the grove connector off the end of the pressure transducer and strip the wires connected to the pressure transducer. The pressure transducer we're using has the following wires: black (ground), white (SDA/ data), green (SCL/ clock), red (power).
  • Also cut the grove connector off a QWIIC Cable and strip the wires. The QWIIC Cable has the following wires: black (GND), red (3.3v), blue (SDA), yellow (SCL).

Preparing the pressure transducer and QWIIC Cable for extension

  • Extension wires will be needed in attaching the stripped wires from the pressure transducer to the stripped wires of the QWIIC Cable. For the extension wires, use the same colors as the QWIIC Cable to extend the wires of the QWIIC Cable itself. See the bullet points below to connect the wires from the pressure transducer to the QWIIC Cable.
    • Black (pressure transducer) --> black (QWIIC Cable)
    • White (pressure transducer) --> blue (QWIIC Cable)
    • Green (pressure transducer) --> yellow (QWIIC Cable)
    • Red (pressure transducer) --> red (QWIIC Cable)
  • Cut and strip both ends of the extension wires so that the total length from the pressure transducer to the QWIIC Adaptor is 45 inches (110 cm), or the length that is adequate for the depth of your storm drain. Use enough wire so that the cable reaches comfortably out the end of the PVC housing for ease of assembly.
  • First, solder the wires of the pressure transducer to one free end of the extension wire (referencing the bullet points above). Heat shrink the wires as well. Make sure the heat shrink is placed on wires before soldering.
  • Next, twist the wires using a power drill.
  • After twisting the wires, solder and heat sink the other free end of the extension wire to the free end of the QWIIC Cable. The extension wires should have the same colors as the QWIIC Cable, so join the wires that have the same color together.

Extending and connecting the wires from the pressure transducer and QWIIC Cable

  • Install the pressure transducer in the PVC Threaded Plug so that the pressure transducer can attach to the PVC Housing. Drill a small starter hole to guide drilling a 10mm (or 25/64” on the step bit) hole in the center of the PVC Threaded Plug.
  • Fasten the sensor into the hole. The black O-ring goes on the outside of the cap.
  • Attach the nut to the inside of the PVC housing, putting the flat side towards the very inside of the PVC Threaded Plug. Use needle nose pliers to help tighten.

Installing the pressure transducer to the PVC threaded plug

  • Attach and screw the PVC Threaded Plug into the PVC Straight Adapter. Apply PVC thread sealant to the threads of the PVC Threaded Plug before attaching.

Attaching the pressure transducer to PVC housing"

Battery Holder

  • Cut 8” of black wire and solder to the outside end of the battery holder.

Soldering the black wire to the battery holder

  • Take the JST SM 2-pin male connector adapter and strip both ends of the wires. Solder the free end of the red wire to the other side of the battery holder. Solder the two black wires together. However, before soldering, put a heat shrink on one of the black wires. After soldering the black wires together, heat shrink the wires.

Finishing the electronics for the battery holder

Electronics Carrier

The electronics carrier connects the OLA board, BLE board, and batteries.

Wired connections in the Pressure Logger

The color assignments for the wire are as follows (Tx means Transmit, Rx means Receive):

  • Black: Ground
  • Red: Power
  • Green: OLA Tx (BLE Rx)
  • Yellow: OLA Rx (BLE Tx)

All wires can be small gage (around 28-22 gage). Since the boards are mounted close together, the length of the wires from the OLA to the BLE can be around 6". The length of the JST SM 2-pin connectors do not have to be shortened.

Use the diagram above to connect the wires between the battery, OLA, QWIIC Adapter, and BLE. All the wires inserted into Dupont connectors need to be crimped with female Dupont pin connectors. When crimping, it may be necessary to crimp once with the larger die, then again with the smaller. Note that the connectors have two sets of arms which wrap around the wire when crimped. One set wraps around the conductor, and one around the insulator. Wire goes in on the left side (if you are a right handed). When inserting wires into the Dupont connectors, make sure each pin is properly seated and locked by giving it a light pull after insertion.

The following is the suggested method in assembling the electronics cable.

  • Use 6 M2.5x12mm screws and a screwdriver to secure the OLA and BLE to the 3D printed electronics carrier. The T9 head for screwdrivers is used for M2.5 screws. Once the OLA and BLE are attached, attach the QWIIC Adapter to the OLA board.

Attaching the OLA, BLE, and QWIIC Adapter

  • For our assembly, we cut 6" of yellow wire and green wire, respectively. Crimp the free ends of all the wires with female Dupont Connectors.

Crimping the free ends of all the wires

  • Use 2 M2.5x12mm screws and a screwdriver to secure the battery holder to the 3D printed electronics carrier. Use zip ties to help organize the wires.

Organizing the electronics

  • Attach the crimped ends into the two shrouds, where one shroud will attach to the pin headers for the OLA and the other will attach to the pin headers for the BLE.
  • Start with the shroud for the BLE. For this shroud, connect the 2 black wires from the QWIIC Adapter, the red wire from the QWIIC Adapter, the yellow wire, and the green wire. Reference the picture below as well as the wired connections diagram for placement of wires in the shroud. Read the Pressure Logger Precautions before attaching any of the shrouds to the header pins of the electronic boards!

Assembling the shroud for the BLE

  • The next shroud is the one used for the OLA. For this shroud, connect the black and red wires from the JST SM 2-pin female connector adapter, the yellow wire, and the green wire. Reference the picture below as well as the wired connections diagram for placement of wires in the shroud.

Assembling the shroud for the OLA

  • Use a label-maker to put the label "OLA" on the shroud for the OLA, and "BLE" on the shroud for the BLE. Put the label on the "smooth side" of the OLA and BLE, respectively. The labeled side of the shroud will face the inside of the respective electronic boards when attached.

Labeling the OLA and BLE on the shrouds

Final Pressure Logger Assembly

  • Create the battery pack by inserting 3 D-Cell batteries into the cardboard battery unit.
  • Insert the battery pack into the battery holder, but read the Pressure Logger Precautions first!

Creating the D-Cell battery pack, laid out in the correct orientation for install.

  • Turn on the pressure logger by clicking the power button on the OLA. Make sure the pressure logger is working properly. You should see a red light on both the OLA and BLE electronic boards.
  • Read through the Pressure Logger Precautions in its entirety before moving on to the other tutorials.
  • The pressure logger will be fully assembled in deployment. We are leaving the electronics in the pressure logger open so that they can be easily accessible for setup and calibration.