E-switch UI Development / FSM

1034 posts / 0 new
Last post
Tom E
Tom E's picture
Offline
Last seen: 18 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14978
Location: LI NY

Ok, you remember my changes better than I do! smile Facepalm

Oh crap! I  pulled earlier this morn, been sync'ing my local up and came across this FSM thing I keep forgetting about... Facepalm again.

Will pull again. Actually sounds like TK has more in the works based on feedback she's been getting here: https://budgetlightforum.com/comment/1795408#comment-1795408

Actually the only local changes I have to worry about was that FSM one and cfg and hwdef files. I got a lot of custom defs, then a couple settings I always use, etc. Between her and you, all my local mods starting with Anduril V1 are in the new Anduril 2 baseline.

 Right now I got one set of Anduril 2 sources all in the same folder, and 2 solution/projects: for the 85 and 1634. My 1616 build is separate, so I need to bring it in to the common Anduril 2 folder, then I can build anything right in Microchip Studio for Win all from one common source code base! With (Microchip Studio (MS), only way I could set up different MCU's successfully was to create the project from scratch. It's really not that bad though, goes quick, specially since all the source code is in one folder. You do, however, have to mark all the .c files that are include'd with a "Build Acttion" of "None" so it doesn't try compiling them. It's a little pain but I understand why TK did it.

The way it's done (TK and you) with switches to support 3 different sub-families of AVR's is pretty cool.

Tom E
Tom E's picture
Offline
Last seen: 18 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14978
Location: LI NY

Ok, finished the updates and now have it setup, building, for 3 projects for the 85, 1634 and 1616 all from one source code set. Easy now... smile

I did a 1634 build using:

    #undef USE_THERMAL_REGULATION

It built ok, and with a smaller size of about 900 bytes, so I think this will kill thermal reg effectively. Will try it, hopefully with nothing burning... smile

 

Tom E
Tom E's picture
Offline
Last seen: 18 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14978
Location: LI NY
Scallywag
Scallywag's picture
Offline
Last seen: 18 hours 2 min ago
Joined: 01/11/2018 - 22:23
Posts: 2200
Location: Ohio, United States

Tom E wrote:

Attiny85 going EOL:


https://www.microchip.com/product-change-notifications/#/16686/GBNG-14CATI014


 


I have 56 now it will last me a bit. But now I’ve got to actually get myself some pogo-flashers.
d_t_a
Offline
Last seen: 5 hours 55 min ago
Joined: 08/04/2017 - 23:58
Posts: 2621
Location: Manila, Philippines
Tom E wrote:

Attiny85 going EOL:


https://www.microchip.com/product-change-notifications/#/16686/GBNG-14CATI014


 

Following your link leads to a PDF with suggested replacement parts.

Any idea what are the implications of the “suggested replacement”? Would they also be flash-able with previous existing flashing adapter and SOIC8 clip?

SammysHP
SammysHP's picture
Offline
Last seen: 57 min 40 sec ago
Joined: 06/25/2019 - 14:35
Posts: 1036
Location: Germany

So they just discontinue the plated version? Then there’s no change for us.

Tom E
Tom E's picture
Offline
Last seen: 18 min 36 sec ago
Joined: 08/19/2012 - 08:23
Posts: 14978
Location: LI NY

Yea, you guys are right! Ooops! I only read this:

EOL Description:
The selected Atmel ATtiny13A, ATtiny25, ATtiny45 and ATtiny85 device families available in 8L SOIJ NiPdAu LF package will be moving to End of Life (EOL) status effective today. These products will no longer be offered after July 31, 2022. Please review the attached parts affected list for details about replacement parts if applicable.

 

But it says "8L SOIJ NiPdAu LF package", so very limited EOL and not the variants we use anyway.

 

I shouldn't have panicked so quickly... frown

 

MascaratumB
MascaratumB's picture
Offline
Last seen: 17 min 49 sec ago
Joined: 10/29/2016 - 12:12
Posts: 6930
Location: Portugal

I am not sure if this is a good thread to place this question, but here it goes.

Would it be possible to have Anduril lights have both momentary ON (1 defined level) + momentary Strobe (ex: tactical strobe) when configuring the flashlight in the 5C (tactical mode) option ?

Like:
1 H for momentary ON
2 H for momentary Strobe

I’ve thought about this today as I normally carry the Olight Warrior Mini that allows both momentary Turbo & momentary Strobe through the tail switch. Other flashlights, like some Wuben lights with dual switches, allow momentary turbo and strobe, but the feedback takes longer, it is not immediate and therefore is not good for a prement situation.

When I go out at night for a walk I always take the OWM with me because with both modes I can signal my place on the road if needed, instantly.

I would prefer to take a smaller light like the FWAA but I can only use or momentary ON or momentary Strobe at a time.

Having that option (1H & 2H) in this or other Anduril lights would be quite nice, if possible. But I am not sure if it is Oops
I’ll be looking for the experts replies.

Thanks in advance for reading Thumbs Up

SammysHP
SammysHP's picture
Offline
Last seen: 57 min 40 sec ago
Joined: 06/25/2019 - 14:35
Posts: 1036
Location: Germany

The whole reason for the tactical mode is to have just a single action for the switch so that you can use it for signaling, Morse code etc.

MascaratumB
MascaratumB's picture
Offline
Last seen: 17 min 49 sec ago
Joined: 10/29/2016 - 12:12
Posts: 6930
Location: Portugal

SammysHP wrote:
The whole reason for the tactical mode is to have just a single action for the switch so that you can use it for signaling, Morse code etc.

Hum, I get that, and I understand the reason why it is configured that way. Although I believe the common user probably doesn’t know Morse code (except for SOS, eventually).

However, my question is more on the: is it possible – in terms of programming – to have both momentary modes as I explained above?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 13 hours 49 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3
MascaratumB wrote:
Would it be possible to … 5C (tactical mode) … 1 H for momentary ON 2 H for momentary Strobe

Yeah, it would just require modifying the code for momentary mode.

It currently doesn’t care how many times the button is pressed, but you could change it to do different things on EV_click1_press and EV_click2_press. Or, inside the part which handles presses, make it check whether the counter portion of the event is odd or even, and do different things for each.

MascaratumB
MascaratumB's picture
Offline
Last seen: 17 min 49 sec ago
Joined: 10/29/2016 - 12:12
Posts: 6930
Location: Portugal
ToyKeeper wrote:
MascaratumB wrote:
Would it be possible to … 5C (tactical mode) … 1 H for momentary ON 2 H for momentary Strobe

Yeah, it would just require modifying the code for momentary mode.

It currently doesn’t care how many times the button is pressed, but you could change it to do different things on EV_click1_press and EV_click2_press. Or, inside the part which handles presses, make it check whether the counter portion of the event is odd or even, and do different things for each.

Even if I don’t know how to “program” I hope I can do this resorting to the pins and some learning on how to perform those changes!
If/When I get to do that, I will probably need some help, but that will take a while Big Smile
Thank you very much for the reply and the explanation ToyKeeper Thumbs Up Thumbs Up Beer

EasyB
Offline
Last seen: 3 weeks 13 hours ago
Joined: 03/09/2016 - 15:24
Posts: 2191
Location: Ohio

EasyB wrote:
I’m experimenting with using lower PWM frequency (2kHz) in Anduril and am having a strange problem. I started the discussion in the attiny 25/45/85 development thread

I am using FET+1 drivers used in the V1 D4 and D1S which use attiny85. I want to use the lower PWM frequency because I am using a CN5710 regulator chip which wants the lower frequency, but the same problem happens on a stock unmodded D1S driver.

I added a 8x divider to the timer by changing TCCR0B from 0×01 to 0×02 in the fsm-main file. Upon making this change the ramping and other operation is apparently normal while the light is on, but I’m observing the following problems:

When turning on, the LED blinks at a very low brightness as you press the button then goes to the memorized level when you release the button. Whereas during proper operation the LED stays off until you release the button.

Sometimes when attempting to turn the light off it will instead go to the max 7135 channel level. But some part of the MCU thinks it is in fact off, because the next button click will always go to the previously memorized mode as if it was just turning on. It really does seem random whether the light turns off or goes to the max 7135 channel level. But the probability of it malfunctioning goes up with the PWM duty cycle. If I’m low in the 7135 channel duty cycle it usually turns off as it should, but if I’m high up in the 7135 channel duty cycle it usually malfunctions and goes to 7135 channel max level.

RampingIOS v3 does have the same problem.

RampingIOS v2 (in TomE’s folder) does not have the problem.

Does anyone know what the problem is and can it be fixed?

Toykeeper, do you have any idea what could cause the above behavior?

Pages