LED strip feedback

Add a WS2812 LED strip to your machine and see its state at a glance — no screen, no app, just a strip of LEDs that tells you what's happening.

What it shows

Machine state LED effect
Startup Rainbow animation
Idle Calm breathing effect
Running Green wave — LEDs near the tool brighten as it moves
Homing Cyan wave
Hold Orange pulse
Safety door Red pulse
Alarm Solid red
Sleep Off
Probe touch White flash

The position tracking feature is particularly satisfying: map LEDs to your machine's physical axes, and as the tool moves, nearby LEDs brighten. You can see where the machine is cutting without looking at a screen.

How it works

Every LED on a WS2812 strip has a small driver chip. The controller sends one stream of colour data into the first LED. That LED keeps the first colour for itself and passes the rest on to the next one, and so on down the strip. This means:

  • Data only flows one way. The strip has small arrows printed on it; connect the FluidBoard to the end where the arrows start (DIN), not to DOUT.
  • The signal is timing-critical. Noise or a poor ground shows up as flickering or random colours, usually starting at the first LED.
  • A strip can be cut at the marked cut lines, and pieces can be chained by connecting DOUT of one piece to DIN of the next.

Wiring

  • Connect the data line (DIN) to 5V output 4 (Out4, gpio.3). The strip gets a 5V PWM data signal from this pin. It is shared with MOSFET output 3, so use one or the other
  • Power the strip with the voltage it is rated for (5V or 12V): either from an external 5V/12V supply, or from the FluidBoard's own supply with a 470 µF capacitor across the strip's power input
  • Keep the data wire short, or add a 330 Ω series resistor for longer runs
  • Tie the grounds together: strip, power supply and FluidBoard must share a common GND

Wiring diagram not available. View SVG

Some practical notes:

  • Place the resistor at the strip. The series resistor works best at the end of the data wire closest to the first LED.
  • Mind the capacitor polarity. The 470 µF capacitor is an electrolytic capacitor: the minus side (marked with a stripe) goes to GND, the plus side to the strip's supply. Place it at the strip's power input.
  • Connect GND first. When connecting a strip to a powered system, connect GND before data and power. A data line connected without ground can damage the first LED.
  • Budget the current. A 5V WS2812 LED can draw up to about 60 mA at full white. 40 LEDs at full white is up to 2.4A. The status effects rarely run every LED at full white, but size the supply for the worst case. For longer strips, use an external supply.
  • Feed long strips from both ends. The thin copper of a strip drops voltage over its length. If LEDs at the far end look dim or turn yellowish or reddish, also connect power and GND at the far end. Only connect data at the start.

Mount the strip where you can see it from your usual working position, and protect it from coolant and chips, for example in an aluminium profile with a diffuser cover.

Configuration

led_strip:
  pin: gpio.3 # 5V output 4
  type: WS2812
  leds: 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  color_order: GRB
  direction: "XXXXXXXXXXX YYYY XXXXXXXXXXX"
  travel: -300 -100 300
  feedback:
    enabled: true
    idle_brightness: 70
    idle_breathe_period: 30000
    running_boost: 10
    position_boost: 25

The leds list maps physical LED positions to logical indices. The direction string assigns each LED to an axis (X, Y, or space for gaps). The travel values define the machine distance for each segment in mm.

In the example, the list runs from 40 down to 0, which reverses the strip. You need this when the strip is mounted with its data input at the opposite end from where you want the effects to start, so you don't have to rewire it. If the position tracking moves the wrong way, check the order of the leds list against how the strip is physically mounted.

Most WS2812 strips use GRB colour order, but not all of them. If red and green appear swapped, change color_order.

Testing it

  1. Power up. You should see the rainbow animation on the whole strip, followed by the idle breathing effect.
  2. Jog each axis from one end to the other, and check that the bright spot follows the tool along the right part of the strip and in the right direction.
  3. Trigger a feed hold and check for the orange pulse; resume to clear it.
  4. If you have a probe, touch it and check for the white flash.

Troubleshooting

Symptom Likely cause Fix
Nothing lights up Data connected to DOUT, or no common GND Connect data to DIN (start of the arrows) and tie all grounds together
Nothing lights up gpio.3 also configured as a mosfet output Use gpio.3 for one function only
Flickering or random colours Long data wire, missing series resistor or poor ground Shorten the data wire, add the 330 Ω resistor at the strip, check GND
Red and green swapped Wrong colour order Change color_order
Far end dim or discoloured Voltage drop along the strip Feed power and GND at both ends
FluidBoard resets when the strip lights up fully Strip draws too much current from the board's supply Use an external supply for the strip
Position tracking runs the wrong way leds order doesn't match how the strip is mounted Correct the order of the leds list
Copyright (c) 2024 by NubiloSoft, all rights reserved.
Accepted payment methods