Flashlight Firmware Repository

2377 posts / 0 new
Last post
oweban
oweban's picture
Offline
Last seen: 1 year 8 months ago
Joined: 02/12/2019 - 06:34
Posts: 1263
Location: Sydney AU

I’ve made a guide on how to set up macOS for flashing (setting up the environment, getting the latest revision of Anduril, flashing), but am lacking options for putting the .pdf up in a secure way. I could host it as a Google doc, but that allows showing my full name which I’m obviously somewhat hesitant to do so.

Anyone have any suggestions?

Lexel
Lexel's picture
Offline
Last seen: 2 years 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany
kelsey wrote:
I made a separate thread relating to my ongoing issues, but thought I’d ask here. I’ve been trying to figure out the OTC memory on a FET+7135 driver. I flashed the offtime-cap25.hex to an attiny25 but a short press (~.5 sec) always gives me a value of 255. I guess a value of 255 until about 4 seconds or so, then it starts dropping off to lower values. Obviously this shouldn’t be happening but I’m using the correct components, I believe-1 uF cap for the OTC. I tried various other caps of lower ratings which made little difference. What’s going on here?

I got excactly the same issues here,
Driver acts like next mode memory until I wait like 20 seconds
seems newer MCUs do discharge the capacitor far slower than older

I simply soldered 1M Ohm across the OTC and adjusted the values a bit to get it work

skinny_tie
skinny_tie's picture
Offline
Last seen: 1 day 17 hours ago
Joined: 09/23/2017 - 03:14
Posts: 541
Location: Australia

oweban wrote:
I’ve made a guide on how to set up macOS for flashing (setting up the environment, getting the latest revision of Anduril, flashing), but am lacking options for putting the .pdf up in a secure way. I could host it as a Google doc, but that allows showing my full name which I’m obviously somewhat hesitant to do so.

Anyone have any suggestions?

By secure, do you mean restricted access or just anonymous?

I’d love to read your guide as I gave up trying to get the USBasp working on macOS myself and just used an Ubuntu VM.

oweban
oweban's picture
Offline
Last seen: 1 year 8 months ago
Joined: 02/12/2019 - 06:34
Posts: 1263
Location: Sydney AU

skinny_tie wrote:
By secure, do you mean restricted access or just anonymous?

I’d love to read your guide as I gave up trying to get the USBasp working on macOS myself and just used an Ubuntu VM.


More anonymous, and a place that it won’t be deleted after x days of no views Smile

I’ll flick it across to you anyway in PM, but still after a long-term home for it. Or I could just get hosting Tired

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 10 hours 36 min ago
Joined: 01/12/2013 - 14:40
Posts: 10896
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.
dstahlke wrote:
A branch with a much improved strobe mode (D4v2 only)… 16-bit PWM strobe modes … only attiny1634

That’s really cool. I’ve long lamented the imprecise nature of the party strobe’s pulse length. It’s easily visible that the pulses aren’t the same length. I had considered controlling the pins directly as digital outputs instead of using PWM, but it appears that slower hardware PWM is simpler and more accurate.

I may have to see if I can merge this in, for the devices which are capable of supporting it. Smile

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 10 hours 36 min ago
Joined: 01/12/2013 - 14:40
Posts: 10896
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.
Quadrupel wrote:
Anduril have no indicator led LVP ? Aux leds maybe off, but indicator led keeps shining until battery kaputt

The indicator LED code was originally made for the BLF Q8, which has low enough power usage that it doesn’t really matter if it’s turned off or not. It’s not much higher than the battery’s self-discharge rate, and when the battery voltage is low, the button light fades out before long anyway.

However, on newer devices which use higher-powered aux LEDs, LVP is more important so I added it. I just never got around to adding it to the indicator LED code. All of that really needs to be refactored and cleaned up, since it’s currently a mess with two or three similar but different sets of code for different types of extra LEDs.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 10 hours 36 min ago
Joined: 01/12/2013 - 14:40
Posts: 10896
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.
0-8-15 User wrote:
I insert short blips with a duration of the current temperature value and capture them with my luxmeter

It would be really handy to have a way to get data directly out of the light like that. Smile

Instead, I’ve had to do things the slow way, blinking out numbers one digit at a time and writing them down.

Doing this turned out to be pretty educational though, since I discovered there was quite a bit more noise in the signal than I expected. And I found that the noise was highly dependent on what the light was doing at the time. Measurements were pretty clean while the light was at rest, but during use I got a lot of noise even with really heavy oversampling.

Rewriting things to optimize for noise reduction resolved a lot of issues I’ve seen over the past couple years.

0-8-15 User wrote:
Code is ready for review … Link to the pull request …

Thanks! I know we already chatted via private messages, but I just wanted to say in public that this has been very helpful.

I’ve been working on merging this since late December, and finally published a new revision yesterday after finishing a bunch of testing. It ended up being a much bigger project than I expected, but it all seems to be working now and I hope others will get similar results.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 10 hours 36 min ago
Joined: 01/12/2013 - 14:40
Posts: 10896
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.
hdw wrote:
use git.

Maybe. I’ve been meaning to move it to git for a while, because it’s much more widely used. I just really don’t like some things about Git. In particular, I want to find a way to get its branching to do what I need first. Git’s branch features are one of its weakest points, and although it recently got something vaguely similar to how Bzr works, it’s a shallow implementation which leaves a lot to be desired.

I generally have at least a dozen different branches in progress, many of which are long-term and/or private, and each has its own working tree with meaningful state that shouldn’t be part of the repository. That’s trivial to do in Bzr because it’s the default and recommended workflow… but it goes against much of Git’s design so things quickly get awkward. It’s also weirdly tricky to interact with other instances (like GitHub) in terms of single branches instead of entire repositories. It generally grabs or sends all branches and checks out master, which is frequently the wrong behavior.

It looks like if I want similar branch functionality, I’ll probably end up with many many local copies of the entire repository… and then merges end up being much more of a pain.

In general, I’ve found that the default behaviors in Git are almost always the opposite of what I want, so I end up needing a lot of overrides and workarounds. This has greatly slowed down the migration process. I’d love to go back to 2005 and slap Linus around a bit to convince him to change the design.

hdw wrote:
AVR studio

Probably not. I can’t run it, so I can’t maintain it.

Wrench wrote:
Has the latest firmware for a D4V2 made the Aux LED cycle rate way slower?

I also have had a very hard time accessing advanced functions. Battery check and changing between ramped and stepped modes are good examples. Seems like I’m not clicking fast enough?

Yes, a recent update slowed down the rainbow mode because people thought it attracted too much attention.

About 3-click actions not responding, there seems to be an issue of some sort which is very difficult to reproduce on purpose. Usually it can be resolved by cleaning the electrical contacts and making sure the parts are put together tight enough.

However, there are some brand new builds which might help too. I’ve tried to make it much more tolerant of electrical noise, and it may react better now when there is a weak ground contact or something.

Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk
ToyKeeper wrote:
hdw wrote:
AVR studio

Probably not. I can’t run it, so I can’t maintain it.


There are many requests for that and I think it would be really worthwhile to support Atmel Studio. Though personally I don’t understand why because my personal experience with it was very bad.

What kind of maintenance would it need?
What if there were members interested in maintaining it?

Tom E
Tom E's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 08/19/2012 - 08:23
Posts: 15065
Location: LI NY

I'm using AtmelStudio for Anduril and been posting my full projects. It was easy-peezy smile

 

Quadrupel
Quadrupel's picture
Offline
Last seen: 3 days 16 hours ago
Joined: 12/03/2017 - 10:40
Posts: 1144
Location: Lithuania

I implemented to DarkHorse indicator led, lockout and candle mode support from Anduril for my headlamp drivers, but i dint find out how to enable LVP for indicator led Sad

Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

It is not implemented. This is a fairly simple change near
// TODO: turn off aux LED when power is really low

Quadrupel
Quadrupel's picture
Offline
Last seen: 3 days 16 hours ago
Joined: 12/03/2017 - 10:40
Posts: 1144
Location: Lithuania

Agro wrote:
It is not implemented. This is a fairly simple change near
// TODO: turn off aux LED when power is really low

And how TODO? There is no code and im not a coder Big Smile
Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

I see that we’ve had a discussion about it before. Smile
Sorry, I can’t give you a better advice than this. I won’t add this code to the repo before I test it.And I don’t have an adjustable PSU yet….

treellama
Offline
Last seen: 6 hours 14 min ago
Joined: 12/08/2018 - 21:20
Posts: 271
Location: Pittsburgh

It’s not that simple. TK is right, a refactor is in order. Fixing it at the spot of the “TODO” won’t get all the cases.

Quadrupel
Quadrupel's picture
Offline
Last seen: 3 days 16 hours ago
Joined: 12/03/2017 - 10:40
Posts: 1144
Location: Lithuania

Agro wrote:
I see that we’ve had a discussion about it before. Smile
Sorry, I can’t give you a better advice than this. I won’t add this code to the repo before I test it.And I don’t have an adjustable PSU yet….

I tried hard – no results, I guest only TK can fix it Big Smile
HiTiT
Offline
Last seen: 1 month 2 days ago
Joined: 06/30/2012 - 18:12
Posts: 117
Location: Israel

Hi all, Is there any problem with the code of dthoang(dth_Momentary_v1_1.c)   ?

I flashed it on my attiny13a, and I see nothing but the blink-on-power.

The driver won't respond to any of the e-switch controls.

 

I tried flashing STAR-MOMENTARY for example, and it works with no problems.

 

What might be the problem?

 

Thanks

lidas
Offline
Last seen: 1 month 6 days ago
Joined: 02/18/2020 - 08:44
Posts: 10
Location: italy

Hi everyone I need your help, I have tried the Star-Momemtary code, wonderful code, but I have to ask if you can change some points, I use it with a piezo button and I find it too sensitive, how do I increase debounce for avoid accidental ignition, or you have other things to propose, I also accept your ideas
Thank you so much

HiTiT
Offline
Last seen: 1 month 2 days ago
Joined: 06/30/2012 - 18:12
Posts: 117
Location: Israel

You have 2 lines that configure the debounce timing:

Quote:

#define DB_PRES_DUR 0b00000001 // time before we consider the switch pressed (after first realizing it was pressed)
#define DB_REL_DUR 0b00001111 // time before we consider the switch released // each bit of 1 from the right equals 16ms, so 0×0f = 64ms

maybe try changing DB_REL_DUR to 200ms?

you can use Decimal to Binary converter to find the binary number for your ms.

sorry for misleading you (this definition is a bit mask, no a number), each bit is 16ms, so the max time is 128ms
try:

Quote:

#define DB_REL_DUR 0b11111111

BTW, are you building a diving flashlight with that piezo switch Smile ?

lidas
Offline
Last seen: 1 month 6 days ago
Joined: 02/18/2020 - 08:44
Posts: 10
Location: italy
HiTiT wrote:
BTW, are you building a diving flashlight with that piezo switch Smile ?

Thank you very much
why do you think I can’t use a piezo button? I’m using them made of stainless steel that are very good, and also underwater, that you would have other ideas

HiTiT
Offline
Last seen: 1 month 2 days ago
Joined: 06/30/2012 - 18:12
Posts: 117
Location: Israel

I didn’t say that you can’t use it Smile
I just asked whether you’re using it to build a diving flashlight.
I used a piezo switch for a diving flashlight years ago, it was great.

lidas
Offline
Last seen: 1 month 6 days ago
Joined: 02/18/2020 - 08:44
Posts: 10
Location: italy
HiTiT]You have 2 lines that configure the debounce timing: [quote wrote:
#define DB_PRES_DUR 0b00000001 // time before we consider the switch pressed (after first realizing it was pressed) #define DB_REL_DUR 0b00001111 // time before we consider the switch released // each bit of 1 from the right equals 16ms, so 0×0f = 64ms

maybe try changing DB_REL_DUR to 200ms?

you can use Decimal to Binary converter to find the binary number for your ms.

sorry for misleading you (this definition is a bit mask, no a number), each bit is 16ms, so the max time is 128ms
try:

Quote:

#define DB_REL_DUR 0b11111111

Hi I tried to do as you said but nothing is still too sensitive, sometimes pressing the button changes twice, you have some ideas

Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

I notice that there are quite a few people who know nothing about coding yet are able to flash firmware. The recent introduction of flashing pads greatly expands this number.
Yet the latest Andruil is not available to them in a binary form. They have to compile the sources which is problematic to quite a few a needless nuisance to a number of others.

I think it would be worthwhile to have some continuous building process….

Tom E
Tom E's picture
Offline
Last seen: 3 months 2 weeks ago
Joined: 08/19/2012 - 08:23
Posts: 15065
Location: LI NY

Uhhh, someone recently posted a link to a hex file of the latest Anduril build, least I thought, forgot where...

trakcon
trakcon's picture
Offline
Last seen: 3 days 1 hour ago
Joined: 01/23/2019 - 15:50
Posts: 492

These are the latest builds from the development (not always fully tested) branch. I haven’t had any issues with the newest build on my D4V2 Ti.

lidas
Offline
Last seen: 1 month 6 days ago
Joined: 02/18/2020 - 08:44
Posts: 10
Location: italy

Sorry I ask a question, do not kill me, it’s only recently that I discovered this forum thanks to all, I found this part where you have gathered all the firmware, but there is the possibility of finding some driver projects that you can create, thanks

Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

trakcon wrote:
These are the latest builds from the development (not always fully tested) branch. I haven’t had any issues with the newest build on my D4V2 Ti.

Thanks, that’s exactly what I was looking for. Thumbs Up
Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

lidas wrote:
Sorry I ask a question, do not kill me, it’s only recently that I discovered this forum thanks to all, I found this part where you have gathered all the firmware, but there is the possibility of finding some driver projects that you can create, thanks

You mean ones where you buy PCB and a bag of parts, then solder everything together?
There are a few…but scattered over many topics.
It would be interesting to make a reference at some point…but as of now it doesn’t exist, so please tell us what kind of driver are you looking for and we may be able to help.
lidas
Offline
Last seen: 1 month 6 days ago
Joined: 02/18/2020 - 08:44
Posts: 10
Location: italy
Agro wrote:
You mean ones where you buy PCB and a bag of parts, then solder everything together? There are a few…but scattered over many topics. It would be interesting to make a reference at some point…but as of now it doesn’t exist, so please tell us what kind of driver are you looking for and we may be able to help.

I am looking for the design of a driver for an xhp70.2 led, I have to be able to power it indifferently with 2s 3s 4s battery packs, I need the design because the pcb must have a specific shape for the flashlight that I am building, I am a hobbyist with the passion to build things, I’m not electronic, but I can assemble a pcb, I’m building an underwater torch, if you can help me thank you

Agro
Agro's picture
Offline
Last seen: 1 month 1 week ago
Joined: 05/14/2017 - 11:16
Posts: 6991
Location: Ślōnsk

2s is something I may be able to help with. Zener modded Texas Avenger should do the trick. Please note that recently Texas Ace started to use resistors instead of 7135 because with powerful 2s lights they are much more reliable.

For more than 2s you need some other driver, most likely buck. I’m not sure if there’s anything open source available…

Pages