GithubHelp home page GithubHelp logo

jasonacox / ender3-filament-digital-scale Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 97 KB

Adds a load cell to the filament spool holder of a Creality Ender 3 Pro 3D-printer to measure weight and display on TM1637 LED display. Uses ATtiny85 microcontroller and HX711 module for weight measurement.

License: MIT License

C++ 71.18% C 28.82%
creality ender3pro filament loadcell weight-measurement tm1637display hx711 attiny85

ender3-filament-digital-scale's Introduction

Ender3-Filament-Digital-Scale

Build Status

This project is to add a load cell to the filament spool holder of a Creality Ender 3 Pro 3D-printer to measure and display weight of spool. Using the tare function of the scale on an empty spool, the user can determine the amount of filament (in grams) remaining on a spool.

This project uses an Arduino or ATtiny85 microcontroller with the HX711 load cell module for weight measurement and a TM1637 4-digit LED display.

Components

ATiny85 Microcontroller
TM1636 4 Digit 7-Segement LED Display 
Load Cell
HX711 Load Cell Amplifier (ADC)
100uF Electrolytic Capacitor
5V Power Supply

Schematic

Schematic

How to Build

Print Mount and Display Box

The filament scale mounts on top of the Ender 3 top rail where the filament spool is located. You will need to print the load cell mount and the LED display box. This is available on Thingiverse or Tinkercad.

See example build pictures below.

Setup

Calibration

This sketch requires that you calibrate the load cell. This involves the following steps:

  1. Run the sketch with DEBUG true (using a Arduino Uno or other microcontroller with serial)
  2. Record the "HX711 reading" values with NO load on the scale - this is your "CAL_OFFSET"
  3. Use a trusted scale to weigh an object like a can of soda, and record this value as your "KNOWN-VALUE" (Note: use the unit of measure you want for the scale, like grams or kg).
  4. Place the object on the load cell and record the "HX711 reading" - this is "CAL_VALUE"
  5. Edit the #defines in the code for your CAL_OFFSET, KNOWN-VALUE and CAL_VALUE
  6. The compiler will compute CAL_RATIO = (CAL_VALUE - CAL_OFFSET) / KNOWN-VALUE

Programming Notes

The TARE button uses PB0. If you use the Tiny AVR Programmer from Sparkfun it drives an LED on PB0 and once the sketch is uploaded, the TTiny will read PB0 as LOW and assume you wish to TARE the scale. You will need to remove the the chip from the programmer after uploading to get it to work correctly in the circuit.

This code uses the TM1637TinyDisplay and HX711 Arduino libraries that can be installed via the Arduino IDE.

Tare Function

On start the circuit will read the last TARE value from EEPROM and display the the current weight. Press and hold the TARE button and the current weight value will be recorded in EEPROM and subtracted from the current reading to "Zero" out the scale. The display will flash "Tare" to indicate it has been zeroed.

To accurately measure the amount of filament left in a spool, place an empty spool on the spool holder before pressing the TARE button.

Build Pictures

Build1 Build2 Build3 Build4 Final

References

ender3-filament-digital-scale's People

Contributors

jasonacox avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

uluozgur nwlynch

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.