3D Printer Monitor Wemos D1 Mini ESP8266

17,077

196

66

About: I enjoy flying RC and 3D Printing

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:

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 (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):

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.

3 People Made This Project!

Recommendations

  • Plastics Contest

    Plastics Contest
  • Optics Contest

    Optics Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018

66 Discussions

0
None
AnubisKnight

13 days ago

Great Project.

I'm having trouble getting the display to work. I have the OLED and teh board you have listed in and all the wiring is hooked up correctly, but I still cannot get it to display anything. I can access the web interface online too.

1 reply
0
None
QromeAnubisKnight

Reply 13 days ago

The only thing I can think of is the wiring. Make sure the OLED you have is labeled correctly. Maybe try and swap the SDA SCL lines? Make sure they are solid connections.

0
None
Andrzej4

17 days ago

Hi. I have ESP32 DEVKiT V1. Is it possible to use it in your project? If yes, can you give me instruction how I can do it. Thanks.

PINOUT_ALS_35zjbk2j.jpg
0
None
mdenniger

23 days ago

I tried to upload the Sketch, but unfortunately I receive the following error.

OctoPrintClient.cpp:125: error: 'DynamicJsonBuffer' was not declared in this scope
DynamicJsonBuffer jsonBuffer(bufferSize);
^
OctoPrintClient.cpp:125: error: expected ';' before 'jsonBuffer'
DynamicJsonBuffer jsonBuffer(bufferSize);
^
OctoPrintClient.cpp:128: error: 'jsonBuffer' was not declared in this scope
JsonObject& root = jsonBuffer.parseObject(printClient);
^
OctoPrintClient.cpp:129: error: 'class ArduinoJson650_0_0::JsonObject' has no member named 'success'
if (!root.success()) {
^
OctoPrintClient.cpp:161: error: expected ';' before 'jsonBuffer2'
DynamicJsonBuffer jsonBuffer2(bufferSize2);
^
OctoPrintClient.cpp:164: error: 'jsonBuffer2' was not declared in this scope
JsonObject& root2 = jsonBuffer2.parseObject(printClient);
^
OctoPrintClient.cpp:165: error: 'class ArduinoJson650_0_0::JsonObject' has no member named 'success'
if (!root2.success()) {
^
Bibliothek ESP8266WiFi in Version 1.0 im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi wird verwendet
Bibliothek ESP8266WebServer in Version 1.0 im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WebServer wird verwendet
Bibliothek WiFiManager in Version 0.13 im Ordner: C:\Users\mdenn\Documents\Arduino\libraries\WiFiManager wird verwendet
Bibliothek DNSServer in Version 1.1.0 im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\DNSServer wird verwendet
Bibliothek ESP8266mDNS im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266mDNS (legacy) wird verwendet
Bibliothek ArduinoOTA in Version 1.0 im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ArduinoOTA wird verwendet
Bibliothek ArduinoJson in Version 6.5.0-beta im Ordner: C:\Users\mdenn\Documents\Arduino\libraries\ArduinoJson wird verwendet
Bibliothek ESP8266_and_ESP32_Oled_Driver_for_SSD1306_display in Version 4.0.0 im Ordner: C:\Users\mdenn\Documents\Arduino\libraries\ESP8266_and_ESP32_Oled_Driver_for_SSD1306_display wird verwendet
Bibliothek Wire in Version 1.0 im Ordner: C:\Users\mdenn\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\Wire wird verwendet
exit status 1
'DynamicJsonBuffer' was not declared in this scope

4 replies
0
None
Qromemdenniger

Reply 22 days ago

Please try installing the version of ArduinoJson that is listed in the README.md file. That should resolve the issue.

0
None
SergiodjQrome

Reply 21 days ago

Where can I find the README file?

0
None
mdennigerQrome

Reply 21 days ago

Thank you for the answer.
That solved the problem.
It was a beta version of the ArduinoJson library.

0
None
PlanCP

22 days ago

Hi, Thanks. All up and running after re-installing the CH340 drivers. One question though please? What would the button which is supposed to go in the hole on the top of the case for? I printed that version but no clue what the button should do or where to wire it. Thanks

1 reply
0
None
QromePlanCP

Reply 22 days ago

I designed the cases for multiple projects. Some have used them for a button that would turn on and off the display.

0
None
GeorgeB271

7 weeks ago

Hello,

I have done every step described but when compiling i get the following error :

Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

printermonitor:1: error: stray '`' in program

```````````````````````````````````````````````````````````````````````````````` ` /** The MIT License (MIT)

^

printermonitor:1: error: stray '`' in program

exit status 1

stray '`' in program

stray '`' in program

Any ideas of what is wrong ?

3 replies
0
None
QromeGeorgeB271

Reply 22 days ago

Check to see if you have typed an extra character somewhere.

0
None
QromeGeorgeB271

Reply 7 weeks ago

It looks like you may have lost the starting comment tag /** -- either download them again or fix the comment.

0
None
spenproject

Question 2 months ago

Does the printer have to have WiFi of can i use a wired printer (non WiFi to printer)

3 more answers
0
None
Qromespenproject

Reply 2 months ago

The software is designed to work with OctoPrint server and requires wifi.

0
None
spenprojectQrome

Reply 2 months ago

does the printer have to be connected to wifi?

0
None
Qromespenproject

Reply 2 months ago

No, but your printer need to be connected to an OctoPrint server -- and OctoPrint needs wifi.