u/xeenon86

Hi everyone! I'm building a DIY filament TD measurement device (similar to the TD-1) using an ESP32-C3 with a TCS34725 color sensor and a TSL2561 light sensor.

The hardware works well, but I'm struggling with the TD calculation formula. Here's my problem:

Setup:

  • White LED shines through the filament
  • TSL2561 measures light transmission
  • TCS34725 measures RGB values
  • I measure a baseline (no filament) and compare with filament inserted

The problem: For neutral filaments (white, gray), my calculated TD matches the step test results well with a simple calibration factor. But for colored filaments (red, orange, yellow), the required correction factor is 3-4x higher than for neutral ones.

Example data:

  • White: calc TD = 0.78, step test = 3.2 → factor 4.1
  • Gray: calc TD = 0.83, step test = 3.2 → factor 3.8
  • Cherry Red: calc TD = 1.77, step test = 26.6 → factor 15.0
  • Yellow: calc TD = 1.45, step test = 21.6 → factor 14.9

We tried using the CIE photopic luminosity weights (0.299R + 0.587G + 0.114B) to combine the RGB channels, but this penalizes colored filaments because it weights green too heavily.

The question: What formula or approach would correctly handle colored filaments for HueForge-compatible TD measurements?

Any help appreciated!

reddit.com
u/xeenon86 — 9 days ago