Intro: 3D Printer Monitor Wemos D1 Mini ESP8266
Monitor your 3D printer over a wifi connection. This is a Wemos D1 Mini and a 128x64 OLED combined together to display the status from your OctoPrint Server.
Requires the following:
- OctoPrint Server and the User API Key from your user account
- Wemos D1 Mini (ESP8266): https://amzn.to/2ImqD1n
- 0.96" OLED I2C 128x64 Display: https://amzn.to/2InSNF0
- 3D Printed Case: https://www.thingiverse.com/thing:2884823
- Arduino Source Code: https://github.com/Qrome/printer-monitor
- Soldering Iron
- Displays the print status from OctoPrint Server
- Estimated time remaining
- Time Printing
- Percentage complete
- Progress bar
- Bed and Tool Temperature
- Screen turns off when printer is turned off or disconnected
- Screen turns on when printer is Operational or connected
- Option to display clock instead of sleep mode
- Sample rate is every 60 seconds when not printing
- Sample rate is every 10 seconds when printing
- Fully configurable from the web interface (not required to update Settings.h)
- Supports OTA (loading firmware over WiFi connection on same LAN)
- Basic Athentication to protect your settings
- Video: https://youtu.be/niRv9SCgAPk
- Detailed build video by Chris Riley: https://youtu.be/Rm-l1FSuJpI
Step 1: Solder Up the Wemos D1 Mini With the 128x64 I2C OLED Display
This step only requires connecting 4 wires between the Wemos D1 Mini and the OLED display.
- SDA -> D2
- SCL -> D5
- VCC -> 5V+
- GND -> GND-
Step 2: 3D Print a Case for Your 3D Printer Monitor
Since you are monitoring a 3D printer, you probably have the means to print the case for this project or create your own. My design is posted on Thingiverse.com here:
Fit your Wemos and OLED in the case. You may need to apply some glue to the outer corners of the OLED display to get it to stick into the case. The Wemos will be held into the case by the back panel.
Step 3: Download and Compile Source Code
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and installed the required USB drivers etc.
- USB CH340G drivers: https://wiki.wemos.cc/downloads
- Open the Arduino IDE and enter the following URL http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. This will add support for the Wemos D1 Mini to Arduino IDE.
- In the Arduino IDE, open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
- Select Board: "WeMos D1 R2 & mini"
Download the Source Code for 3D Printer Monitor:
The following packages and libraries are used (download and install to your Arduino IDE):
- ArduinoJson.h --> https://github.com/bblanchon/ArduinoJson
- WiFiManager.h --> https://github.com/tzapu/WiFiManager
- ArduinoOTA.h --> Arduino OTA Library
- SSD1306Wire.h --> https://github.com/ThingPulse/esp8266-oled-ssd1306
You can update the project Settings.h file with your OctoPrint API Key or do it from the web interface. Get your OctoPrint API Key from your OctoPrint -> User Settings -> Current API Key.
NOTE: The settings in the Settings.h are the default settings for the first loading. After loading you will manage changes to the settings via the Web Interface. If you want to change settings again in the settings.h, you will need to erase the file system on the Wemos or use the “Reset Settings” option in the Web Interface.
Step 4: Web Interface
The Printer Monitor uses the WiFiManager so when it can't find the last network it was connected to it will become a AP Hotspot -- connect to it with your phone and you can then enter your WiFi connection information.
After connected to your WiFi network it will display the IP addressed assigned to it and that can be used to open a browser to the Web Interface. Everything can be configured there in the web interface.