Wednesday, June 18, 2014

MELD firmware update

Here's a video demonstrating version 2.9 of my MELD flashlight software. A lot of improvements and features were added since the last video I put up. Below is a complete description of the UI and features.

·         All modes:
o    Turn on and off by short click
o    Mode memory in all cases (restore last mode after turning off and on)
o    Ramping by holding switch while on
o    Ramping reverses direction when initiated if it has been less than 3 seconds since the last ramp
o    Smart momentary from off (short click latches on, long press is momentary)
o    Shortcut to primary level from on by double click
§  If UV is enabled, a repeated double click will shortcut to UV. From UV, a double click will go back to primary
§  In UV mode, press and hold will make the UV strobe while held. May help to make fluorescing objects stand out
o    Shortcut to max by click-press
§  If level is currently max, shortcut to min instead
§  If primary level is set to max, shortcut to min instead
§  If held down for an extended time after click press, only do momentary maximum (restore previous brightness (or strobe/color mode) once switch is released)
§  Available from off as well (double click from off to latch on in max, click press from off to go to max in momentary mode)
o    If inactivity timer is enabled, jump to a low white level after 15 minutes of inactivity
§  Any press while in the timeout state restores the previous state
§  Works from any mode (including colors and strobes) except the two red safety flashers, the three color beacons, and any white strobes slower than 4Hz (since these modes are likely to be used long-term without user interaction)
o    State of light is stored in EEPROM and restored upon power up, enabling use in lights that have both a momentary switch and a power switch
·         White mode:
o    Ramping adjusts brightness on logarithmic profile
o    If dim to red is enabled, minimum level is replaced by dim red
o    Ramping pauses on min and max before reversing
·         Strobe mode:
o    Accessed by triple click
o    Ramping adjusts strobe speed continuously, ranging from 0.25-60Hz
o    Triple click while in strobe is a shortcut to stunner mode
·         Color mode:
o    Accessed by click-click-press
o    Continuous color mix:
§  Ramping gradually fades between colors so that any color on the spectrum can be chosen
§  Pauses on solid red, green, and blue to help select them
o    Low red: low brightness solid red output. Only available if dim to red is disabled
o    Stunner: randomized strobe that uses all colors
o    Auto fade: continuously fades through all possible color mixes
o    Flasher: triple-blink safety flasher using red
o    Flasher 2: higher-visibility safety flasher pattern using red
o    Red flash, green flash, blue flash: simple 0.5Hz beacons in three colors
o    Police: alternating blue and white to mimic police lights
o    Fire: simulates flickering firelight by calculating randomized output levels for a mix of red, green, and white
o    All low: turns on all four colors at minimum brightness so the LED can be observed directly
o    Lava lamp: a smooth-fading randomized output mode that provides interesting background lighting
o    Lightning: simulates lightning strikes using a mix of blue and white, with randomized time between strikes and randomized duration and brightness of strikes
·         Flourish mode:
o    A special color mode not included in the normal set
o    Activated by entering the color command (click-click-press) while already in a color mode
o    Performs a fun-looking sweep through colors that lasts about 2 seconds and returns to standby
o    Light is stuck in this mode once activated, exited by double click or click-press (shortcuts to white modes)
·         Configuration menu:
o    Accessed by quadruple-click
o    Set up options for light behavior. Click to cycle to next option, hold switch until green LED flashes to activate item
o    If all items are cycled through, the menu exits and returns to normal without taking any action
o    Item 1: beacon
§  Indicated by single short red blink
§  Enables or disables the locator beacon (flashes red every 4 seconds while in standby to help find the light in the dark)
o    Item 2: tactical
§  Indicated by single long blink
§  When activated, puts light into a momentary-only mode using whatever output (including strobes and color) was active before entering the config menu
§  Can only be disabled by power cycling the light
o    Item 3: lockout
§  Indicated by quick fade from bright to dim
§  When activated, the next time the light is turned off, it will be locked out. The light can then only be turned on by triple-clicking the switch.
§  Used to avoid accidental activation when the light is not in use but may have the switch bumped inadvertently
o    Item 4: auto dim
§  Indicated by white med > white low if currently disabled
§  Indicated by white low > white med if currently enabled (the light is showing what will happen if the menu item is activated—getting dimmer if you are about to turn on the feature, getting brighter if you are about to turn it off)
§  If enabled, the light will drop to a low white level after 15 minutes of inactivity
o    Item 5: set primary
§  Indicated by quick double blink on white (looks like the double click associated with the primary level)
§  When activated, the primary level is changed to the brightness level that was active before entering the config menu
§  Primary level is stored in EEPROM permanently until changed in config menu again
§  Primary can only be set to a white brightness, not color or strobe modes
o    Item 6: loaner mode
§  Indicated by a high-med-high-med-high pattern
§  When activated, the light is locked in its current mode and brightness (including colors and strobes), but smart momentary and latching on still function
§  Simplifies the UI to a single mode, useful for when the light needs to be lent to another user who doesn’t need other modes and doesn’t know how to use them
§  Disabled by power cycling
o    Item 7: dim to red
§  Indicated by a quick fading pattern from bright white down to low red
§  Enables or disables the dim to red feature
§  If dim to red is enabled, the low red color mode will be removed from the list
o    Item 8: powerup
§  Indicated by a quick fading pattern from dim to bright white
§  Enables or disables the feature to restore last mode upon power up
§  Should be enabled in lights with both a momentary switch and a power switch, but may be disabled in lights with momentary only if inadvertent power interruptions are expected
o    Item 9: set momentary max
§  Indicated by short blink then long blink on white (looks like the click-press associated with maximum)
§  When activated, any use of momentary (holding switch from off) will output maximum brightness instead of the last-used brightness or mode. Previous brightness or mode is still remembered
o    Item 10: burst mode
§  Indicated by high > medium-high > medium if currently disabled
§  Indicated by medium > medium-high > high if currently enabled (the light is showing what will happen if the menu item is activated—getting dimmer if you are about to turn on the feature, getting brighter if you are about to turn it off)
§  If activated, any time the light is turned on in white at a power level above 66% current, the output will gradually reduce output until it reaches 66% over the course of 10 seconds. This helps save power and is usually not noticeable to the user.
§  Does not affect use in momentary mode, only when latched on
o    Item 11: enable UV
§  Indicated by blue med > blue low if currently enabled
§  Indicated by blue low > blue med if currently disabled (the light is showing what will happen if the menu item is activated—getting dimmer if you are about to turn off the feature, getting brighter if you are about to turn it on)
§  Simply enables the UV mode. Included in the menu so that MELD can be used easily in lights without UV hardware by disabling the feature
o    Item 12: enable colors
§  Indicated by red > green > blue pattern
§  Enables or disables all color modes
§  If color modes are disabled, locator beacon and battery check mode will use only the white output
o    Item 13: high CRI
§  Indicated by turning on white, red, green, and blue together
§  An experimental operating mode that mixes in a small amount of red, green, and blue into the normal white operating mode. May improve color rendering
§  Only works well in lights with excellent color mixing
·         Battery check:
o    Accessed by click-click-click-press
o    Stays active and continuously updates measurement as long as switch is held
o    Measures battery voltage and reports it in blinks – blue blink for values and a long green blink for the decimal place
o    Examples:
§  Battery is 3.2V
§  Blue flashes three times
§  Green long flashes once
§  Blue flashes two times
§  2 second wait before repeating
§  Battery is 4.0V
§  Blue flashes four times
§  Green long flashes once

§  2 second wait before repeating


  1. The beam not good for color. The transmittance of LED outside metric for cone observance.

  2. Hi Everett,
    Can you please email me: calm_one(AT)
    I want to follow up on your UAV project, regarding the optical sensor. I need to track displacement by non-contact means in an industrial application. I had the "mouse" idea, but need to be further from the surface (say 50mm). You have given me hope that this might be able to work further off the surface than a typical mouse.