TheStar - BLF driver firmware for a GB light - What options do you want to be selectable by stars?

I use a pencil to connect stars... even easier to remove, just use the other end of the pencil, assuming you have a deluxe model with an eraser installed. Only costs $0.02 vs. $10+ for a conductive paint pen + thinner. No inhaling paint thinner, either. Can easily be done in the field, keep a pencil in your car, pocket, briefcase, even borrow a pencil most places. And you never have to sit around watching paint dry.

Thank you all for your valuable input!

The current version of the FW contains the following modes:
- LowLow (only in 4-mode config - GB light will most probably be 3-mode, but I have this 4-mode for my smaller lights)
- Low
- Med
- Turbo (step down after 2min to ~half of the max power)
—-Hidden Modes—-
- LowLow (only in 3-mode config)
- Strobe (randomly alternating between 8.5-16.5Hz)
- 1s Beacon with 10% background light (50ms blink, 950ms bg)
- 2.5s Slow beacon with 10% background light
- 1s Beacon (without any background light to save battery in case of emergency)’
- Alpine Distress Beacon (6 blinks with 10s delays + 60s delay)
- SOS
- Turbo that stays on

Additional goodies:
- Single mode turbo, with timer (+ hidden modes) (connect star #2)
- Tactical mode: Strobe, Turbo, Low – 0.5s time to switch modes, without memory (+ hidden modes) (connect stars #2 & #4)
- Change mode order, connect star #3
- Disable memory, connect star #4

..and of course it has high PWM and features low voltage protection as it has done from the beginning.

I’m pretty happy with it so far, but keep finding “nice to have” things or possible enhancements all the time.. Well.. All software developers are perfectionists..

Damn, that's a whole lot of stuff you managed to cram into a Attiny13a. Sounds great.

_the_ wrote:

The current version of the FW contains the following modes:
- LowLow (only in 4-mode config - GB light will most probably be 3-mode, but I have this 4-mode for my smaller lights)
- Low
- Med
- Turbo (step down after 2min to ~half of the max power)
—-Hidden Modes—-
- LowLow (only in 3-mode config)
- Strobe (randomly alternating between 8.5-16.5Hz)
- 1s Beacon with 10% background light (50ms blink, 950ms bg)
- 2.5s Slow beacon with 10% background light
- 1s Beacon (without any background light to save battery in case of emergency)’
- Alpine Distress Beacon (6 blinks with 10s delays + 60s delay)
- SOS
- Turbo that stays on

Additional goodies:
- Single mode turbo, with timer (+ hidden modes) (connect star #2)
- Tactical mode: Strobe, Turbo, Low – 0.5s time to switch modes, without memory (+ hidden modes) (connect stars #2 & #4)
- Change mode order, connect star #3
- Disable memory, connect star #4

..and of course it has high PWM and features low voltage protection as it has done from the beginning.

I’m pretty happy with it so far, but keep finding “nice to have” things or possible enhancements all the time.. Well.. All software developers are perfectionists..

Thank you all for your valuable input!

The current version of the FW contains the following modes:
- LowLow (only in 4-mode config - GB light will most probably be 3-mode, but I have this 4-mode for my smaller lights)
- Low
- Med
- Turbo (step down after 2min to ~half of the max power)
—-Hidden Modes—-
- LowLow (only in 3-mode config)
- Strobe (randomly alternating between 8.5-16.5Hz)
- 1s Beacon with 10% background light (50ms blink, 950ms bg)
- 2.5s Slow beacon with 10% background light
- 1s Beacon (without any background light to save battery in case of emergency)’
- Alpine Distress Beacon (6 blinks with 10s delays + 60s delay)
- SOS
- Turbo that stays on

Additional goodies:
- Single mode turbo, with timer (+ hidden modes) (connect star #2)
- Tactical mode: Strobe, Turbo, Low – 0.5s time to switch modes, without memory (+ hidden modes) (connect stars #2 & #4)
- Change mode order, connect star #3
- Disable memory, connect star #4

..and of course it has high PWM and features low voltage protection as it has done from the beginning.

I’m pretty happy with it so far, but keep finding “nice to have” things or possible enhancements all the time.. Well.. All software developers are perfectionists..

Wow! That is great. The strobe rates are supported by data from Grizzlyb out of Amsterdam and 7 or 8 years of research and field use of strobe lights to subdue individuals without escalating violence. The point light source does not induce seizures, but is disorienting to light source. So person trying to hit you can’t tell if you are 6 inches away or 3 feet away and when they put their hand up to shield their eyes they provide a wrist to grasp and place in a submission hold. Very nice in my line of work as most hospitals frown on the staff striking patients and we staff don’t like being struck.

Well. I'm well aware of Grizzlyb's research, but actually both of the alternating frequencies (especially the lower) are below Grizzlyb's recommendation (18-20Hz). I tried multiple different 18-20Hz strobes, but found them be significantly less disorienting. Maybe my eyes are damaged by too many bad budget lights, but 18-20Hz looks more like a bad PWM than a real strobe.. ;)

Grizzlyb's main finding is that 18-20Hz strobes are "still extremely disorienting", but have "less unwanted side effects" (for LEO: meaning that the opponent can't move his hand without LEO noticing it, unlike with 10Hz strobes).

As the frequencies are alternating (pseudo) randomly, the unwanted side effects are less than with normal constant 10Hz strobe.

So, the frequencies in TheStar driver are chosen based on lots of research and my own opinions. I may want to come back to this and continue tests with higher frequencies.. Maybe with lower duty cycles.. Let's see.

Can I assume that this is for use with a clickie switch? If so how can I get some of these or can we download the firmware?

Yes, for standard clickie switch.

The firmware is still on development. v0.7 is being tested by couple of volunteers (Thank you for helping me with this! You know who you are.. ;))

I can send the .hex file to you by email if you happen to be interested in helping in the testing. :)

Writing you a PM now.

With regard to the strobe that most don’t use, for those that use it to grapple with violent people, Grizzlyb wrote in their research and findings that strobe rates of 8-12 Hz were effective, the assailant was also able to move without giving the officers enough time to react so they chose a higher rate of about 18-20 Hz if memory serves me correctly. Strobe use by Grizzlyb

You remember right. I have been reading and re-reading that thread during the last two weeks. Very informative stuff, and totally worth reading, but not the whole truth.. They didn't test different duty cycles at all, and at least in my opinion that affects the characteristics of the strobe a lot.

Thanks. That wasn't easy, at all.. I spent days and nights basically thinking where to squeeze away 2 or 4 bytes, trying that in practice, noticing that the compiler had already optimized that part for me, moving to next spot, etc. Usually after adding a new feature or enhancing something I was left at 1028 or 1040 bytes (limit is 1024 bytes) and spent literally hours refactoring the code to fit in to the memory limits. (Luckily I know something about C.. ;))

Oh, yes, I know what you are talking about…

My firmware-flashing hardware finally showed up yesterday (package had been lost), so I can actually try modding the bits on an attiny now. I still have to figure out how to get it all working in Linux (seems most of the info online is for Windows), and I’m still short on time due to other projects, but I expect I’ll be very interested in trying the new firmware soon.

Any hints for a good setup for testing firmware? I should have an empty Convoy S2 host showing up today and was planning to use the tail end as an 18650 tube for my RRT01, which leaves the head available… could probably just assemble the head normally except for having long wires to an exposed driver, then simply hold a couple extra wires up to a battery to simulate clicky button presses.

That's exactly how i have been doing it. Or actually I have been using S2+. :)

I have thought of building a better driver test station, but not yet, as the S2+ with longer leads works well enough..

I have been flashing the driver so many times that my Pomona SOIC clip starts to wear out. Have to fiddle it and hold it tight to get a working connection.

Any hints for a better SOIC 8 clip / pointers to where to buy?

Maybe this helps? http://www.ladyada.net/learn/avr/setup-unix.html

By duty cycles you mean time on and time off? If so then you are a genius… ’cus I wondered the same thing. If 10 or 12 Hz is great but the off time allows for the officer to be surprised then why not increase the on time and find the sweet spot.

Yes. As explained by this pic (borrowed from Wikipedia article):

The duty cycle is defined as the ratio between the pulse duration () and the period () of a rectangular waveform.


[quote=scottyhazzard] If so then you are a genius... 'cus I wondered the same thing. If 10 or 12 Hz is great but the off time allows for the officer to be surprised then why not increase the on time and find the sweet spot. [/quote]

That's what I thought, adjusting the duty cycle up during lower frequencies of altering strobe would further reduce the unwanted effects.

But so far I haven't been able to find the sweet spot.. More experimenting is definitely needed.

I’m pleased to hear you are working on this, this is great.

Thanks, I got everything set up and working. It gives me a warning about setting the sck period and then can’t verify the firmware after flashing, but it otherwise seems to work.

If you have a hex file and/or source code file to try, I’d be happy to test it out. Additionally, I’d like to add it to my firmware repository if possible.

Er, I’m not 100% sure that my build toolchain is creating the same hex files as other people, so I’d prefer to get a hex file in addition to the source code, instead of just the source. I think my gcc might be creating files slightly larger than what other people are getting.

Good to hear you got it working! Please PM me your email address and I'll send you the .hex file of the latest test version (v08).

Regarding to the size, please check that you have the -Os flag set (Optimize for size).