3D Printer Monitor Wemos D1 Mini ESP8266

22,373

212

97

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.

6 People Made This Project!

Recommendations

  • Epilog X Contest

    Epilog X Contest
  • Paper Contest

    Paper Contest
  • Organization Contest

    Organization Contest

97 Discussions

0
None
AnubisKnight

3 months 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.

6 replies
0
None
malvernasAnubisKnight

Reply 7 weeks ago

I had the same issue. I rolled back my library to an earlier version (3.2.6) and it worked just fine

0
None
Qromemalvernas

Reply 4 days ago

Jeff, make sure you are using the latest version of the code as well as the latest version of the ESP8266 core. It sure looks like you have an old version of a library.

Also, if the web interface is working you should be able to load the compiled binary file through the web interface. Give that a try.

0
None
jeffaveryQrome

Reply 3 days ago

Hi Qrome,

Thank you very much for the reply! I'm still beating my head against the wall. I checked and the ESP8266 board version was 2.4.2 so I upgraded to 2.5. I'm new to this so I'm not 100% sure what each library is doing, or if there can be version conflicts. Below is what I show installed on my board manager and Library manager. I recompiled and uploaded this morning after upgrading the OLED module to v 4.0.0 and the board manager to 2.5.0. I also verified that I have just over 4 volts to the pins vcc and ground on the OLED. I get no backlit or anything though on either of the OLEDs (tried two different ones) I tried. Not sure if that's normal. Thanks again so much for any thoughts. This is the first project of this type that I have hit such a wall on. I'm sure it's something simple I'm missing.


Board Manager:
ESP8266 By ESP8266 Community version 2.5.0

Sketch Library: (Many more than this but they all say "built in")
Adafruit GFX graphics core library v 1.3.4
simple JSON streaming parser for use in Arduino by Bartosz v 0.1.2
Arduino JSON by Benoit v 5.13.4
the SSD1306 and SH1106 based 128x64 pixel OLED display by Daniel Eichhorn v 4.0.0
JSON streaming parser by Daniel Eichhorn v 1.0.5
WhareHauoraWiFiManager by Tzapu v 0.15.0
WiFiManager by Tzapu by Tzapu v 0.14.0

0
None
jeffaveryjeffavery

Reply 2 days ago

Hi Qrome,

Got it working, I thought I'd post the fix here in case it helps someone else. Thanks again for pointing me in the right direction. I watched Chris' video on here, and he was using the 2.4.1 board manager. I also noticed that his was WemOS D1 R2 Mini. Also, in re-reading your instructions, you said to
  • Select Board: "WeMos D1 R2 & mini"
Mine just said WemOS D1 R1 nothing else. Strange, it worked enough like this for the board to program, but not to fire up the OLED. I removed all versions of the ESP8266 board management software and just installed 2.4.1. Once I did that, WemOS R1 D2 & Mini were a choice under board manager. I selected that, reflashed it and it's working great!

Thanks again.

Jeff
PrintMonitor.jpg
0
None
QromeAnubisKnight

Reply 3 months 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
jeffaveryQrome

Reply 4 days ago

Hi Qrome, I am having trouble making my display work as well. I can get to the printer monitor web page and all is working there. I verified 2 times that my pins are connected correctly. I also tried a different WemOS board and then another OLED display. I then found your comment here and tried version 3.2.6 and 3.2.7. I get an error compiling (pasted error below). Version 4.0.0 compiles fine, no errors. Hoping maybe I'll get lucky and you have a miracle for me? Thanks in advance for any thoughts or suggestions -Jeff
Compile Error:
invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'const char*' [-fpermissive]

0
None
MarioM264

14 days ago

How can I add button to switch on/off the screen? Or is there possible to turn on the screen for let say 10 secs and then it would go off again?

0
None
padigree

Question 7 weeks ago

Hey, first thank You for this awesome project. After some problems to get these on the nodemcu and the wroom02 oled 18650 mod, I finally got it. Works like a Charme With octoprint and it's stable. The only Problem is that it won't show the weather as shown in the picture. Made a few New APIs, tried different City IDs tried different Devices, Networks, Accounts and so on.. Does it still work? Would be glad to get some help :)

IMG_20190103_095417.jpgIMG_20190103_113210.jpg
7 answers
0
None
Qromepadigree

Reply 6 weeks ago

Yes, weather works. Make sure your key is valid. Plugin and view the Serial Monitor and it may give you details of the issue.

0
None
padigreeQrome

Reply 6 weeks ago

Now the key is Activated and valid, tried the api in different combonation on my smartphone. But now the serial Monitor Shows am unexpected Response.... :/ checked the links twice, it should work. Maybe it's because of the different Hardware, but everything else works..

0
None
Qromepadigree

Reply 6 weeks ago

Make sure you have a valid city ID number. You should be able to build the GET url with your key and city ID and pull it up on a browser window and see the data response.

0
None
padigreeQrome

Reply 6 weeks ago

For phone and Computer it works. Im waiting for the wemos which should arrive in a week, so I can give an update if it's only a Hardware issue. Thanks a lot for your help :)

0
None
Qromepadigree

Reply 6 weeks ago

Odd, I would not expect it to be a hardware issue unless it is an out of memory issue. The data response can be quite large and if it can't parse it then that might be an issue. Do you see any other details in the Serial Monitor?

0
None
padigreeQrome

Reply 6 weeks ago

That's what I dont understand
Everything else works great, I also get Response from. Android and Windows Web Browser, I get the time correctly after a few seconds.. Serial Shows the normal progress, IP Adress, booting, Shows get/... And then it's like a freeze for about 30 seconds, after it tells me unexpected Response and get the time from the Web. I'll redownload the project tomorrow and try it with another nodemcu.

0
None
padigreeQrome

Reply 6 weeks ago

So maybe it's because they dont want to Activate the free Keys within a few hours, nor within a few days (now 5 days since creating the User Account) also the same progress on my other Email.......

Screenshot_2019-01-05-09-00-58-899_com.android.browser.png
0
None
malvernas

Question 7 weeks ago

I made this. I got everything installed and still have an issue connecting to Octoprint. I am sure about my ip address but I still get the following error:"Connection to OctoPrint failed:" not sure if this is something in the sketch config I missed or something else. anyone have any ideas?

2 answers
1
None
Qromemalvernas

Answer 7 weeks ago

Make sure OctoPrint is turned on as well as the printer (they should both be on) to test and get the expected result. Does your OctoPrint server use basic authentication? If so, you will need to add that as well.

0
None
malvernasQrome

Reply 7 weeks ago

Thanks for responding. It turned out it was some sort of issue with my router. I rebooted my router and it cleared up the connection issue with Octoprint. Everything works well at this point. Nice project.

Octoprint Monitor.jpg
0
None
MarioM264

Question 7 weeks ago

hi after flashing edited settings.h onto device i am unable to find it in wifi manager. what else need to be done?
also i have tried to flash original unedited project but still same result. it is not visible in wifi manager