That’s because you used fast PWM, which still turns on for about half a clock tick each cycle even at level zero. If you switch that to phase-correct, it shouldn’t turn on the main LED while the second LED is on.
This only happens on the FET channel because the 7135 channel isn’t powerful enough to make the effect visible.
Tweaked the firmware so the second group is low red, high red, low white, high white, beacon and set all the red modes to phase PWM and now only the red lights up! Thanks!
That’s because you used fast PWM, which still turns on for about half a clock tick each cycle even at level zero. If you switch that to phase-correct, it shouldn’t turn on the main LED while the second LED is on.
O
This only happens on the FET channel because the 7135 channel isn’t powerful enough to make the effect visible.
Tweaked the firmware so the second group is low red, high red, low white, high white, beacon and set all the red modes to phase PWM and now only the red lights up! Thanks!
Looks like you and I have been working on similar projects. I should pay closer attention to this thread… TK probably thinks i don’t know how to read…
Your power supply may not be stable on full output. Just to make sure increase the value on line 648 or disable battery monitoring.
Edit: In your code battery monitoring counts 8 ticks which is around 4 seconds.
I Just tried running it straight from a battery and it works perfectly. I’m still a little confused, as my measurements show the power supply holding steady. Either way, the flashlight is working and I’m happy to finally say this project is “done.”
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pilotdog68 wrote:
I Just tried running it straight from a battery and it works perfectly. I’m still a little confused, as my measurements show the power supply holding steady.
I’ve also run into issues sometimes when testing things on a bench PSU instead of using a battery. It’s not usually so bad with lights, but some other hardware can behave pretty strangely with a dedicated power supply.
The PSU I’m using is limited to 5 amps, so high-powered lights hit a hard wall when they try to pull more than that. It’s fine at lower levels though. The really weird stuff only happens when I plug in devices with built-in chargers and other more complex circuits.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
ImA4Wheelr wrote:
Thank you ToyKeeper for hosting these shared FW’s.
I haven’t been keeping up with this area. Is there a place that has the UI’s and operating perimeters of the various FW’s and variations?
The closest thing is the repository index file, which is mostly intended for searching, not so much for reading. Beyond that, once you’ve found something compatible with your switch type and driver type, it’s mostly a matter of reading the text files included with the matching projects to figure out which ones sound best.
+1 ToyKeeper. Thank you for setting up the repository, and for the assistance you have provide in this thread.
—
In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not. http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.
ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.
—
Three tomatoes are walking down the street- a poppa tomato, a momma tomato, and a little baby tomato. Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooches him… and says, Catch up.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
n10sivern wrote:
ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.
The only one I’m aware of is STAR_1mode.
From what I recall, it starts at max output, steps down gradually to a bit over half when it hits the turbo timeout, then stays at that level until voltage gets low. It then drops output by half each time the voltage gets too low, until it’s barely on, and then it finally shuts off.
The code is a little weird since it’s based on STAR and I changed as little as I could, so a lot of the code is unnecessary for only one mode. I should probably trim out the extra parts some time…
ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.
The only one I’m aware of is STAR_1mode.
From what I recall, it starts at max output, steps down gradually to a bit over half when it hits the turbo timeout, then stays at that level until voltage gets low. It then drops output by half each time the voltage gets too low, until it’s barely on, and then it finally shuts off.
The code is a little weird since it’s based on STAR and I changed as little as I could, so a lot of the code is unnecessary for only one mode. I should probably trim out the extra parts some time…
Would it be easy to take out the excess and leave it at 100% until the LVP?
—
Three tomatoes are walking down the street- a poppa tomato, a momma tomato, and a little baby tomato. Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooches him… and says, Catch up.
Question! Does the BLF-A6 firmware have mode memory? Mine all seem to default to the first mode.
it is user-configurable. It can be set to be toggled by soldering a star, or by a soft-toggle (the same way you change mode groups). By default, it starts out no-memory.
I’m in need of help for a new-ish UI (unless somebody already has one that would work.) It is for an LEO, he wants a dual-switch light (traditional click-switch + e-switch). I just don’t know where to start. Is STAR dual-switch the best jumping point?
ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.
If you’re only using single pwm output you can use a firmware I wrote a while back. It’s very easy to use and only got pre set values.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pyro1son wrote:
Question! Does the BLF-A6 firmware have mode memory? Mine all seem to default to the first mode.
Yes, and by default you can toggle mode memory by entering config mode then turning it off between the second two blinks. Here’s a visual summary of the default interface:
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pilotdog68 wrote:
I’m in need of help for a new-ish UI (unless somebody already has one that would work.) It is for an LEO, he wants a dual-switch light (traditional click-switch + e-switch). I just don’t know where to start. Is STAR dual-switch the best jumping point?
Main power button is only on/off
e-switch changes modes
single click to cycle L>M>H
0.75sec hold to access fast strobe
single click from strobe to access slow beacon
0.75sec hold to return to main loop
Mode memory for all modes
LVP protection
STAR dual-switch is probably the best starting point. I haven’t attempted to make a dual-switch firmware, and I’m not aware of many which already exist. However, you’ll probably need to change a fair amount of the code to get the features you described.
If you don’t mind it resetting to the first mode each time, any e-switch firmware can be used on a dual-switch light. However, I doubt that’s desirable for what you described.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pilotdog68 wrote:
It shouldn’t be too difficult to add “memory” to an e-switch firmware, should it?
I think the memory parts should be relatively easy; mostly just copy and paste some code from other projects. It’s the UI changes which pose more of a challenge. E-switches need considerably more UI code than clicky switches.
If I skip the Beacon part it should be easy. Just start with STAR Momentary, add the memory bit, and change long press to mean strobe instead of reverse mode
Thank you ToyKeeper for hosting these shared FW’s.
I haven’t been keeping up with this area. Is there a place that has the UI’s and operating perimeters of the various FW’s and variations?
The closest thing is the repository index file, which is mostly intended for searching, not so much for reading. Beyond that, once you’ve found something compatible with your switch type and driver type, it’s mostly a matter of reading the text files included with the matching projects to figure out which ones sound best.
Is there any way to program the generic micros that look the same as the Atiny13A? I have seen these on some drivers before, but not ever tried to program one.
—
In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not. http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
A generic SOIC8 chip could be anything. Attiny13 is only one of many chips which look like that, and each one works differently. The details probably vary for each type of chip.
// comment out to use extended config mode instead of a solderable star
// (controls whether mode memory is on the star or if it’s a setting in config mode)
#define CONFIG_STARS
Which should give me mode memory? Correct? But I still don’t seem to have it. I’m using a zener modded board could this be affecting it?
Also when I start again it gives me my lowest mode. Even in the second group it gives me my lowest of the first. It starts with the lowest of second group then after a second goes to lowest of first group then I can cycle through the modes on the second group like normal.
Location: (469219) 2016 HO3 // I get way more privmsgs than I can respond to, so please ask in a public thread if possible, for a faster answer.
pyro1son wrote:
I’ve updated my firmware and selected;
Quote:
// comment out to use extended config mode instead of a solderable star
// (controls whether mode memory is on the star or if it’s a setting in config mode)
#define CONFIG_STARS
Which should give me mode memory? Correct?
No, that only controls how that option gets configured. With CONFIG_STARS defined, you can enable mode memory by grounding pin 3. With it not defined, you can enable mode memory by pressing the switch a bunch of times and then turning it off between the second set of two blinks. Neither method turns it on by default.
If you want mode memory hardcoded as on, you’ll need to change some other part of the sources, or use tk-otc.c (which drops the config mode entirely in favor of hard-coding options, but provides more space to add features).
Yesterday I flashed my first driver (stacked 105C, 12×7135) with the S7 firmware, worked fine, very nice firmware. I used the ready to use .hex-file.
Today I wanted to try star_noinit. Therefore I had to create a hex file. I have to say I’m a total newbie to all of this flashing/coding stuff.
I have Atmel Studio 6.2 installed. Finally I’ve been able to get a hex file, but it’s 2685 bytes.
The way I did it was: file->new->project-> GCC C Executable->ATtiny13A, then deleted that automatically created stuff, copied and pasted in the code, ->project->(filename)properties->toolchain->Optimization(under AVR/GNU C Compiler)->optimize for size (-Os), then build->build solution
I just installed AS6.2 without making any changes to whatever settings.
Tweaked the firmware so the second group is low red, high red, low white, high white, beacon and set all the red modes to phase PWM and now only the red lights up! Thanks!
Pastebin &nbs
Looks like you and I have been working on similar projects. I should pay closer attention to this thread… TK probably thinks i don’t know how to read…
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
I Just tried running it straight from a battery and it works perfectly. I’m still a little confused, as my measurements show the power supply holding steady. Either way, the flashlight is working and I’m happy to finally say this project is “done.”
Thanks for the help.
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
I’ve also run into issues sometimes when testing things on a bench PSU instead of using a battery. It’s not usually so bad with lights, but some other hardware can behave pretty strangely with a dedicated power supply.
The PSU I’m using is limited to 5 amps, so high-powered lights hit a hard wall when they try to pull more than that. It’s fine at lower levels though. The really weird stuff only happens when I plug in devices with built-in chargers and other more complex circuits.
This is my Convoy/XinTD X3 firmware. It’s nothing that special or difficult, but since TK helped me with it I figured I’d share it here.
blf-A6 was the starting point, but as it sits all the hidden modes and mode reversing are commented out.
It still has the two mode groups.
The first group is for li-on use:
The second group is for use with the 3*AA carrier:
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
Thanks! The no-LVP-on-AA trick is a good idea. I added it to the collection.
Thank you ToyKeeper for hosting these shared FW's.
I haven't been keeping up with this area. Is there a place that has the UI's and operating perimeters of the various FW's and variations?
The closest thing is the repository index file, which is mostly intended for searching, not so much for reading. Beyond that, once you’ve found something compatible with your switch type and driver type, it’s mostly a matter of reading the text files included with the matching projects to figure out which ones sound best.
+1 ToyKeeper. Thank you for setting up the repository, and for the assistance you have provide in this thread.
In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.
+1!!
ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.
Three tomatoes are walking down the street- a poppa tomato, a momma tomato, and a little baby tomato. Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooches him… and says, Catch up.
The only one I’m aware of is STAR_1mode.
From what I recall, it starts at max output, steps down gradually to a bit over half when it hits the turbo timeout, then stays at that level until voltage gets low. It then drops output by half each time the voltage gets too low, until it’s barely on, and then it finally shuts off.
The code is a little weird since it’s based on STAR and I changed as little as I could, so a lot of the code is unnecessary for only one mode. I should probably trim out the extra parts some time…
Question! Does the BLF-A6 firmware have mode memory? Mine all seem to default to the first mode.
Pastebin &nbs
Would it be easy to take out the excess and leave it at 100% until the LVP?
Three tomatoes are walking down the street- a poppa tomato, a momma tomato, and a little baby tomato. Baby tomato starts lagging behind. Poppa tomato gets angry, goes over to the baby tomato, and smooches him… and says, Catch up.
Yes, very easy. Just uncomment the definition of MODE_HIGH and comment out the definition of MODE_TURBO, like this:
//#define MODE_HIGH 255 // Can comment out to remove mode
#define MODE_TURBO 255 // Can comment out to remove mode
=>
=the=
it is user-configurable. It can be set to be toggled by soldering a star, or by a soft-toggle (the same way you change mode groups). By default, it starts out no-memory.
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
I’m in need of help for a new-ish UI (unless somebody already has one that would work.) It is for an LEO, he wants a dual-switch light (traditional click-switch + e-switch). I just don’t know where to start. Is STAR dual-switch the best jumping point?
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
If you’re only using single pwm output you can use a firmware I wrote a while back. It’s very easy to use and only got pre set values.
https://github.com/xerxes2/flashlight-firmware/tree/master/tacdrv
If you don’t touch anything outside of Start/End user tweaking I don’t think you can mess up this one.
My firmwares
Ahhhh I’m also not using the latest version. I’ll update my firmware.
Pastebin &nbs
Yes, and by default you can toggle mode memory by entering config mode then turning it off between the second two blinks. Here’s a visual summary of the default interface:
STAR dual-switch is probably the best starting point. I haven’t attempted to make a dual-switch firmware, and I’m not aware of many which already exist. However, you’ll probably need to change a fair amount of the code to get the features you described.
If you don’t mind it resetting to the first mode each time, any e-switch firmware can be used on a dual-switch light. However, I doubt that’s desirable for what you described.
At first, I thought LEO meant “low earth orbit”.
It shouldn’t be too difficult to add “memory” to an e-switch firmware, should it?
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
I think the memory parts should be relatively easy; mostly just copy and paste some code from other projects. It’s the UI changes which pose more of a challenge. E-switches need considerably more UI code than clicky switches.
If I skip the Beacon part it should be easy. Just start with STAR Momentary, add the memory bit, and change long press to mean strobe instead of reverse mode
My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03
Major Projects: Illuminated Tailcap, TripleDown/TripleStack Driver
Thank you for that info.
Hey all,
Is there any way to program the generic micros that look the same as the Atiny13A? I have seen these on some drivers before, but not ever tried to program one.
In Him (Jesus Christ) was life; and the life was the light of men. And the light shineth in darkness; and the darkness comprehended it not.
http://asflashlights.com/ Everyday Carry Flashlights, plus Upgrades for Maglite.
A generic SOIC8 chip could be anything. Attiny13 is only one of many chips which look like that, and each one works differently. The details probably vary for each type of chip.
I’ve updated my firmware and selected;
Which should give me mode memory? Correct? But I still don’t seem to have it. I’m using a zener modded board could this be affecting it?
Also when I start again it gives me my lowest mode. Even in the second group it gives me my lowest of the first. It starts with the lowest of second group then after a second goes to lowest of first group then I can cycle through the modes on the second group like normal.
Pastebin &nbs
No, that only controls how that option gets configured. With CONFIG_STARS defined, you can enable mode memory by grounding pin 3. With it not defined, you can enable mode memory by pressing the switch a bunch of times and then turning it off between the second set of two blinks. Neither method turns it on by default.
If you want mode memory hardcoded as on, you’ll need to change some other part of the sources, or use tk-otc.c (which drops the config mode entirely in favor of hard-coding options, but provides more space to add features).
Yesterday I flashed my first driver (stacked 105C, 12×7135) with the S7 firmware, worked fine, very nice firmware. I used the ready to use .hex-file.
Today I wanted to try star_noinit. Therefore I had to create a hex file. I have to say I’m a total newbie to all of this flashing/coding stuff.
I have Atmel Studio 6.2 installed. Finally I’ve been able to get a hex file, but it’s 2685 bytes.
The way I did it was: file->new->project-> GCC C Executable->ATtiny13A, then deleted that automatically created stuff, copied and pasted in the code, ->project->(filename)properties->toolchain->Optimization(under AVR/GNU C Compiler)->optimize for size (-Os), then build->build solution
I just installed AS6.2 without making any changes to whatever settings.
Help would be appreciated. Thanks.
Pages