Table of Contents
- Description
- Items Needed
- Installations and Software Setups
- Recommended order of Arduino deployments
- Enclosure
This directory contains everything needed to develop a BLE-enabled particulate matter monitor and 3D print a case and mount for a bicycle.
Electronic parts
- Arduino WiFi Rev2 (Optional)
- ESP32
- NeoPixel Stick
- Plantower PMS5003
- Particulate Matter Sensor Breakout (for PMS5003)
- Female-female jumper cables
- Header pins
- Stripboard 64 x 95mm, 24 Tracks, 37 Holes
- Power bank
- At least two breadboards (two are needed due to ESP32's width)
Hand Tools
- Stripboard Track Cutter
- Soldering iron
Enclosure
- 3D Printer + PLA Filament
- 3 cable ties
- Rubber bands for additional support
- Download and install Arduino IDE
- Set up a GitHub repo for the project
- Install the ESP32 module for Arduino IDE
- Install the following Arduino libraries:
- Set up your 3D modelling and printing software--this will depend on the particular modelling and printing software you are using
- Download LightBlue
- Set up Adafruit IO
The following order of software uploads via the Arduino IDE is recommended:
pm25Bluetooth
Blink_ESP32
pm25_neopixel_esp32
pm25_neopixel_esp32_eeprom
pm25_neopixel_esp32_bt_eeprom
Note: it is not suggested to create an enclosure until a stripboard prototype is tried and tested. A step-by-step guide can be found in the pm25_neopixel_esp32 directory.
- Plug the prototype into the power bank using a USB cable, and confirm that the NeoPixel LEDs are at least partially lit up.
- Position the power bank atop the PMS5003.
- Measure the width, height, and depth of the prototype + power bank, ideally with a digital caliper for added precision.
- Add 3 mm to each dimension to ensure adequate space is available and note these dimensions for the inside of a 3d-printed box. Add another 2 mm for the dimensions of the outside of the box.
- Design a box in Fusion 360
- Make one side meshed to allow air to flow into the Plantower. This side will be faced towards the cyclist to reduce distortion induced by the PMS5003's fan.
- 3D Print this box, and ensure that your powered device fits inside of it with the power bank closest to the opening.
- If the device fits in the box, take measurements for your mount. The mount I printed in this project has three points of support: one at the middle of the stem, and two on the handlebar. A gap needs to be left for the stem's handlebar mount. Take the following measurements:
- Length and width of the stem's handlebar mount
- Height difference between the top of the handlebar mount and the tops of both stem and the handlebar at its lowest point (if your handlebar has curvature). Note down whichever height difference is greater.
- Width of the stem at the approximate point of support
- Width of the handlebar at the approximate points of support
- Return to your 3D Modelling software and produce the base with the following considerations:
- To fit the boxed device securely, the base will need a .3 mm larger width and length than that of the outer dimensions of the box
- Vault the edges of the supports slightly for added stability
- Create a hole within each of the three supports to fit cable ties to create three supports in two axes of rotation
- Once the base is fully printed, it can be mounted on the bicycle with the cable ties.
- Carefully place the box upside-down on the mount, preventing the contents from falling out
- Rubber bands were additionally used during test rides to secure the mount to the base.