Giter Site home page Giter Site logo

octoprint-filament-scale's Introduction

I don't use this anymore and don't maintain it.

This guy forked it and looks to have made some updates. Check him out: https://github.com/techman83/Filament-Scale-Enhanced

OctoPrint Filament Scale

This plugin allows connecting an HX711-based load cell to Octoprint to read out the current weight of the remaining filament.

You will need an HX711 breakout board and a compatible load cell. You can find these bundled together on Ebay/Aliexpress for roughly $8. Any load cell rated for more than 1kg and less than 50kg should work; I used a 5kg load cell with solid results.

See here for instructions on wiring up the load cell: https://tutorials-raspberrypi.com/digital-raspberry-pi-scale-weight-sensor-hx711/

This plugin assumes you connected the data pin to GPIO20, and the clock pin to GPIO21.

You will also need the bracket to connect the load cell to your printer: https://www.thingiverse.com/thing:3037926

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/dieki-n/OctoPrint-Filament-scale/archive/master.zip

Configuration

Once you have wired up the HX711, it must be calibrated. This is a pretty straightforward process, and all you will need is an object of known weight. Attach the load cell to your printer with the printed bracket, then follow the instructions on the plugin's settings page.

octoprint-filament-scale's People

Contributors

dieki-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

octoprint-filament-scale's Issues

any chance update to python v3

hi, I just wired and install everything on my pi, and your plugin don't work with python >3 , so disappointed..
Is there a chance you update it?
Or, do you have an alternative?

Thanks

Python 3 version

Hi all,

I've gone through and figured out how to get this going with Octoprint that has Python 3 installed. There are a few things that were deprecated when going from 2 to 3. One is the print statement, the other is the long statement. I went through the python script and updated those elements. I also included the changes suggested in the other issues, specifically addressing the pin allocation. This has changed from BCM to BOARD in my code. It seems maybe the powers that be have not converged with a standard? I'm not sure, I'm still getting into it this deep.

So, after getting it working, I'm curious if the behavior I am seeing makes sense.

  1. I'm not sure it does much outside of the settings menu. Is there a GUI front end? There are some javascript files in the repository. I write python code, and that stuff was easy to debug from the log file, but I am still mostly clueless with Java. I think there is a frontend because of what I can kind of decode from the java files that make the front end stuff.

  2. The spool weight doesn't do anything? I see the value, I can type into it to update it, but that's it. It's cool, as it saves what the value is, but I would have thought it would be tied into everything more, or am I not seeing something important?

This post helped:
https://github.com/dieki-n/Octoprint-Filament-Scale/issues/11#issuecomment-744584116

And this post helpd:
https://github.com/dieki-n/Octoprint-Filament-Scale/issues/12#issuecomment-728385562

Attached are my python 3 files. I've added a comment # UPDATED where I updated things.

hx711_python3.zip

I'd love to hear back from anyone else about if there is supposed to be more in the front end GUI on OctoPrint, and if what I did makes sense.

-Parsko

Dual extruder printer

Hi,

I have a dual extruder printer. Can I install 2 devices on the same raspberry to weight 2 spools?

Thank you in advance.

full-roll calibration

I have found that manufacturers tend to put exactly 1 Kg of filament on a roll. I assume this is because their equipment measures accurately. And if they put too much they lose money and if they put too little they will get complaints.

I suggest a calibration option that is more precise than guessing the spool weight. When you put a full roll on, you click one button and it stores the full weight. Then it always knows how much is left of the 1 Kg. This option would replace both the tare and the spool weight guess. And the calibration would happen on every new roll.

For extra credit you keep a database of partial weights of rolls not being used.

filament jam detection

I would think you could detect a jam by noting that the weight is not going down. I know it couldn't respond quickly and you probably couldn't resume the print, but it would be nice to detect this so you could restart the print. I often discover the jam hours later than when it happens.

Plugin creates heavy systemload

Under normal idle circumstances my Octoprint setup has the following loadaverage output
load average: 0.02, 0.22, 0.26
After activating the plugin again the loadaverage output changes to
load average: 0.68, 0.65, 0.52
This will result in an stuttering print for me, especially if there are a lot of curves.

Also the reading switches quite often from the actual reading to NaNg for like a second.

And there are some errors in my browsers console
octopi.local-1536171335227.log

Plugin not getting a reading from the sensor

Hey there, I followed the guide here, substituting the pins of course, but I am not able to get this plugin to read anything from the sensor. I tried the example code in that link, and that appears to function as expected.

When octoprint starts it simply says 'loading', and when trying to tare/calibrate it will go to 0g but I never get an actual reading from it. Can confirm I am using the correct pins as well.

Does anyone have any advice for me before I start trying to dig into the plugin code? Thanks!

Running the latest octoprint (1.4.2) on a raspberry pi 3 b+

In the logs I am seeing:

2020-08-22 14:48:36,620 - octoprint.plugin - ERROR - Error while calling plugin filament_scale
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filament_scale/__init__.py", line 58, in on_startup
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filament_scale/hx711.py", line 18, in __init__

suggestions to fix bad readings?

The tare and calibrate (thanks for the soda can suggestion) work great. But the when I put a full roll on I get 65 g. I suspect it has to do with my hardware setup and I'm looking for advice. What setup are other users here using on a raspi?

I'm using the cheap green board that came with the load cell. I'm powering it with 3.3V because I don't want 5V on GPIO pins. The specs on amazon say 2.7 to 5V for VCC. I'm guessing it is probably clipping values due to using 3.3V.

I've scoured the web and I'm getting tons of conflicting advice which on the whole is useless. I guess I could buy a red sparkfun board but I hate to spend another $10.

Plugin values continuously read "Sensor Not Connected"

When connecting the breakout board to the load cell, every minute or so the plugin on OctoPrint would read "Sensor Not Connected", even while there was no external interference given before or after the faulty reading. I am using female to female jumper wires to connect a Pi 3B+ to the HX711 breakout board, and the given female connectors to the breakout board. The Pi is running OctoPi 0.15.1.

scale not working

The scale is giving all kinds of false readings, 0, 5000, -234 etc. I've tried a new scale, same results. Any ideas?

Possible Problem with Raspberry Pi 3 Model A+

We build customize 3D printers base on typical Ender style printers. One of our main features to add is a filament scale.

Have done 5 customized 3D printers using Raspberry Pi 3 Model B+ and Raspberry Pi 4s with the Filament Scale working great (even did an i3 Mini with a Raspberry Pi Zero 2 W and scale worked fine). The last 3 Printers we have built using Raspberry Pi 3 Model A+ are having massive NAN and weight errors (only 2 or 3 readings per 10 appear correct). If we connect a Raspberry Pi 4 (we have one set up to test non-Octoprint printers) the scale works great so it is not the cabling nor the HX711 wiring.

Looking at the clock signal with a scope between the Pi 4 and the Pi 3 Model A+ we find the Pi 4 clock running about 600-700 Hz. On the Pi 3 Model A+ it running about 60 Hz, which is below the spec for the HX711 (80 Hz).

Is there some way of increasing the clock rate when using the Pi 3 Model A+ or will this be a board not to use for Octoprint additions?

Thank you!

Not-connected message too long

I get the not-connected message in the sidebar quite often (every minute or so). This happens on two different printers. This isn't too big a problem since I manually read the weight and I can wait a few seconds.

The real problem is that the message is so long that the whole sidebar jumps down. This is extremely annoying when reading something below it. Could the message just read "--- g" when this happens? This is a bit of a standard in UIs.

P.S. It would be nice if there were a long timeout for the message since the weight doesn't change very fast. Then we wouldn't see it at all.

PRs / Shared Maintenance / Fork

@dieki-n I've started making changes to my own fork, now I could just release with a new title (Filament Scale Reborn or something more creative..), but if you'd like to be involved I will formulate some PRs. Alternatively, happy to take the name and continue the awesome work you've already done.

I've got it working on my printer with only a few tweaks, so awesome work!

I've got a concept that might alleviate #3 / #11, plus works in Python 3 solving #12 / #13

Feature-Request: ioBroker connection

I would like to know if there is an ioBroker export possible.

I have the octoprint adapter, and it whould be nice to have the actual weight in the objects (like in the "filament" folder)

grafik

No weight reported NaN

This plugin doesn't work for me. Tried two scale setups with the green board. Under current reading NaN is reported and nothing can be calibrated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.