Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Filament spool weight measurements: plugin and hardware design

    Scheduled Pinned Locked Moved
    Plugins for DWC and DSF
    2
    4
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • resamundefined
      resam
      last edited by resam

      I finally pulled all pieces together into a single project and wrote a README to have a nicely integrated filament weight sensor:

      https://github.com/Kriechi/duet-plugin-filament-load-cell

      Screenshot of the new weight field in DWC

      CAD model of the spool holder with integrated load cell

      It contains a DCS plugin to expose an HTTP endpoint, which returns a simple weight measurement in the style of approx. 762g filament left and displays that via a DWC plugin in the top menu bar in the browser - which makes it easy to prevent out-of-filament pauses or failed prints.

      The sensor itself is based on a 1kg load cell, mounted with a small bracket to my printer frame. The load cell gets read by an HX711 chip, which gets read by an Arduino Nano, which gets read over I2C by my Raspberry Pi / Duet SBC, which gets read by the DCS & DWC plugins.

      The Arduino Nano / ATmega168 firmware code is included and can be compiled & flashed via PlatformIO.

      While this was pretty much a "done" project for my printer, because its working for years already, I only recently merged and refactored everything into new Duet plugins. The DWC plugin is a very simple Javascript with an XHR/XMLHttpRequest/AJAX call to the new DCS HTTP endpoint and inject the returned measurement value into a new HTML element. No complicated Vue.js trickery involved - the JS code originated from a Tampermonkey script, so it is dead simple and only a few lines!

      Check out the README for more details!

      Enjoy!

      matej1006undefined 1 Reply Last reply Reply Quote 9
      • resamundefined resam referenced this topic
      • matej1006undefined
        matej1006 @resam
        last edited by

        @resam Is possible to add color and then if possible to do for 4 tool's spools

        resamundefined 1 Reply Last reply Reply Quote 0
        • resamundefined
          resam @matej1006
          last edited by

          @matej1006 it is possible - if you can change the code and build it 😃
          But you would have to do that yourself - all the code is open source and available on GitHub.

          matej1006undefined 1 Reply Last reply Reply Quote 1
          • matej1006undefined
            matej1006 @resam
            last edited by

            @resam i hope that i can figurit out how it's go.
            i am not so goo d at programing 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA