STAR Firmware by JonnyC - Source Code and Explanation

1335 posts / 0 new
Last post
JonnyC
JonnyC's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 01/14/2011 - 19:12
Posts: 1148
Location: Green Bay, WI - USA

Son of a beach!!  It was an actual bug.  On December 13th I added an extra mode but did not add the corresponding "FAST" to MODE_PWM.  Not sure exactly how it manifested itself in this behavior because I don't know how the code would react to an array index out of bounds.  Whatever the case, it broke it.

Please pull the latest copy or just add another "FAST" to the MODE_PWM list.  Sorry to anyone that this affected!

Hoop
Hoop's picture
Offline
Last seen: 18 hours 42 min ago
Joined: 12/20/2012 - 05:33
Posts: 1036
Location: Spokane, WA

I just ordered some 1uF 0805 caps for off-time memory but I also have a cap from a stripped nanjg of mine and I wonder if I can use it for this? What are the specs of the standard caps on a nanjg?

wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Hoop wrote:
I just ordered some 1uF 0805 caps for off-time memory but I also have a cap from a stripped nanjg of mine and I wonder if I can use it for this? What are the specs of the standard caps on a nanjg?
It’s been said that it’s a 10uF cap. I’m confident it’s >4uF. 10uF may work fine, but you’ll probably need to adjust your offtime value. EDIT: for some additional info, look in the first 5 pages or so of this thread for HarleyQuin’s post(s) on the subject. HarleyQuin tried much smaller values than 1uF and was able to get those to work.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

AlexTG
Offline
Last seen: 6 months 3 weeks ago
Joined: 10/29/2012 - 08:40
Posts: 202
Location: Kiev, Ukraine

wight wrote:
It’s been said that it’s a 10uF cap. I’m confident it’s >4uF.

Caps on my seven 105Cs (both 8×7135 and 6×7135 versions) are all in the 3.5-4.2uF range
wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

AlexTG wrote:
wight wrote:
It’s been said that it’s a 10uF cap. I’m confident it’s >4uF.

Caps on my seven 105Cs (both 8×7135 and 6×7135 versions) are all in the 3.5-4.2uF range
Heh, maybe I should have been confident about a different number.

I tested somewhat recently to see when the ATtiny13A would start working properly. Now that you call me out, I think I tried 1uF, 2uF, 3uF, and then got tired and went directly to 5uF. Ahh, here we are: http://budgetlightforum.com/node/35037#comment-665674 So much for confidence! Wink

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

AlexTG
Offline
Last seen: 6 months 3 weeks ago
Joined: 10/29/2012 - 08:40
Posts: 202
Location: Kiev, Ukraine

wight wrote:
I tested somewhat recently to see when the ATtiny13A would start working properly.

AK-47A 3×7135 with the same ATtiny13A has 1.6uF capacitor Smile Guess it depends on the load for ATtiny to drive.
On the other hand, 101-AK-A1 4×7135 has 7.5uF cap…
ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3
JonnyC wrote:

Son of a beach!!  It was an actual bug.  On December 13th I added an extra mode but did not add the corresponding “FAST” to MODE_PWM.  Not sure exactly how it manifested itself in this behavior because I don’t know how the code would react to an array index out of bounds.  Whatever the case, it broke it.

Please pull the latest copy or just add another “FAST” to the MODE_PWM list.  Sorry to anyone that this affected!

BTW, it’s a good idea to use PHASE on the highest and lowest mode. This prevents the moon-like fast PWM=0 mode from sticking around while the switch is pressed, and helps the light to shut off entirely.

On the lowest mode, PHASE can usually get lower than FAST, so that’s a benefit. And on the highest mode, PHASE and FAST are no different so you may as well use the one which won’t trigger the moon-while-pressed bug.

Out of all the firmwares I’ve made, the Ferrero_Rocher.c one is the most similar to base STAR. It might be worth a look in case there are any improvements you’re interested in. The main things are UI (press-and-hold ramps down and shuts off) and a battery check mode (from off, short-press then immediately long-press).

Mike C
Mike C's picture
Offline
Last seen: 10 hours 43 min ago
Joined: 01/22/2014 - 08:03
Posts: 2577
Location: Sweden

Has anybody looked with an oscilloscope if PWM 255 is 100% on?
Edit: I found the answer by changing my search words. PWM 255 appears not to be 100% on: http://budgetlightforum.com/node/27509

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3
Mike C wrote:
Has anybody looked with an oscilloscope if PWM 255 is 100% on? Edit: I found the answer by changing my search words. PWM 255 appears not to be 100% on: http://budgetlightforum.com/node/27509

On the graphs there, I see a small dip in the PWM each cycle on the highest mode. The qlite runs in fast PWM mode though, which I’ve had a suspicion might do that. Just like it always turns on a little bit even when the value is zero, I had heard that it might not stay fully on in turbo. It’s hardwired to turn on at the beginning of each cycle and turn off at the end.

However, I think phase-correct PWM is better about that. It never turns on at zero, and I think at the other end it also never turns off when the value is 255. We could probably verify by measuring lumens on fast PWM=255 vs phase-correct PWM=255, but I’m not sure how big the difference would be.

JonnyC
JonnyC's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 01/14/2011 - 19:12
Posts: 1148
Location: Green Bay, WI - USA

Yes, Qlite is never 100% on because they must have used inverted PWM, meaning inverted output values...

0 = On

255 = Off

From the datasheet...

Quote:
The extreme values for the OCR0A Register represents special cases when generating a PWM waveform output in the fast PWM mode. If the OCR0A is set equal to BOTTOM, the output will be a narrow spike for each MAX+1 timer clock cycle. Setting the OCR0A equal to MAX will result in a constantly high or low output (depending on the polarity of the output set by the COM0A[1:0] bits.)

With fast PWM, a 0 PWM_LVL (OCR0A) means it is never fully turned off (there's 1 blip of being on out of 255 clock cycles).  In Qlite's inverted PWM case, 0 meaning max output, it means it's never fully on, but it can be fully off.  We are using non-inverted PWM, so it can be fully on, but it can't be fully off.  This is taken care of with putting the driver to sleep so we don't allow the light to run with PWM_LVL = 0 (except as you noted ToyKeeper, it happens when you hold the button to move to the off mode, as long as you hold the button it will sit in this state).  I believe this should only happen when the mode order is H-L, correct?

I took your advice and updated the 255 mode to be PHASE.  I can't test it because I don't have a FET driver, but you already said it works.  I could have also been done by changing the code so that it forces PHASE whenever PWM_LVL is 0, but this is an easier fix.

JonnyC
JonnyC's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 01/14/2011 - 19:12
Posts: 1148
Location: Green Bay, WI - USA

Mike C wrote:
Has anybody looked with an oscilloscope if PWM 255 is 100% on? Edit: I found the answer by changing my search words. PWM 255 appears not to be 100% on: http://budgetlightforum.com/node/27509[/quote]

That's for the Qlite, not this firmware.  I should bust out my nifty little pocket oscilloscope if I can remember how to use it.  As I noted above it should be 100% on.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

JonnyC wrote:
This is taken care of with putting the driver to sleep so we don’t allow the light to run with PWM_LVL = 0 (except as you noted ToyKeeper, it happens when you hold the button to move to the off mode, as long as you hold the button it will sit in this state).  I believe this should only happen when the mode order is H-L, correct?

I took your advice and updated the 255 mode to be PHASE.  I can’t test it because I don’t have a FET driver, but you already said it works.

It happens at either end of the scale (and with either mode order), but it’s really hard to see after turbo unless the button stays pressed for quite a while. Regardless, using PHASE on both ends eliminates the issue.

I normally set PHASE as the default anyway though, and override it only for specific solid modes. This lets me turn the emitter off entirely during strobes and such, without having to mess with special zero-handling all the time.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

BTW, I added a very simple firmware to help with calibrating voltage readings. It’s ToyKeeper/battcheck/*.

All it does is read out the raw attiny voltage value. When connected to power it’ll briefly blink once, then it’ll take several voltage readings (without load), then blink out the value one digit at a time. So, for 183 it would blink once, pause, blink eight times, pause, then blink three times. Wait a few seconds, and the cycle repeats with a new reading. It’ll keep doing this until power is disconnected.

It’s useful only for calibration. Measure a battery in a DMM, put it into the light to get an attiny reading, let it run a few times to get an average, then write it down for later reference.

So far I’ve only tried it on two drivers, and they get nearly identical values. One was a Ferrero Rocher (similar to BLF17DD) and the other was an AK-47 (one-sided nanjg variant).

wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

ToyKeeper wrote:
BTW, I added a very simple firmware to help with calibrating voltage readings. It’s ToyKeeper/battcheck/*.

All it does is read out the raw attiny voltage value. When connected to power it’ll briefly blink once, then it’ll take several voltage readings (without load), then blink out the value one digit at a time. So, for 183 it would blink once, pause, blink eight times, pause, then blink three times. Wait a few seconds, and the cycle repeats with a new reading. It’ll keep doing this until power is disconnected.

It’s useful only for calibration. Measure a battery in a DMM, put it into the light to get an attiny reading, let it run a few times to get an average, then write it down for later reference.

So far I’ve only tried it on two drivers, and they get nearly identical values. One was a Ferrero Rocher (similar to BLF17DD) and the other was an AK-47 (one-sided nanjg variant).

Not a bad thing to do. Smile

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Mike C
Mike C's picture
Offline
Last seen: 10 hours 43 min ago
Joined: 01/22/2014 - 08:03
Posts: 2577
Location: Sweden

I did something similar but took values under load and wrote them to memory every 5 seconds. A long press reads out the latest stored value in a similar blinking fashion. Useful for checking voltage state under load.

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Happy new year to you all! Party

This is amazing. I’m busy for some weeks – heavy workload and some truly desired holiday – and everything’s different.

I feel like a toddler who is trying to keep up with a bunch of 5y-olds… he doesn’t stand a chance, but he truly has fun. Big Smile

On Nov 14th I downloaded what was supposed to be Star Offtime 1.3 (dont remember the source) but that one hadn’t the DualPWM parts.
Now I downloaded StarOfftime from JonnyC’s GitHub page (titled version 1.2 but changelog to 1.3) and #wham# major change.

I very much like the idea to use at least two different outputs, but there are some code changes coming with it, that I don’t understand. I hadn’t fathomed all of the previous code – only the parts I needed to adapt – but now I’m lost at some crucial parts. I already see that what I want to do (using one 7135 at 255-PWM as medium mode) will come into conflict with the DualPWMStart threshold, as I need full PWM in the ALT_PWM_LVL signal path. It seems the Voltage Monitor, who uses the ALT_PWM_LVL, might get a hickup too…

But before I start asking questions that are already answered:
Are the software changes to dualPWM discussed anywhere? I just scanned the last 400 posts of this thread – as well as some of wight’s driver threads – but the FAST_PWM_START / DUAL_PWM_START / ALT_PWM_LVL changes to the code either came completely out of the blue, or I missed it, or they are discussed elsewhere.

I’d be very happy if you could give me a heads up – or if I may ask one or the other question about the code in this thread, when I’m stuck…
Thanks a lot.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HarleyQuin wrote:
Happy new year to you all! Party

This is amazing. I’m busy for some weeks – heavy workload and some truly desired holiday – and everything’s different.

I feel like a toddler who is trying to keep up with a bunch of 5y-olds… he doesn’t stand a chance, but he truly has fun. Big Smile

On Nov 14th I downloaded what was supposed to be Star Offtime 1.3 (dont remember the source) but that one hadn’t the DualPWM parts.
Now I downloaded StarOfftime from JonnyC’s GitHub page (titled version 1.2 but changelog to 1.3) and #wham# major change.

I very much like the idea to use at least two different outputs, but there are some code changes coming with it, that I don’t understand. I hadn’t fathomed all of the previous code – only the parts I needed to adapt – but now I’m lost at some crucial parts. I already see that what I want to do (using one 7135 at 255-PWM as medium mode) will come into conflict with the DualPWMStart threshold, as I need full PWM in the ALT_PWM_LVL signal path. It seems the Voltage Monitor, who uses the ALT_PWM_LVL, might get a hickup too…

But before I start asking questions that are already answered:
Are the software changes to dualPWM discussed anywhere? I just scanned the last 400 posts of this thread – as well as some of wight’s driver threads – but the FAST_PWM_START / DUAL_PWM_START / ALT_PWM_LVL changes to the code either came completely out of the blue, or I missed it, or they are discussed elsewhere.

I’d be very happy if you could give me a heads up – or if I may ask one or the other question about the code in this thread, when I’m stuck…
Thanks a lot.

There was a version numbering reset when Dual-PWM was forked from the main code for development. Later when Dual-PWM became fit to replace the mainline firmware the version numbering was kept.

IIRC there was never an in-depth public discussion of the new firmware and it’s features. Of course it’s actually at least two firmwares: momentary and offtime. The two major features added to offtime are: A. the ability to change from FastPWM to Phase Correct below a certain threshold. B. the ability to use two PWM outputs simultaneously and revert to only one of them below a certain threshold.

As you may now imagine, those features are aimed squarely at moon mode performance. It would be simple to make small but heavy-handed changes to the current offtime firmware to allow for turning off the main PWM and putting the alt PWM at 255/255 for medium. Unfortunately I haven’t envisioned a simple way to implement these changes so that they interface nicely with STAR_off_time’s other features (like low voltage stepdown).

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Ah, I see. All went on behind closed doors Smile
But I like the result for sure, so thanks nevertheless.

If I only look at the Offtime branch: all started with the nice, configurable and documented STAR firmware which was the first that included low voltage shutdown, then came the off time cap, turbo ramp down, dual threshold for the reverse clicky, now dual PWM modes (fast/PhC) and ALT PWM output channels (PB1/PB0)… this makes a great deal of options for a Nanjg and all the custom driver boards.

I know the STAR firmwares are great just because they are highly configurable with little knowledge. This is what makes them so good and everyone else is writing own code anyway…

I just try to get a grip on the changes. H)

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588
wight wrote:
A. the ability to change from FastPWM to Phase Correct below a certain threshold.

Does this have a benefit only for the FET drivers, or for 7135 drivers as well? Like getting even lower moon or getting rid of the dreaded losing-moon-when-the-driver-is-hot problem?
Thx again

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HarleyQuin wrote:
Ah, I see. All went on behind closed doors Smile
But I like the result for sure, so thanks nevertheless.
That’s thanks to RMM and JonnyC, they cooked this up. RMM posts about the motivation over here: (#1447) http://budgetlightforum.com/node/29562?page=48#comment-688116

HarleyQuin wrote:
wight wrote:
A. the ability to change from FastPWM to Phase Correct below a certain threshold.
Does this have a benefit only for the FET drivers, or for 7135 drivers as well? Like getting even lower moon or getting rid of the dreaded losing-moon-when-the-driver-is-hot problem? Thx again
I haven’t played around with it. I don’t think that it will help at all with that problem. That’s really part of what the dual PWM output is intended to help with I think.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

wight wrote:
It would be simple to make small but heavy-handed changes to the current offtime firmware to allow for turning off the main PWM and putting the alt PWM at 255/255 for medium. Unfortunately I haven’t envisioned a simple way to implement these changes so that they interface nicely with STAR_off_time’s other features (like low voltage stepdown).

I should have at least one driver soon with dual PWM, and am planning to add the ability to control PWM for each channel for each mode. This should enable things like 1×7135 at full power for a more efficient medium mode, and stable moon/low/med on 7135 while still keeping high/turbo on a more-powerful FET.

For drivers with 8×7135 (one split off for moon), it could still use all 8 for the highest mode, but should be able to use just 1 for the lowest few modes.

JonnyC
JonnyC's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 01/14/2011 - 19:12
Posts: 1148
Location: Green Bay, WI - USA

HarleyQuin wrote:
All went on behind closed doors :)

Richard flew only a select few of us out to his compound to have a discussion, complete with cigars and strippers.  Actually Richard came up with this idea, asked if I could do it, so I just added it.

I haven't done any testing to see if you can get lower lows on 7135's with phase correct and if they are consistent across variations of 7135's, but I do know you can use lower values to get the same output compared to fast PWM.  To be honest I don't do any tweaking of moonlight modes though, as it's not a feature I ever add to my lights.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

JonnyC wrote:
I haven’t done any testing to see if you can get lower lows on 7135’s with phase correct

Yes, you can. At least, on the very small few I’ve tried it on.

In general, it’s not necessarily lower, but just different. Like, on one 7135-based driver, I found the following available modes:

  • fast PWM=5, phase PWM=3: zero output
  • fast PWM=6: 0.07 lm
  • phase PWM=4: 0.5 lm
  • fast PWM=7: 1.1 lm

So, I went with phase PWM=4 for moon mode. The 0.1lm mode was just a little too dim, and the 1.1lm mode was too bright.

This is something which needs calibration for each individual light though, or at least each driver+LED combination. The lowest and most ideal level for moon varies with the hardware.

wight
Offline
Last seen: 1 year 6 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

ToyKeeper wrote:
JonnyC wrote:
I haven’t done any testing to see if you can get lower lows on 7135’s with phase correct

Yes, you can. At least, on the very small few I’ve tried it on.

In general, it’s not necessarily lower, but just different. Like, on one 7135-based driver, I found the following available modes:

  • fast PWM=5, phase PWM=3: zero output
  • fast PWM=6: 0.07 lm
  • phase PWM=4: 0.5 lm
  • fast PWM=7: 1.1 lm

So, I went with phase PWM=4 for moon mode. The 0.1lm mode was just a little too dim, and the 1.1lm mode was too bright.

This is something which needs calibration for each individual light though, or at least each driver+LED combination. The lowest and most ideal level for moon varies with the hardware.

ToyKeeper, can you elaborate on how many 7135s the driver in your example had?

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588
ToyKeeper wrote:
I should have at least one driver soon with dual PWM, and am planning to add the ability to control PWM for each channel for each mode. This should enable things like 1×7135 at full power for a more efficient medium mode, and stable moon/low/med on 7135 while still keeping high/turbo on a more-powerful FET. For drivers with 8×7135 …

My favourite Med mode gradually went down from 750mA until I’m at 350 now… It’s PWM 6/11/40/255 which (at 18kHz/fastPWM) gives me measured 1/36/342/2830 mA. A very nice mode spacing. This screams for
1×7135 pwm255 + 7×7135 pwm255
1×7135 pwm255
1×7135 pwm~low
1×7135 pwm~very-low

Imagine how looking at the new STAR firmware with ALT_PWM made me smile. I thought about how this might work (using mode_idx for voltage stepdown) but I’m sure you’ll be quicker and your results are more reliable.

By the way, I still love the bi-directional mode change with short and medium press. I’ll never ever use anything else anymore. It’s fantastic to change direction without having to go through all modes, especially the high ones.

JonnyC wrote:
Richard flew only a select few of us out to his compound to have a discussion, complete with cigars and strippers.

I should have guessed…

JonnyC wrote:
To be honest I don’t do any tweaking of moonlight modes though, as it’s not a feature I ever add to my lights.

Moon has truly grown on me. It’s nice for a very dark environment and I use it all the time to look after the kids when they’re asleep or woke up at night.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 9 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588
wight wrote:
ToyKeeper, can you elaborate on how many 7135s the driver in your example had?

I’m very sure her results are for 8×7135.
-This pretty much is the same that I measured (and saw) in my little writeup about PWM values at different frequencies

Especially the values where the lights start to light up.
But I’m not sure whether this is a matter of fastPWM vs PhaseCorrect, I believe this is a matter of the resulting frequency, as the comparison with 150 Hz suggests.

EDIT: Skip my answer. Any 7135 driver would light up at these PWM values, regardless how many of them are on it. Arghhhh. Just the lumens are different.

EDIT 2:
I just flashed a stock nanjg 105c with most recent STAR Offtime.
- Moon can’t (and does not) light up as it defaults to PWM-3 at the moment.
- Moon at PWM-4 with dual PWM (phase-correct-PWM (~9kHz) for Moon) does light up, but turns off when the driver gets hot (took less than a minute). So the issue of losing a low Moon is persistent. ALT_PWM with a single (or maybe two) 7135 is hopefully the way to go.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

wight wrote:
ToyKeeper, can you elaborate on how many 7135s the driver in your example had?

Oh, that one was the 4×7135 driver in the CNQG brass 18650 light. It uses 350mA chips.

I have one with 5×380mA chips, and its best moon mode is fast PWM=6, for about 0.25 lm.

So, I just check a few settings on each light and pick whichever one I like the best.

Hoop
Hoop's picture
Offline
Last seen: 18 hours 42 min ago
Joined: 12/20/2012 - 05:33
Posts: 1036
Location: Spokane, WA

I finally got around to trying out STAR offtime. I like it. Feels pretty intuitive.

What kind of behavior could be achieved with offtime “no memory”? I think Ideally the driver would always be next mode when the light is on, but from off it would always start on LOW.

RMM
RMM's picture
Offline
Last seen: 1 year 6 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

That's correct.  Or it can always start on high, if the mode order is reversed .

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 52 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

Offtime-no-memory is my favorite configuration. Smile

Basically, I set it up so that a short press goes to the next mode, a medium press goes to the previous mode, and a long press goes back to the first mode. It thus always starts in the first mode, and can navigate in two directions. If the user goes backward from the first mode, it enters some semi-hidden “negative” modes like turbo and battery check.

Pages