Skip to content

Ritbit/SIGHT

Repository files navigation

S.I.G.H.T

Shelf Indicators for Guided Handling Tasks

SIGHT Installation

What is S.I.G.H.T.

S.I.G.H.T. is an 8-Channel LED Strip Controller designed for use in warehouse order picking or as shelf position indicators. By connecting to your system via USB, it identifies as a serial port, allowing for straightforward interaction and control. The main setup is based on an RP2040 microcontroller from Waveshare, but it will work fine on any RP2040 MCU. For the indicators, common WS28xx LED strips can be used, including both RGB (WS2812B) and RGBW (WS2813B/SK6812) variants.

RP2040 Zero

RP2040 Zero

The model used in my PCB is this one: https://www.waveshare.com/wiki/RP2040-Zero But it works just s fine on the much cheaper clones from AliExpress: https://nl.aliexpress.com/w/wholesale-RP2040%2525252dZero.html

LED Strips

It can drive all WS28xx based LED strips, supporting both RGB (WS2812B) and RGBW (WS2813B/SK6812) variants. Due to the redundant data lines, I recommend the 5V based WS-2813 or the 12V based WS-2815 for longer lengths (over 1.5m). For 12V strips you have to change the capacitor on the driver board for a 16V model. (A replacement schematics+PCB suitable for both will be added soon).

Important: Configure your LED strip type in the firmware by uncommenting the appropriate define:

  • #define USE_RGB_LEDS for WS2812B (3 bytes per LED)
  • #define USE_RGBW_LEDS for WS2813B-RGBW, SK6812 (4 bytes per LED)

LEdStrip models

For more details about LED strips see user-guide-for-ws2812b-ws2811-sk6812-and-ws2815

PCB's

There are ready for use PCB's in the PCB folder, you can import them into EasyEDA and from there send in the order to JLCPCB to get the ready for use PCBs.

Compile

The source code for the firmware can be compiled using the user-friendly Arduino IDE. To add support for the Waveshare RP2040 Zero, please follow the instructions here https://www.waveshare.com/wiki/RP2040-Zero to add the Waveshare RP2040-repository to the Arduino IDE. And then install support for this board:

  • Raspberry Pi Pico / RP2040

Please make sure to install the libraries for:

  • FastLED
  • FastLED_RGBW (for RGBW strip support)
  • LittleFS
  • Crypto
  • Ticker
  • MicroControllerID

Important: When compiling, make sure to reserve a little space for LittleFS (8-64KB) in the Arduino IDE board settings to enable configuration storage.

Quick Start

Get your SIGHT controller running in just 4 simple steps:

  1. Connect Hardware

    • Plug SIGHT into your USB port
    • Connect LED strips to the configured GPIO pins
    • Power on the system
  2. Open Serial Monitor

    • Open Arduino IDE Serial Monitor
    • Set baud rate to 115200
    • Watch the blue startup pulse until the serial prompt appears
  3. Basic Commands

    • Type H and press Enter to see help
    • Try T1:1 to set first group to green
    • Try X to clear all groups
    • Use I for the combined info/status page
  4. Save Configuration

    • Type S to save your settings
    • Configuration will auto-load on next boot

Example First Session:

> H              # Show help
> T1:1           # Set group 1 to green (state 1)
> T2:2           # Set group 2 to orange (state 2) 
> I              # Check status
> S              # Save configuration

Usage:

Upon connection, the controller performs a startup sequence while the CPU status LED softly pulses blue and each channel performs a GPIO pin test. The watchdog only arms after USB serial is opened, preventing unwanted resets while waiting for a host. Once the serial port is opened, the LED switches to a breathing green "normal" glow, a welcome animation plays on all LED strips, and configuration settings load from flash if available. Any error state forces the CPU LED to blink red for quick diagnostics.

The startup sequence output will look as follows:

-=[ Shelf Indicators for Guided Handling Tasks ]=-

SIGHT Version  : 1.9.1
MicroController : WAVESHARE_RP2040_ZERO
MCU-Serial      : E6632C85931E832C

Initializing...

LittleFS mounted successfully.
Configuration loaded successfully.
Initialization done..,

Identifier           : SIGHT v1.9
LEDs per channel     : 57
Groups per channel   : 6
Amount of channels   : 8
Spacer width         : 1
Start Offset         : 1
Blinking interval    : 200
Update interval      : 25
Animate interval     : 150
Animation fading     : 48
2-step fade (in/out) : 50 / 50
Channel order        : 12345678
LED Mode             : RGB-only (W channel = 0)
Startup animation    : True
Local echo           : Enabled
Overall brightness   : 255

Channel              : |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |
GPIO-PIN             : | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09

Color state 1        : 008000 (RRGGBB) Pattern: 0
Color state 2        : FF8C00 (RRGGBB) Pattern: 0
Color state 3        : FF0000 (RRGGBB) Pattern: 0
Color state 4        : 0000FF (RRGGBB) Pattern: 0
Color state 5        : 008000 (RRGGBB) Pattern: 1
Color state 6        : FF8C00 (RRGGBB) Pattern: 1
Color state 7        : FF0000 (RRGGBB) Pattern: 1
Color state 8        : 0000FF (RRGGBB) Pattern: 1
Color state 9        : FFFFFF (RRGGBB) Pattern: 10

Enter 'H' for help

>

After the initialization, a command prompt (>) will appear, indicating that the controller is ready to accept commands. Below is a list of available commands:

Command Reference

System Commands

V             - Show version information
H or ?        - Show help
D             - Display current configuration
I             - Show system info (RAM/Flash usage, uptime, statistics)
S             - Save configuration to flash
Se            - Save/Export configuration as hex (backup)
L             - Load configuration from flash
Li:CONFIG:    - Load/Import configuration from hex (restore)
R             - Reboot controller
W             - Shows welcome/startup loop

Group Control Commands

Tnn:s         - Set group nn to state s (0-9)
M:ssssss      - Set multiple groups at once by providing a list of states (e.g. M:12345)
A:s           - Set all groups to state s (0-9)
Pgg:s:ppp     - Set group state with progress (gg=group, s=state 0-9, ppp=percent 0-100)
X             - Clear all groups (set to state 0)

Configuration Commands (C prefix)

Cn:name       - Set controller name/identifier (max 16 chars)
Cl:n          - Set LEDs per channel (6-600)
Ct:n          - Set groups per channel (1-100)
Cs:n          - Set active channels (1-8)
Cw:n          - Set spacer width (0-20)
Co:n          - Set start offset (0-9)
Cb:n          - Set blink interval (50-3000 ms)
Cu:n          - Set update interval (5-500 ms)
Ca:n          - Set animate interval (10-1000 ms)
Ci:n          - Set brightness intensity (10-255)
Cf:a:i:o      - Configure fading animation + two-step fade-in/out percentages (0-255 each)
Cc:s:RRGGBB   - Set color for state s (hex)
Cp:s:pattern  - Set pattern for state s (1-9, pattern 0-12)
Cz:order      - Set channel order (N=12345678 or custom sequence)
C4:yes/no     - Toggle RGBW mode
Cx:ch:pin     - Set GPIO pin per channel
Ce:Y/N        - Enable/disable local echo (character echo while typing)
Cd            - Reset to default configuration

Command Examples

Set a status for a group:

  • Set group 1 to status 1: T1:1

Set status for multiple groups:

  • Send status for the first 8 groups: M:14262435

Set group with progress percentage:

  • Set group 5 to state 2 with 75% progress: P05:2:075

Reset all groups:

  • Clear all: X

Check status:

  • System info (uptime, RAM, group states): I

Configuration backup/restore:

  • Export config: Se
  • Import config: Li:CONFIG:<hex_string>

There are 10 different statuses that can be used, but status 0 is hardcoded to 'off' (all LEDs off), the statuses 1-9 can be freely configured with RGB color and blinking/animations.

Set color for a state:

  • Set state 2 to orange: Cc:2:FF6000

Set pattern/animation for a state:

  • Set state 2 to chase up/down: Cp:2:10

Animation Patterns

The hardcoded animations are:

 0.  Solid on                     [########]
 1.  Blinking                     [########]   [        ]
 2.  Blinking inverted            [        ]   [########]
 3.  Alternate left/right block   [####    ]   [    ####]
 4.  Alternate 4-part pattern     [##    ##]   [  ####  ]
 5.  Alternate odd/even LEDs      [# # # # ]   [ # # # #]
 6.  Gated solid                  [###  ###]
 7.  Gated blink                  [###  ###]   [        ]
 8.  Chase up                     [>>>>>>>>]
 9.  Chase down                   [<<<<<<<<]           
 10. Chase up/down                [>>>>>>>><<<<<<<<]
 11. Dual chase in                [>>>><<<<]
 12. Dual chase out               [<<<<>>>>]

All settings for name, timing, colors and patterns can be saved to flash, and will automatically be loaded upon boot.

Version 1.9.1 Features

Version 1.9.1 includes bug fixes and improvements:

  • Fixed serial input to accept CR, LF, or CR+LF line endings (works with any terminal)
  • Configurable local echo (Ce command) - disable for API/automated control, enable for interactive use
  • Improved command line display using carriage return (no duplicate lines while typing)
  • Build-time validation ensures firmware is compiled for RP2040 architecture
  • Code cleanup removed duplicate echo settings, fixed typos

Version 1.9 Features

Version 1.9 builds upon the solid foundation of v1.8 with additional enhancements:

  • Enhanced LED capacity: Support for up to 600 LEDs per channel and 100 groups per channel
  • Dual fading system: Separate fading factors for regular and 2-step animations
  • Improved terminology: Changed "shelf/strip/output" to "channel" for better clarity
  • Code quality improvements: Professional variable naming (camelCase conventions)
  • Enhanced documentation: Comprehensive comments and better code organization
  • Improved error messages: More specific and helpful error reporting
  • Magic number elimination: All hardcoded values replaced with named constants
  • Buffer size increases: Input buffer expanded to 512 chars for larger configurations
  • Configuration identifier updates: More robust config validation with version-specific IDs
  • Interactive line editor with history, cursor movement, insert/overwrite modes, and clean redraw handling
  • Two-step fading improvements: Percent-based fade-in/out timing via Cf:<anim>:<fade-in>:<fade-out> plus partial-fill friendly logic
  • CPU status LED states: Blue pulsing at startup, green breathing while running, red blinking on errors, all at safe brightness
  • Improved flashing/partial fills so percentage commands keep pattern behavior intact
  • Unified help and README with auto-synchronized limits derived from firmware defines
  • Expanded documentation & code style cleanups across the project

Version 1.8 Features

Version 1.8 included significant improvements:

  • Comprehensive config validation on load and runtime
  • Watchdog timer for system stability (8-second timeout with auto-reboot)
  • Local echo support for interactive/API use (Ce command)
  • Version info command (V) with build date and strip type
  • System info command (I) showing RAM/Flash usage and uptime
  • Config backup/restore via hex export/import (Se/Li commands)
  • Statistics tracking (uptime, command count, error count)
  • Improved system info (I command) showing active groups per state with percentage indicators
  • Brightness safety limits (10-255) with warnings above 200
  • Buffer overflow protection and comprehensive input validation
  • Improved error messages showing actual values
  • Function documentation and const correctness throughout
  • Fixed group LED clearing to prevent color overlap
  • RGBW support for SK6812 and WS2813B-RGBW strips

Troubleshooting

Common Issues and Solutions

LED Strips Not Working

  • Problem: No LEDs light up when sending commands
  • Solutions:
    • Check GPIO pin configuration with D command
    • Verify LED strip type (RGB vs RGBW) in firmware
    • Ensure power supply is adequate (5V/12V depending on strip type)
    • Check data line connections and polarity

Configuration Not Saving

  • Problem: Settings lost after power cycle
  • Solutions:
    • Ensure LittleFS space is reserved (8-64KB) in Arduino IDE
    • Check flash memory integrity with I command
    • Try S command to manually save configuration
    • Use Se to export backup before making changes

LED Strips Flickering or Random Colors

  • Problem: LEDs show incorrect colors or flicker
  • Solutions:
    • Check power supply capacity (under-voltage causes issues)
    • Verify data line length (keep < 3m without signal booster)
    • Add capacitor (1000µF) near strip power input
    • Check for electromagnetic interference

Serial Communication Issues

  • Problem: No response to commands
  • Solutions:
    • Verify baud rate is 115200
    • Check USB cable and port
    • Ensure line endings set to "Newline" in serial monitor
    • Try R command to reboot controller

Memory or Performance Issues

  • Problem: Slow response or crashes
  • Solutions:
    • Check system info with I command for memory usage
    • Reduce number of LEDs/groups if approaching limits
    • Ensure watchdog timer isn't triggering (8-second timeout)
    • Check for command buffer overflow with long commands

Error Messages Reference

Error Message Cause Solution
Command 'X' unknown Invalid command Use H for valid commands
Invalid state State not 0-9 Use states 0-9 only
Group ID out of range Invalid group number Use groups 1-MAX_GROUPS
GPIO pin already used Duplicate pin assignment Choose unused GPIO pin
Configuration load failed Corrupted config Use Cd to reset defaults

Getting Help

If you encounter issues not covered here:

  1. Use H command for built-in help
  2. Use I command to check system status
  3. Export configuration with Se for analysis
  4. Check GitHub issues for known problems
  5. Contact support with system info and error details

Application Examples

Example 1: Warehouse Order Picking

Setup: 4 zones, 8 groups each, 57 LEDs per group

Cs:8                    # 8 channels/zones
Ct:8                    # 8 groups per zone
Cl:57                   # 57 LEDs per group
Cw:1                    # 1 LED spacer between groups

Command Sequence:

> T1:1                  # Zone 1 - Item ready (green)
> T2:2                  # Zone 2 - In progress (orange)
> T3:3                  # Zone 3 - Priority (red)
> T4:1                  # Zone 4 - Complete (green)
> S                     # Save configuration

Example 2: Assembly Line Progress

Setup: 6 stations, progress indicators

Cs:6                    # 6 stations
Ct:4                    # 4 groups per station
Cl:30                   # 30 LEDs per group
Cp:2:10                 # Set state 2 to chase pattern

Command Sequence:

> P01:1:025             # Station 1, state 1, 25% complete
> P02:1:050             # Station 2, state 1, 50% complete
> P03:1:075             # Station 3, state 1, 75% complete
> P04:1:100             # Station 4, state 1, 100% complete

Example 3: Storage Facility Status

Setup: 12 aisles, status lighting

Cs:8                    # 8 channels (multiple aisles per channel)
Ct:12                   # 12 groups (aisles)
Cl:20                   # 20 LEDs per aisle
Cc:1:00FF00             # Green for available
Cc:2:FFA500             # Orange for partial
Cc:3:FF0000             # Red for full

Command Sequence:

> M:132131213121        # Set aisle status pattern
> I                     # System info and group status

Example 4: Multi-Stage Process Control

Setup: 5 process stages with animations

Cs:5                    # 5 stages
Ct:6                    # 6 indicators per stage
Cl:25                   # 25 LEDs per indicator
Cp:1:8                  # State 1: chase up
Cp:2:10                 # State 2: chase up/down
Cp:3:1                  # State 3: blinking
Cb:500                  # 500ms blink interval

Command Sequence:

> A:0                   # Clear all stages
> T1:1                  # Start stage 1
> T2:2                  # Start stage 2
> T3:3                  # Start stage 3
> X                     # Emergency stop/clear

Example 5: KPI Dashboard Display

Setup: Visual performance indicators

Cs:8                    # 8 KPI categories
Ct:4                    # 4 performance levels per KPI
Cl:40                   # 40 LEDs for visual impact
Cf:24                   # Smooth fading
Ca:200                 # 200ms animation speed

Color Mapping:

> Cc:1:00FF00           # Excellent - Green
> Cc:2:FFFF00           # Good - Yellow
> Cc:3:FFA500           # Warning - Orange
> Cc:4:FF0000           # Critical - Red

Real-time Updates:

> T1:1                  # KPI 1: Excellent
> T2:2                  # KPI 2: Good
> T3:3                  # KPI 3: Warning
> T4:4                  # KPI 4: Critical

Configuration Backup Examples

Export Current Setup:

> Se                    # Export configuration as hex
OUTPUT: 53494748542D434... (copy this string)

Import Saved Setup:

> Li:CONFIG:53494748542D434...  # Paste the hex string
Configuration imported successfully
> S                     # Save to flash

About

Shelf Indicators for Guided Handling Tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published