Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.72 KB

README.md

File metadata and controls

58 lines (42 loc) · 3.72 KB

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