RFID Filament Weighing Scales by cirion76 3d model
Warning. This content is not moderated and could be offensive.
m4
3dmdb logo
Thingiverse
RFID Filament Weighing Scales by cirion76

RFID Filament Weighing Scales by cirion76

by Thingiverse
Last crawled date: 3 years, 1 month ago
License for all provided files: CC-BY-NC-SA 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode)
RFID Filament Scales
If you got addicted to 3D printing like me, keeping track of what remains on dozens of filament spools gets more and more tedious. My solution: Affordable weighing scales that can scan an RFID tag sticker on every spool to keep track of the spools' (tare) weights.
Current features/limitations:
Supports cheap 13.56 MHz RFID tags (MIFARE Classic).
Stores up to 510 tare weights (including name and color strings, up to 20 characters each).
Tare weight can be entered by known spool weight or known filament weight.
Calibration by either 100 g, 200 g, 500 g or 1 kg weights.
Free browsing through all entries without the need to re-scan the corresponding tag.
Firmware is easily portable to other languages (limited by the LCD's capabilities, of course).
Minimal soldering required (if at all, you only have to solder a few pin headers).
Basic consumption tracking.
Overall accuracy is about ±2 g (but also depends on your load cell, the HX711 module and your environment). However, due to varying filament tension you'll see much larger (or even huge) fluctuations when used during printing. If you want to smooth this out, you'll have to edit config.h in the HX711_ADC library's directory and set SAMPLES to a higher value (must be a power of two, max. 128). This will increase settling time, though (from 1.8 s default to 13 s for 128 samples).
You should currently consider this project (including this documentation) a very early draft. Don't hold me responsible for any mistakes that might harm you or destroy your hardware - only build this if you know what you're doing! This should probably not be your first project involving a µC.
If you want to speed up development and/or documentation, you might consider a donation ;-)
Printing
Material doesn't really matter, but I recommend TPU (or even softer materials if you can print them) for the encoder knob (just for haptic reasons) and any reasonably stiff material (e. g. PLA) for the weighing unit. Everything should print fine with 0.2 mm layers, but for perfect accuracy you'll need 0.1 mm layers or less at least for the controller unit.
Both top parts and - if needed - the encoder knob should be printed upside down. The controller top needs supports for the LCD window (unless your printer can easily bridge 100 mm) and maybe the encoder hole, all the rest prints without supports.
Bill of Materials
1x Arduino Mega or clone (actually an Uno would suffice for the current version, but wouldn't leave much room for future improvements, and besides, I already had the Mega ;-))
1x 20x4 LCD module (HD44870/SC2004) with I²C interface (https://www.amazon.de/gp/product/B007XRHBKA)
1x KY-040 rotary encoder module (https://www.amazon.de/gp/product/B07CMSHWV6)
1x MFRC522 RFID reader module (https://www.amazon.de/gp/product/B08G15MRLV)
1x AT24C256 EEPROM module (https://www.amazon.de/gp/product/B07XTBXGXW)
1x 5 kg load cell (standard chinesium 80x12.7x12.7 mm model) with HX711 module (I used this set https://www.amazon.de/gp/product/B07GRGT3C3)
1x mini breadboard for power and I²C bus distribution (https://www.amazon.de/gp/product/B07GKVTM88, if you assemble your own wiring you can drop this)
1x active-low beeper module (https://www.amazon.de/gp/product/B07D3NYCDV, optional, can be directly plugged into the mini breadboard)
lots of 20 cm jumper wires (Dupont), male-to-male and male-to-female (or, of course, any other suitable means of wiring you can assemble yourself)
2x M2.6x6 self-tapping screws (for KY-040 module)
10x M3x6 self-tapping screws (for Arduino, Display and HX711 module, be careful not to damage the SMD parts on the HX711 module - if in doubt only use one screw)
4x M3x8 (or longer) countersunk screws (for RC522 module)
4x M4x6 (or longer) countersunk screws (for the controller enclosure)
2x M4x20 (or slightly longer) countersunk screws (for the load cell unit top)
2x M5x20 (or slightly longer) countersunk screws (for the load cell unit bottom)
4x M3 nuts (for RC522 module, again be careful not to damage the SMD parts)
8x anti-slip pads (optional)
13.56 MHz RFID tags for your spools (e. g. https://www.amazon.de/gp/product/B01HEU96C6)
a 100 g, 200 g, 500 g or 1000 g calibration weight
Firmware Dependencies:
You'll need the following libraries for the provided Arduino IDE .ino source:
HX711_ADC (https://github.com/olkal/HX711_ADC, can be installed from within Arduino IDE)
MFRC522 (https://github.com/miguelbalboa/rfid, can be installed from within Arduino IDE)
New-LiquidCrystal (https://github.com/fmalpartida/New-LiquidCrystal)
RotaryEncoder (https://github.com/mathertel/RotaryEncoder, can be installed from within Arduino IDE)
extEEPROM (https://github.com/JChristensen/extEEPROM, can be installed from within Arduino IDE)
Wiring:
EEPROM & Display: VCC to Arduino 5V, GND to Arduino GND, SDA to Arduino SDA (communication pin 20), SCL to Arduino SCL (communication pin 21)
KY-040: VCC/+ to Arduino 5V, GND to Arduino GND, CLK/A to Arduino communication pin 18, DT/B to Arduino communication pin 19, SW to Arduino digital/PWM pin 2
RC522: 3.3V to Arduino 3V3 (IMPORTANT! 5V will probably destroy the module!), GND to Arduino GND, RST to Arduino digital/PWM pin 6, SDA to Arduino digital/PWM pin 7, SCK to Arduino SCK (digital pin 52), MOSI to Arduino MOSI (digital pin 51), MISO to Arduino MISO (digital pin 50)
HX711: VCC to Arduino 5V, GND to Arduino GND, CLK to Arduino digital/PWM pin 4, DAT/DT to Arduino digital/PWM pin 5
Beeper: VCC to Arduino 5V, GND to Arduino GND, I/O to Arduino digital pin 22
For now I hope you can figure out assembly and power/signal distribution via the breadboard yourself ;-)
A few notes:
If you haven't flashed the firmware yet, the beeper will beep continuously (unless you have replaced it with an active-high one and changed the source code accordingly). This is annoying, but normal. So flash first.
If you have trouble putting the EEPROM module in its place, heat up the small clips a little and bend them back after you inserted the module.
The arrow on the load cell needs to point downward.
Keep the wires between HX711 and load cell twisted.
I do know that you should use a level shifter between MFRC522 and Arduino - however, it works reliably without one as long as you don't power the module with 5V. Besides, most easily available level shifter modules are either too slow for SPI or they (e. g. the TXS0108E) need more driving current than the MFRC522 can provide. An affordable alternative would be much appreciated.
A proper connection between controller and weighing unit (via an ordinary ethernet cable) will be added some time in the future. All further development depends on your input and support ;-)
If you don't print the encoder knob with a flexible material you'll probably need to scale it up a little.

Tags