Wemos D1 Environmental Monitor

The following is largely a copy/paste job from my GitLab page. The instructions on Thingiverse should take you through…
8
67
2
1012
updated February 14, 2023

Description

PDF

The following is largely a copy/paste job from my GitLab page. The instructions on Thingiverse should take you through the basic setup. For more information, including the Helm chart to deploy data collection and visualization, check out that page.

ESP8266 Environmental Monitor

Overview

This project provides the code, STL files, and instructions for building a small temperature and humidity monitor. The basic version simply takes a temperature and humidity reading from a DHT22 sensor every minute and refreshes the OLED screen with that data. The STL files are designed to house a Wemos D1 Mini, but the code should work on other ESP8266 platforms as well, such as the NodeMCU.

The more complex version includes a Helm chart to deploy some additional components to allow for collection of data over time as well as its display via Grafana dashboards. Deploying the Helm chart and setting up the infrastructure to do so are beyond the scope of this project.

Tools List

  • 3D printer
  • Soldering Iron
  • Allen wrenches
  • Pliers

Parts List

Assembly

Preparing the Wemos D1 Mini

To run the Micropython script, the Wemos D1 Mini needs to have the Micropython firmware flashed to it. This process won't be covered in depth in this readme, as the existing documentation is very thorough.

The latest Micropython binary can be downloaded from here.

Before moving on to the next steps, verify Micropython has been installed successfully by opening a serial connection to the microcontroller using a program like Putty.*Note: Baudrate = 115200*

Installing Python and Ampy

Install Python on your system if you don't already have it installed.

Next, install Ampy. Ampy is an FTP-like utility we'll use for transferring files to and from the microcontroller.

Transfer files to Wemos D1 Mini

(Note: if you're making the simple version, use the Python scripts from the 'simple-script' directory; if you're making the complex version, use the scripts in the 'monitor-scripts' directory)

Clone the repository or copy the python scripts from the appropriate directory onto your local machine. Next, using Ampy, copy each of the scripts to the microcontroller. For example, if using Windows and the Wemos D1 Mini is on COM5, the command might look like this:

ampy --port COM5 put .\simple-script*

If using Linux and the Wemos D1 Mini is on /dev/ttyUSB0, the command might look like this:

ampy --port /dev/ttyUSB0 put ./simple-script/*

Build the Circuit

Assemble the circuit according to the Fritzing diagram found in the 'circuit-diagram' directory. It is recommended to assemble the components on a breadboard first to ensure everything works prior to mounting it in the case.

Once the circuit has been tested and is providing accurate readings, solder the components together using enough wire they'll be able to be mounted in the case. The case has ample free space for extra wire. When soldering, be sure the wires come through the top of the Wemos D1 Mini to the bottom, so they can all be trimmed before mounting.

Assemble the Case

Using a soldering iron, heat the M3 heat insert nuts into the 5mm holes on the inside of the case taking care to ensure they are level.

The Wemos D1 Mini should friction fit into the rectangular depression in the bottom piece of the case, but some small dabs of super glue can be used to provide additional security.

The DHT22 sensor can likewise be friction fit into the rectangular hole in the top of the case. There is a hole provided to use additional M2 hardware if additional security is desired.

The .96in OLED screen should be secured into the appropriate spot on the front of the case using the M2 hardware. Use threadlocker on the nuts if desired.

*CAUTION:* It is very easy to overtighten the hardware and crack the screen; this is why threadlocker was chosen to secure this hardware over locking washers. However, since this is something that is unlikely to experience a lot of vibration, the threadlocker may not even be necessary.

Insert the case bottom into the case so that the micro USB port on the Wemos D1 Mini is accessible through the hole on the case. Insert 3mm screws into the holes and tighten.

Test

At this point, the monitor unit is complete. If you're just building the simple version, you're done! If you're building the more complex version, please continue at my GitLab page.

Category: Engineering

Tags



Model origin

The author marked this model as their own original creation. Imported from Thingiverse.

License


Highlighted models from creator

View more