LED Motion Reactive Staff

Inspired by a staff my friend picked up at Renn fair, this staff focuses on having a motion reactive lighting system with a dice roller built in.

Project Goal: Creation of an Interactive LED Flow Staff

The primary objective of this project is to construct a high-performance, internally powered LED flow staff that combines responsive motion sensing with user-driven customization through an on-board menu system.

The resulting staff will be a professional-grade prop defined by its stability, bright illumination, and interactive intelligence.

1. High-Performance Illumination

The staff will feature 29 WS2812B NeoPixel LEDs chained along the shaft and concentrated in a NeoPixel Ring at the end.

  • Continuous Illumination: The LEDs will light the entire length of the staff, creating brilliant streak effects during spins.

  • Safety and Power: The 5V lighting system is powered by a dedicated PowerBoost 1000 unit and protected by a 1000 uF capacitor to ensure stable power delivery and longevity.

2. Interactive Menu System

The staff's intelligence is managed by the Arduino Nano R4 Minima and controlled via two distinct human-machine interfaces:

  • Visual Feedback: A 1.3-inch OLED graphic display provides a clear, real-time menu for selecting modes, adjusting settings, and viewing diagnostics.

  • Tactile Control: Four dedicated tactile push buttons (UP, DOWN, SELECT, BACK) allow users to navigate the menu and settings with precise, physical feedback.

3. Motion Reactivity and Intelligence

The staff is designed to be fully reactive to user movement:

  • Motion Sensing: A LIS3DH 3-Axis Accelerometer constantly monitors the staff's orientation, velocity, and impact forces.

  • Mode Logic: The final code will translate raw sensor data into specific lighting behaviors, allowing the staff to:

    • Trigger bright flash effects upon impact.

    • Change color or pattern based on spin speed or orientation.

    • Display real-time acceleration values for testing and diagnostics.

4. Simplified and Robust Architecture

The final architecture focuses on stability and ease of assembly:

  • 5V Native Logic: The use of the Arduino Nano R4 Minima 5V logic) eliminates the need for complex external level shifting components, ensuring a reliable data signal to the LEDs.

  • Safe Power Management: A dedicated USB C MicroLipo Battery Charger is integrated for safe and easy recharging of the Li-Po battery, completing the internal power solution.

The goal is a seamless, professional prop where the lighting responds intelligently to the flow artist's movements, all controllable via a clear, integrated display.


Project Summary and Evolution

The core goal was to repurpose components into an interactive flow staff featuring a menu-driven OLED display and motion-reactive lighting patterns.

Phase 1: The Feather ESP32 3.3V Challenge (Initial Concept)

  • Initial Plan: Use the Adafruit Feather ESP32 as the main controller.

  • Key Obstacles: The Feather runs on 3.3V logic, while the NeoPixels run on 5V. This required a Logic Level Shifter (specifically, the hard-to-source 74AHCT series) and led to persistent debugging issues with the OLED screen and LIS3DH sensor initialization.

Phase 2: The Final Pivot to Nano R4 5V

  • Solution: The project transitioned to the Arduino Nano R4 Minima. This was the single most important decision.

  • Result: By switching to a 5V logic MCU, we eliminated the Level Shifter entirely and simplified the entire system, ensuring stable, reliable data transmission to the 29 NeoPixels.

Final System Architecture (Arduino Nano R4)

The staff's final design is based on three independent, specialized subsystems, all housed in the central grip:

1. The Brain and Logic 5V and 3.3V

Component

Function

Status/Logic Level

Arduino Nano R4 Minima

Main CPU, runs at 5V logic.

5V

1.3" OLED Display

User interface for mode selection (SPI protocol).

3.3V (Powered by Nano R4 3.3V pin)

LIS3DH 3-Axis Accel

Detects spin, impacts, and orientation (I2C protocol).

3.3V (Powered by Nano R4 3.3V pin)

4 Tactile Buttons

Menu navigation (UP, DOWN, SELECT, BACK).

5V (Wired to Nano R4 digital pins/GND)

2. Power and Safety 3.7V to 5V

The power path is designed for high current and safety:

  • Power Source: 3.7V Li-Po Battery.

  • Load Management: Adafruit PowerBoost 1000 Basic converts the battery voltage to a stable 5V supply for the entire staff.

  • Master Switch: A Rocker Switch is placed on the 5V bus after the PowerBoost to interrupt the high-current flow to the LEDs.

  • Charging: The USB C MicroLipo Battery Charger is wired in parallel with the PowerBoost for dedicated, safe charging of the battery.

  • Safety Capacitor 1000 uF: Critically important to prevent power spikes when the 29 LEDs suddenly turn on, protecting the PowerBoost and the NeoPixels.

3. LED Array (29 Total Pixels)

  • Total LEDs: 16-LED NeoPixel Ring (End) + 13 Individual WS2812B LEDs (Shaft) = 29 Total Pixels.

  • Data Path: The 5V Nano R4 Digital Pin D6 connects directly to the LED chain.

  • Data Protection: A 330 Ohm Resistor is placed on the data line immediately before the first LED to prevent initial power-up damage.

Important Takeaways for Assembly (Why We Added Components)

These details are the key to a successful build and resolving the inevitable debugging issues:

  1. Level Shifter Elimination: The switch to the Nano R4's 5V logic means the highly complex and problematic level shifter is gone.

  2. I2C Stability Fix (Pull-ups): The project now requires two 4.7k Ohm resistors for the I2C bus (A4 and A5, pulled up to the 3.3V pin) to ensure the LIS3DH sensor initializes correctly. This component prevents the sensor from printing LIS3DH not found! on startup.

  3. Code Architecture: The project is split into three phases:

    • Phase 1 (Code Complete): Debugging the 3.3V peripherals (OLED, LIS3DH) and the buttons, powered by USB.

    • Phase 2: Integrating the 5V PowerBoost, Rocker Switch, and LED chain.

Phase 3: Final assembly and adding motion logic.

Finalized Parts List: Arduino Nano R4 LED Flow Staff

Project Goal: Interactive LED Flow StaffFinalized Component List: Arduino Nano R4 Build


This design utilizes a robust and simplified 5V logic architecture, which eliminates the need for a complex level shifter.

Category

Item

Qty

Purpose/Notes

Microcontroller

Arduino Nano R4

1

Base MCU: 5V logic for simplicity, compact, and fast processing.

Power Management

Adafruit PowerBoost 1000 Basic (5V)

1

ESSENTIAL DC-DC Booster: Converts the 3.7V Li-Po battery voltage to a stable 5V for the entire system (MCU & LEDs).

Power Management

USB C MicroLipo Battery Charger

1

External board for secure battery charging (requires shorting the 0.5A jumper).

Power Source

3.7V 1200mAh Li-Po Battery

1

Single-cell rechargeable power supply.

LED Array

NeoPixel Ring (24 LED, RGBW)

1

The primary light source located at the staff's end.

LED Array

Individual WS2812B LEDs

13

The lights along the shaft, connected in a daisy-chain. Total LEDs: 37.

Input/Controls

Rocker ON/OFF Switch (6A, 125VAC)

1

Master power interrupt for the high-current 5V LED bus.

Input/Controls

LIS3DH 3-Axis Accelerometer

1

Real-time motion and impact data (operates on 3.3V logic).

Input/Controls

Tactile Push Buttons (Mini)

4

UP, DOWN, SELECT, and BACK navigation buttons for the menu.

Display

1.3" OLED Graphic Display (SPI)

1

Used for the interactive menu system (operates on 3.3V logic).

-----Essential Safety & Stability Components


These components are critical for the long-term reliability and health of the circuit, especially when managing high-current LEDs and sensitive I²C communication.

Component

Qty

Purpose/Notes

Safety Capacitor

1000µF, 6.3V+

CRITICAL: Placed across the 5V power bus near the LEDs to suppress power-on current spikes.

Data Protection Resistor

330 - 500 Ohm

CRITICAL: Positioned on the LED data line (D6) immediately before the first LED in the chain.

I²C Pull-Up Resistors

2

CRITICAL ADDITION: 4.7kΩ resistors needed to stabilize I²C communication (SDA to 3.3V and SCL to 3.3V) for the LIS3DH sensor.

Supplies

24-28 AWG Silicone Wire

Set

Simplified Shopping List: Nano R4 LED Staff

Component Shopping List: Interactive LED Flow Staff


(Note: This list includes the required 4.7k Ohm resistors for I2C bus stability.)

Category

Item

Quantity

Control & Processing

Arduino Nano R4 (Microcontroller)

1

Motion Sensing

LIS3DH 3-Axis Accelerometer

1

Power Management

Adafruit PowerBoost 1000 Basic (5V) (Power Conversion)

1

USB C MicroLipo Battery Charger (Battery Charger)

1

3.7V 1200mAh Li-Po Battery

1

User Interface

1.3" OLED Graphic Display (SPI)

1

Rocker ON/OFF Switch (6A, 125VAC) (Master Switch)

1

Tactile Push Buttons (Mini) (Controls)

4

LED System

NeoPixel Ring (16 LED, RGBW)

1

Individual WS2812B LEDs

13

Passive Components & Supplies

Safety Capacitor: 1000uF, 6.3V+

1

330 - 500 Ohm Resistor (Data Resistor)

1

4.7k Ohm Resistors (I2C Pull-Up Resistors)

2

24-28 AWG Silicone Wire

Set