Open Source Wireless Environmental Sensor HW, Part 3: Design

Suru Dissanaike
HiMinds
Published in
5 min readOct 15, 2019

In our previous article (link can be found above) we introduced our wireless environmental sensor project; which is a rechargeable battery-operated wireless sensor that can measure:

  • Temperature with ±1.0°C accuracy
  • Barometric pressure with 1 hPa absolute accuracy
  • Humidity with ±3% accuracy

This article will cover the design phase of the project. In our previous article, we hooked up the BME280 and the BQ27441-G1 fuel gauge to the ESP32. Now it is time to finalize the design.

A few words about the ESP32; we are using an ESP32-WROOM-32 WiFi/BLE module. The PCB design is simplified because the module has everything it needs to work i.e. memory, crystal oscillators etc. It also has an onboard PCB-antenna for WiFi and BLE so we do not need to worry about this. You could argue that it would be better to use the ESP32-WROOM-32U because it has a U.FL connector; it would enable us to use a better antenna. It is definitely something we will consider for a future revision if we have WiFi-performance issues. The Picture below shows a U.FL Connector:

Picture courtesy of ESPRESSIF

Technical details:

A summary of the technical details for the wireless environmental sensor:

  • ESP32-WROOM-32 WiFi/BLE
  • Integrated 520 KB SRAM and 4 MByte flash
  • Integrated 802.11b/g/n
  • Bluetooth support for both Bluetooth classic and BLE
  • On-board PCB antenna (on ESP32-WROOM-32 module)
  • BME280, a precision sensor from Bosch
  • Vented Room Sensor Enclosure from [CAMDENBOSS CBRS01VWH](https://www.camdenboss.com/camden-boss/cbrs01vwh/c-23/p-23038)
  • LiPo-charging circuit
  • LiPo Fuel Gauge (BQ27441-G1)
  • Built-in USB-Serial programmer (CH340T)
  • Green and Red LED
  • Application push button
  • Additional reset button

GPIO mapping

In order to do the schematics, we need to provide an HW engineer with a specification for how the different components are connected. As mentioned in previous articles the design is based on the Olimex ESP32-DevKit-LiPo but we need to describe how the additional components are connected. GPIO mapping to the rescue!

KiCAD, EDA Software

We try to make everything in this project is open-source, The wireless environmental sensor is developed using the open-source electronic design automation (EDA) tool KiCAD and it creates the:

  • Schematic capture
  • Printed circuit board (PCB) layout
  • PCB manufacturing files i.e Gerber files(artwork files)
  • BOM

KiCad was created in 1992 by Jean-Pierre Charras and one of the main contributors is CERN. How cool is that!

Rules and guidelines for the Schematics

Creating great schematics is an artform; for the sake of clarity, I guess you want to be more like a young Pablo Picasso. If you haven't looked at his earlier work you need to check it out! I don’t know how to become the schematics world’s version Pablo Picasso 🎨 but here are some basic guidelines that make the schematics a bit more readable:

  • Make sure it is printable in A4-format (or the paper you use)
  • Include revision
  • Use same symbols for ground, resistors etc. do not mix the US and international symbols (See example below)
  • Text placement must be consistent, should not overlap or cover components
  • The text should be consistent do not mix upper-case, lower-case 🐫-case (you get the drift)
  • Try to keep the names short

Enclosure design

We will need a hole for the USB connector that will be placed on one of the sides, it will be used for programming the device and charging the battery. The idea is that the light from the LEDs will be seen thru the ventilation slots. You should be able to press the buttons if you use a paper clip.

Component placement on PCB

During the component placement phase, it is pretty useful to go super low-tech. I like to use cardboard, paper, sixers, glue, sellotape, ruler, pencil and go all-in on arts and crafts 😄. Here are some of the things we figured out during these sessions:

  • Our PCB can be half the size, we do not need the space and it will reduce cost
  • It should be doable to see the LEDs thru the ventilation
  • Using a paper clip for pushing the button should be fine
  • Adhesive tape should work to hold the battery in place
  • Just to be on the safe side, we should place the BME280 close to the ventilation

These are the PCB measurements:

Based on all discussions this is our proposal for the component placement that we gave our HW engineer.

Component placement proposal

In this article, we did the design for our Open Source Wireless Environmental Sensor. It included the GPIO mapping for our sensors i.e. BME280 and BQ27441-G1, our LEDs and buttons. We also looked at how we plan to use our enclosure and the component placement on the PCB.

Thank you for reading! Take care and hope to see you soon. 🙏🏽

This article is a living document please reach out to me if you want to contribute or see anything inaccurate here. This article is part of our “Boosting Innovation” project.

--

--