Skip to the content
PCBKitNew board
2 layersD1 mini shield client, the printed circuit board in 3D

D1 mini shield client

Jerey/weatherstation-client1

Weatherstation publishing temperature and humidity values via MQTT broadcasts.

Copper layers
2
Thickness
1.6 mm
Parts
7
Nets
6
Pads
30
Tracks, vias
41, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
20 Jan 2019
Updated
1 Jul 2023

Overview

D1 mini shield client is an open-source printed circuit board by Jerey, from the Jerey/weatherstation-client repository on GitHub, published under the MIT licence. It is a 2-layer board with 7 parts on 6 nets, routed with 41 tracks and 0 vias.

It is built around the BME280. Its parts include 3 resistors, 2 connectors, 1 capacitor and 1 IC. It belongs with the home automation and IoT boards and the ESP8266 boards of this library.

Main components

1

README

README.md

Weatherstation - Client

Idea

The idea was to create a platform tracking various climate data, which can be extended and has no dependencies to the visualization. Therefore a network based solution was chosen. 1

As basis for the project a D1-mini was chosen, as it comes with onboard WiFi. But also other platforms can be used (e.g.: NodeMCU, ...).

The idea is to read the sensor data and send it via MQTT. Anyone who wants to use the data, can simply subscribe to the topic /esp/#. To indicate the type of data, the messages are defined by a MAC (to know from which client the message comes from), the type of data and the value. In this case, the topic holds this information in following structure: /esp/MAC_ADDRESS/TYPE_OF_DATA/

Have a look at Weatherstation Server.

Current State

Currently, two parameters are published:

  1. Temperature
  2. Humidity

Further can be added by using a different or further sensor.

Visualization of Data

How the data is visualized is pretty much up to the user. Either one can use another D1-mini with an attached display, or one can use a server, which collects the data and visualizes it in a browser.

Setup

The setup is split up into two areas: hardware setup and software setup.

Hardware

The list of needed hardware is as follows:

  • D1 Mini or an ESP 01
  • BME 280
  • 2 x 4k7 Ohm Resistor
  • Button
D1 Mini setup

Following is the schematic for this setup with an D1 Mini.

Note: The BME280 was added with wires to get a more precise temperature. Initially it was also added to the base shield, but there the temperature was always a bit higher.

ESP 01 setup

If you want to reduce power consumption even more, you can use the ESP01.

Following pins from the D1 mini have to be changed then:

  • D3 :arrow_right: Pin 0
  • D4 :arrow_right: Pin 2

Further, to enable deep sleep, a little soldering has to be done. There are several tutorials in the internet for that, so I will not go into that here.

Software

As basis for the software, platform IO was used as it comes with a good library management and makes flashing rather easy. But first have a look into the code.

Software settings

The software allows several settings within the program.cpp. There are more than the mentioned ones, but those are the most important ones:

  1. BME280_I2C_ADDR - Depending on the used BME280, there are different I^2^C addresses in use. The used library offers a way to set this address, as described here. Usually the address is either 0x76 or 0x77. Please check the datasheet of the used BME280 and set the value.
  2. ssidAP & passwordAP - The SSID and password of the accesspoint, which the hardware starts, in case it cannot connect to any wifi. One can then look for the wifi ssidAP and connect to it with the password passwordAP.
  3. updateFrequency - The frequency of updates of the parameters/values to be sent to the network. Defined in milliseconds.
Flashing

Install platformIO as described on their webpage. If you chose platformIO for the CLI, you can execute following command from the terminal: platformio run --target upload If you use an ide, please refer to the platformIO documenation.

Documentation

This chapter aims to describe some essential parts of the software.

Usage of the client

When the software is flashed, the client will directly start. If it has not been configured previously, it will open up an accesspoint. Otherwise it will simply reconnect to the last configured WiFi and start publishing the data.

Accesspoint at the beginning

When the client is started, the WiFiManager is being used to check, whether it has any known WiFi available to connect to. If it either does not know any WiFi or cannot connect to one, it opens up an access point and provides an user interface to setup the desired WiFi. From that point on, it will always try to connect to that WiFi. If you want to connect to another WiFi, press the button added to the board and the access point will again be opened.

Flashing software to several clients

Work in progress: It currently is possible to flash several clients at once. The ESP8266httpUpdate library is used to auto update the firmware, if the defined update server provides any new firmware. This decision is based on a version defined in the program.cpp. For now a python flask server is used as update server. This is currently based on the docker image esp-update-server. For more information on that, checkout the readme.md.

Some Images

On a breadboard:

Further, one can also buy base shields and then solder all parts together:

Footnotes

1 [blocked]: For the purpose of the project, the network based solution is fine, but if one wants to tweak the energy consumption to a minimum, other options should be considered (e.g.: Bluetooth Low Energy (BLE), ...).

Parts

7
QtyValueFootprintReferences
24k7Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R3
1470Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
1BME280Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ1
1BatteryConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ2
1CResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalC683
1WeMos_miniWemosD1MiniShield:WEMOS_D1_mini_light_correctpinsU1

Questions

What parts does the D1 mini shield client use?

7 parts, built around the BME280. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the D1 mini shield client KiCad files?

From the Jerey/weatherstation-client repository on GitHub, at the commit this page was made from: the board is pcb/D1_mini_shield_client/D1_mini_shield_client.kicad_pcb and its schematic pcb/D1_mini_shield_client/D1_mini_shield_client.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the D1 mini shield client design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers70.1 × 43.2 mmIaq device, the printed circuit board in 3D

    Iaq device

    nkitanov/iaq_board

    IAQ Board is a DIY (Do-It-Yourself) device for measuring internal air quality

    19 parts396
  • 4 layers38.6 × 39.5 mmRuuvitag revb71, the printed circuit board in 3D

    Ruuvitag revb71

    ruuvi/ruuvitag_hw

    RuuviTag hardware projects

    64 parts115
  • 4 layers35.1 × 76.3 mmTiny4FSK, the printed circuit board in 3D

    Tiny4FSK

    New-England-Weather-Balloon-Society/Tiny4FSK

    Horus Binary v2 HAB Tracker

    90 parts96CERN-OHL-W-2.0
  • 2 layers29.8 × 33.7 mmPecanpico9, the printed circuit board in 3D

    Pecanpico9

    DL7AD/pecanpico9

    A lightweight APRS tracker for balloons

    116 parts68GPL-3.0
  • 2 layers136 × 100 mmClimateSprinklerController, the printed circuit board in 3D

    ClimateSprinklerController

    kbx81/ClimateSprinklerController

    ESP32-based climate and sprinkler controller for use with ESPHome

    194 parts56
  • 4 layers36.6 × 60.3 mmStratoSoar MK3.0, the printed circuit board in 3D

    StratoSoar MK3.0

    crnicholson/StratoSoar-MK3

    StratoSoar MK3, an autonomous glider meant for high-altitudes, accessible to everyone

    85 parts43
  • 2 layers23 × 50 mmPecanpico10, the printed circuit board in 3D

    Pecanpico10

    DL7AD/pecanpico10

    A lightweight APRS tracker and digipeater

    123 parts43
  • 2 layers97 × 77.5 mmESPlant, the printed circuit board in 3D

    ESPlant

    CCHS-Melbourne/ESPlant

    Environmental Sensor Plant - solar WiFi gardening/meteorological sensor using ESP8266

    77 parts37