Introduction: 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
Features:
- 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:
https://www.thingiverse.com/thing:2884823
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 version 2.5.2 (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:
https://github.com/Qrome/printer-monitor
Packages:
The following packages and libraries are used (download and install to your Arduino IDE):
- ESP8266WiFi.h
- ESP8266WebServer.h
- ArduinoJson.h --> https://github.com/bblanchon/ArduinoJson
- WiFiManager.h --> https://github.com/tzapu/WiFiManager
- ESP8266mDNS.h
- ArduinoOTA.h --> Arduino OTA Library
- SSD1306Wire.h --> https://github.com/ThingPulse/esp8266-oled-ssd1306
- OLEDDisplayUi.h
Initial Configuration
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.

Participated in the
Microcontroller Contest
16 People Made This Project!
- tannenba made it!
- BitteeinBIT made it!
- Jiheffe made it!
- cbabbman made it!
- HappiC1 made it!
- MadMathWizard made it!
- terrace_dr made it!
- 3dprintingbird made it!
- SandraN30 made it!
See 7 More
167 Comments
Question 10 months ago
Hi Qrome,
Thanks for this beautiful project. I made it too. The only thing I miss is a buzzer support. So that it gives sound signals when the print is finish. Has anyone in community made it with buzzer support?
1 year ago
Hi, your picture shows wire going to the top of the case. Is this a battery? I made two of these with different cases.
Edit: Oops looks like a button for reset.
PS: Love these things! Thank you.
2 years ago
Hi Qrome,
Thanks for a great project. I have two D1 minis and two SSD1106's with the same problem. I have uncommented out the SSD1106 display line in settings.h but it has not changed anything. Any suggestions would be appreciated. BTW, I can access via the web GUI.
Reply 1 year ago
it is in settings.h here photo what you want
Reply 1 year ago
Remove the two slashes on that line.
Reply 2 years ago
That does look like it is not loading the SH1106 display library. You compiled and loaded it now for the 1.3 display?
Reply 2 years ago
I noticed that when I compiled and uploaded the code, it was getting a "No Response" error code. I changed the port to the appropriate Com Port and it uploaded but now I am getting a blank screen.
Reply 2 years ago
Make sure that you still have "1M SPIFF" selected under the Arduino Tools -> Flash Size.
This sometimes gets removed between selecting different boards.
Reply 2 years ago
Thanks Qrome. I have changed the flash settings to 1M but there was nothing about SPIFF. See attached jpg. Still nothing in the display.
Reply 2 years ago
What ESP8266 core platform version are you running? The Readme instructs you to use Core platform version 2.5.2
Reply 2 years ago
I was running 2.7.4 so I changed it to 2.5.2. recompiled and uploaded with no change. I also power reset afterwards as well.
Reply 2 years ago
Run the serial port monitor durring the boot up on baud 115200 -- what do you see happening?
Reply 2 years ago
when I booted up with serial port monitor on, I saw nothing. When I uploaded the sketch, I saw the following.
Reply 2 years ago
So, it looks like it is running only the display issue. What pins do you have it soldered to and what pins are selected in the Settings.h file?
Reply 2 years ago
SDA - D2
SCL - D5
VCC - 5v
GND - GND
Reply 1 year ago
I have this exact same issue. Any chance its been resolved?
I have tried all the suggestion in this thread. I have tried a new D1. I have tried this with 3 displays. Two of them are the same product and the 3rd is different. I did get this to work with the .96 screen. It really just seems like the display part is not working but I can figure out why. Really cool project. Crypto currency tracker would be a cool one. Each screen is the current price, chart and price change.
Reply 1 year ago
Make sure you use the ESP8266 Core 2.5.2 and set 1M SPIFFs as the readme.md file instructs.
Reply 1 year ago
Thanks for the reply! Both of those were set based off of this thread alone . I did figure out that esp8266-oled-ssd1306 library noted in the readme should be set to the 4.1 version. I was on 4.2 and that was not working (not sure if I overlooked that somewhere else). Thanks again!
1 year ago
Arduino: 1.8.13 (Windows 10), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
In file included from c:\users\chriskleov\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\assert.h:10,
from c:\users\chriskleov\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\sys\reent.h:503,
from c:\users\chriskleov\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\stdlib.h:18,
from c:\users\chriskleov\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\cstdlib:75,
from c:\users\chriskleov\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\stdlib.h:36,
from C:\Users\chriskleov\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:27,
from sketch\printermonitor.ino.cpp:1:
C:\Users\chriskleov\Documents\Arduino\libraries\WhareHauoraWiFiManager/WiFiManager.h:25:24: error: 'const char HTTP_HEAD []' redeclared as different kind of entity
25 | const char HTTP_HEAD[] PROGMEM = "<!DOCTYPE html>{v}";
| ^~~~~~~
In file included from sketch\Settings.h:42,
from C:\Users\chriskleov\Desktop\printer-monitor-master\printermonitor\printermonitor.ino:31:
C:\Users\chriskleov\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:39: note: previous declaration 'HTTPMethod HTTP_HEAD'
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Reply 1 year ago
Make sure you are using the ESP8266 core version that is mentioned in the Readme.md file. As well as the listed versions of the required library packages.