Project tutorial
OctoPrint Printing Monitor

OctoPrint Printing Monitor © CC BY-NC-SA

It's a screen with colorful backlight that shows you some information about printing progress.

  • 1,495 views
  • 0 comments
  • 6 respects

Components and supplies

770a4970 1 1 1619x1080 mla7tedwjy
Raspberry Pi 3 Model B+
×1
A000057 featured
Arduino Leonardo
On photos you can see Iskra Neo, It's an analogue of original Leonardo
×1
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
×1
5210733
Alphanumeric LCD, 20 x 4
I used without I2C controller, but it's not difficult to edit code to use the I2C one
×1
Troyka 4 button module
×1
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
×1
26y8461 40
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
How long? It's up to you
×1
Power supply 12v 3a
×1
Cs ct5089
RobotGeek Barrel Jack Female Pigtail Lead 2.1 - 5.5mm
×1
Adafruit industries ada1536 image
Buzzer
×1
DHT21 temperature and humidity sensor
×1

Necessary tools and machines

Apps and online services

About this project

I think this project will be useful for people, who uses Octoprint.

It's a screen with colorful backlight that shows you some information about printing progress. It works with Octoprint API to get all the information about current process. Python script connects to Arduino Leonardo (you can use any with usb port. I used Leo, because I had had it before) and gives it some info. Also you can control your printer through this device.

Step 1: Getting Octoprint API Key

You need to have API key.

Save it.

Step 2: Setting Up Your Raspberry to Run Python Script

At first you need to connect to your raspberry through ssh.

Then login and type this command

sudo apt-get install python3-pip

Then you need to install some python packages

sudo pip3 install pyserial

After all installations download python script from Github page

Github repository

Type in ssh terminal sudo nano port.py, then copy all from octoprint-monitor.py and paste in terminal. In variable API you need to paste your Octoprint API key. You can paste through clicking on the right button of your mouse. After that press Ctrl + X, type "y" and press Enter.

Then make logMaster.py file through sudo nano logMaster.py, then copy all from octoprint-monitor.py and paste in terminal. You can paste through clicking on the right button of your mouse. After that pres Ctrl + X, type "y" and press Enter.

Then make command sudo python3 port.py

If you have an error, check previous steps.

If you see "

Connecting...
Connected.

" in your terminal all is ok. Press Ctrl+C.

Step 3: Printing Case for LCD Screen

I have LCD 20x4 screen.

You need to print a file from this link

My case on Thingiverse.

Step 4: Connect All to Arduino

On this picture you can see wiring diagram. Connect lcd display to arduino.

  • Then connect buzzer to 9th pin
  • Button 1 to 7th pin
  • Button 2 - 8th
  • Button 3 - 10
  • Button 4 - 13
  • Temperature sensor - pin 0
  • LED strip - pin 6

After that fix it all on printers side, glue lcd and buttons to the printed case. Fix the case with double sided tape.

Connect arduino to raspberry pi with usb cable.

Connect power supply to arduino and LED strip as on the picture.

Step 5: Uploading Sketch to Arduino

You need to download file octoprint-monitor.ino from github and upload it to arduino.

You'll need some libraries.

  • Liquid Crystal (It's already installed to Arduino IDE)

Then connect arduino to raspberry pi.

Step 6: Checking That All Is Ok

UPDATE: Auto port detection added! Now you don't need to find arduino's port.

Launch python code. If you see text "Connected serial", all is ok.

Step 7: Setting Up Script to Auto Start Up

How to add script to auto start up on raspberry pi?

It's easy. You need to type

sudo crontab -e

And add at the end of the file only one line.

@reboot /usr/bin/python3 /home/pi/port.py

That's all. Now reboot your raspberry and verify all.

Step 8: Finishing

Now the last step.

Check all and if something isn't well, write a comment with your problem.

Thank you for your attention!

Code

Custom parts and enclosures

Box for Lcd screen and buttons
https://www.thingiverse.com/thing:3528330

Schematics

Fritzing file
3d_print_monitor_D1Oepj9JRX.fzz

Comments

Similar projects you might like

Air Quality Monitor

Project showcase by Mustafa Hesham

  • 6,960 views
  • 9 comments
  • 39 respects

3D Printer Power Controller and Fault Monitor

Project in progress by Colin Russell-Conway

  • 1,342 views
  • 0 comments
  • 2 respects

Arduino101 / tinyTILE BLE: Match-Making Sunglasses

Project tutorial by Kitty Yeung

  • 13,548 views
  • 5 comments
  • 44 respects

Heart Rate Monitor Using IoT

Project tutorial by Team Technopaths

  • 21,871 views
  • 3 comments
  • 33 respects

Event Monitor for Independent Senior Citizens

Project tutorial by Team Rethink IoT

  • 4,031 views
  • 4 comments
  • 27 respects

Otto DIY+ Arduino Bluetooth robot easy to 3D Print

Project tutorial by Team Otto builders

  • 72,322 views
  • 134 comments
  • 212 respects
Add projectSign up / Login