E-switch UI Development / FSM

1034 posts / 0 new
Last post
Phlogiston
Phlogiston's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 10/27/2016 - 16:57
Posts: 988
Location: Scotland

I don’t presume to speak for ToyKeeper either, but I will mention that when I was working as a software engineer, $500 would have bought you about two days of my time.

For a bughunt on unfamiliar hardware, where either the hardware or the software could be at fault – or even both together – that’s barely enough time to set up a suitable test & development environment, never mind actually tracking the bug down and fixing it.

Bespoke software engineering is expensive.

It scares me to even think about what ToyKeeper’s freely given work for BLF would have cost on a commercial basis. I’m deeply grateful that she did it, though, because my EDCs have been running her firmware ever since the BLF A6.

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

Phlogiston wrote:
I don’t presume to speak for ToyKeeper either, but I will mention that when I was working as a software engineer, $500 would have bought you about two days of my time.

For a bughunt on unfamiliar hardware, where either the hardware or the software could be at fault – or even both together – that’s barely enough time to set up a suitable test & development environment, never mind actually tracking the bug down and fixing it.

Bespoke software engineering is expensive.

It scares me to even think about what ToyKeeper’s freely given work for BLF would have cost on a commercial basis. I’m deeply grateful that she did it, though, because my EDCs have been running her firmware ever since the BLF A6.

The tests have been done and traced down to a simple think the Temp management does
It starts to increase the output even when a lot over the Temperature set point
Solution is to make it stay at minimum MIN_THERM_STEPDOWN value if its noticeable higher than the set point

Sure Toykeeper can do this a lot faster than anyone else that is not familiar how the current temp code works
I have searched the Temp code with the setup strings and its clustered into different sections depending which setup lines are activated,
but I do not understand the programming stuff like

Quote:

if (actual_level > MIN_THERM_STEPDOWN) {
int16_t stepdown = actual_level – arg;
if (stepdown < MIN_THERM_STEPDOWN) stepdown = MIN_THERM_STEPDOWN;
else if (stepdown > MAX_LEVEL) stepdown = MAX_LEVEL;
#ifdef USE_SET_LEVEL_GRADUALLY
set_level_gradually(stepdown);
#else
set_level(stepdown);
#endif

OR
Quote:

#if defined(USE_SET_LEVEL_GRADUALLY) || defined(USE_REVERSING)
else if (event EV_tick) { #ifdef USE_REVERSING // un-reverse after 1 second if (arg TICKS_PER_SECOND) ramp_direction = 1;
#endif
#ifdef USE_SET_LEVEL_GRADUALLY
// make thermal adjustment speed scale with magnitude
if ((arg & 1) && (actual_level < THERM_FASTER_LEVEL)) {
return MISCHIEF_MANAGED; // adjust slower when not a high mode
}
#ifdef THERM_HARD_TURBO_DROP
else if ((! (actual_level < THERM_FASTER_LEVEL))
&& (actual_level > gradual_target)) {
gradual_tick();
}
else {
#endif
// [int(62*4 / (x**0.8)) for x in (1,2,4,8,16,32,64,128)]
//uint8_t intervals[] = {248, 142, 81, 46, 26, 15, 8, 5};
// [int(62*4 / (x**0.9)) for x in (1,2,4,8,16,32,64,128)]
//uint8_t intervals[] = {248, 132, 71, 38, 20, 10, 5, 3};
// [int(62*4 / (x**0.95)) for x in (1,2,4,8,16,32,64,128)]
uint8_t intervals[] = {248, 128, 66, 34, 17, 9, 4, 2};
uint8_t diff;
static uint8_t ticks_since_adjust = 0;
ticks_since_adjust ++;
if (gradual_target > actual_level) diff = gradual_target – actual_level;
else {
diff = actual_level – gradual_target;
}
uint8_t magnitude = 0;
#ifndef THERM_HARD_TURBO_DROP
// if we’re on a really high mode, drop faster
if (actual_level >= THERM_FASTER_LEVEL) { magnitude ++; }
#endif
while (diff) {
magnitude ++;
diff >>= 1;
}
uint8_t ticks_per_adjust = intervals[magnitude];
if (ticks_since_adjust > ticks_per_adjust)
{
gradual_tick();
ticks_since_adjust = 0;
}
//if (!(arg % ticks_per_adjust)) gradual_tick();
#ifdef THERM_HARD_TURBO_DROP
}
#endif
#endif
return MISCHIEF_MANAGED;

I know this code is responsible for temp management, but got no clue how it works or how it needs to be changed or code added to prevent the heat up above safe value

so we know its running then on a constant current that does not heat the light any further not trying to regulate heating the light up even more
Its confirmed that the temperature readout of the MCU shows those high temperatures

Getting this fixed will also be an improvement to Lights like D4S which have no hard turbo dropdown

Tom E
Tom E's picture
Offline
Last seen: 6 days 7 hours ago
Joined: 08/19/2012 - 08:23
Posts: 15042
Location: LI NY

Phlogiston wrote:
I don't presume to speak for ToyKeeper either, but I will mention that when I was working as a software engineer, $500 would have bought you about two days of my time. For a bughunt on unfamiliar hardware, where either the hardware or the software could be at fault - or even both together - that's barely enough time to set up a suitable test & development environment, never mind actually tracking the bug down and fixing it. Bespoke software engineering is *expensive*. It scares me to even think about what ToyKeeper's freely given work for BLF would have cost on a commercial basis. I'm deeply grateful that she did it, though, because my EDCs have been running her firmware ever since the BLF A6.

You are cheap! smile  $500 is not a full day for me, and it covers about a week of my health insurance (2 adults).

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

500$ a day?

I have to work 7-8 days for that

guess it does not pay not to be able to do complex programming stuff

at least 12% of total income for my health insurance is cheaper then (children included)

Agro
Agro's picture
Offline
Last seen: 9 hours 32 min ago
Joined: 05/14/2017 - 11:16
Posts: 6945
Location: Ślōnsk

Wow. Senior programmer here earns $100 per day. Minus taxes.

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

Contract work is a two way negotiation. You can charge whatever you want as long as the client is willing to pay you that much. The specified rate tends to be variable based on a number of factors such as whether or not you are presently starving, or don’t need the work at all, or even how deep the clients pockets are or how much they stand to make from your work, etc. If they don’t like your price, they can go elsewhere. No one is a victim.

Wieselflinkpro
Wieselflinkpro's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 05/21/2015 - 04:34
Posts: 980
Location: Germany - TLF

Lexel wrote:
500$ a day?

I have to work 7-8 days for that

guess it does not pay not to be able to do complex programming stuff

at least 12% of total income for my health insurance is cheaper then (children included)


It depends on the point of view. Whats the price, a company would pay to your boss for your work. And Whats do you get at the end of the month from your boss.
Phlogiston
Phlogiston's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 10/27/2016 - 16:57
Posts: 988
Location: Scotland

Tom E wrote:
Phlogiston wrote:
[…] when I was working as a software engineer, $500 would have bought you about two days of my time.
You are cheap! smile $500 is not a full day for me, and it covers about a week of my health insurance (2 adults).
Smile

Probably an EU / US thing. I’m in a good company pension scheme, with healthcare and some more pension provided by the state from my taxes. The $500 is what ended up in my pocket. My employer would have charged you at least three times as much if you’d gone to them and asked for my services.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.

Lexel wrote:
I had some discussion with Matemineco today

they seem to miss the blink at ramp floor

By default, there is no blink at the ramp floor.

I took out the floor blink a long time ago because it is pretty obvious when the brightness stops going down, so no blink is needed. It can still be added as a compile option though.

Lexel wrote:
Still having problems getting the thermal regulation stable without the hard turbo dropdown

So… it has problems when compiled without the option to prevent those problems?

hodor wrote:
Honestly, I’ve experienced strange behaviour with temp regulation on my D4Ses.

Yes, it can adjust the wrong direction when temperature is changing very quickly. This is a known issue which I want to fix when I have time, but until then, the hard drop option is an effective workaround.

I have already tried a couple times to fix it quickly, but it seems I will have to do it the long way instead. The plan is to build a PDE-based thermodynamics simulator attached to a code simulator so I can run tests without hardware, and then adjust everything until it works as desired. It will probably take a solid uninterrupted week of development to finish, and I have been too busy to set aside that much time.

Until then, the workaround keeps things pretty safe. It just tends to be a little more careful than necessary.

Lexel wrote:
So I did a sort of proove as TK dont want to listen

I’ve been listening, and trying to help when I have time. I’ve been a little busy though.

Lexel wrote:
the temperature regulation starts to inchrease the current again above the thermal ceiling, … Video

Are you familiar with how PID regulation works?

It sounds like you might be a little confused about the “D” part, the derivative. It measures the slope of the temperature curve over time, and factors that into the equation. So the behavior depends on whether the temperature is rising or falling, not just what the absolute value is.

If it’s configured for 60 C and the sensor is at 70 C, it won’t necessarily reduce the power. If it’s at 70 C and rising, it reduces power. But if it’s at 70 C and falling, it assumes everything is okay and maintains a steady course. It may even increase power if it thinks the temperature is falling too fast.

In a similar manner, let’s say it’s at 40 C. If it’s 40 C and falling, it should increase the power… assuming it’s not already at the desired level. But if it’s at 40 C and rising, it may decrease the power even though it’s not at the limit yet. The response depends on where it’s at now, and where it expects to be in the near future.

Lexel wrote:
Video

In this test, the driver is floating free and the heat comes from a heat gun. This isn’t really a supported configuration. Increasing by 40 C in two seconds should not happen in a real light, and will probably cause an overflow issue to happen because it’s changing so fast.

However, it appears to be responding fairly well despite the weird conditions. What you describe in the video as “definitely a temperature bug” looks like it may be correct behavior. PID attempts to steer into the turns, instead of waiting until it passes the threshold before it starts changing course.

DB Custom wrote:
Asking for help and being rude about it

That’s actually part of why this process has been so long.

Well, that, and I’ve been busy. And Mateminco didn’t ask to hire me and send me hardware until yesterday. I haven’t exactly been ignoring them.

  • Apr 10, Mateminco asked if I could fix a problem in their light.
  • Apr 12, I saw the message and responded. Astrolux and Mateminco haven’t been very good about respecting the code license in the past though, so I wanted to make sure that was cleared up first. It’s kind of a prerequisite for taking clients. So I sent info about how free software works and what Mateminco needs to do to be eligible to use it.
  • Apr 14, Mateminco replied to say they understand and will keep working on fixing their product.
  • Apr 25 (yesterday), Mateminco asked to hire me to fix it.

I’ve been pretty busy with FW3A stuff though… and also busy with other high-priority projects. So I need to take care of those things first.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.
Scallywag wrote:
I’m not sure how I would feel about being asked to develop open-source software specifically for a certain company/product without compensation. The beauty of open-source is that Astrolux or whomever else are free to use the software if they meet certain requirements.

Yeah… it has been frustrating being asked to do large amounts of work for free, for the benefit of a company which has a history of ignoring the code license and delivering products which do not live up to expectations. Remember the S42?

The company has been trying to improve though, to make things right with the community. And, as of yesterday, they asked to hire me for the MT18. So I’ll probably add a MT18 build target for Anduril and make sure it works correctly.

Tom E wrote:
I can’t cut my hours at work right now, and I’m bout sure Astrolux would not pay my rate.

Exactly. Busy busy busy, and these projects don’t usually pay well so I have to prioritize other things.

Phlogiston wrote:
It scares me to even think about what ToyKeeper’s freely given work for BLF would have cost on a commercial basis.

I haven’t attempted to track anything like that, but the sloccount tool can produce rough estimates of how much it would cost to develop arbitrary code at a traditional software company like IBM or Microsoft. This includes both the salary paid to the developers and the other overhead in the company.

So I’m curious. Let’s see what sloccount says…

> bzr branch trunk test
> cd test/ToyKeeper
> sloccount .
...
Development Effort Estimate, Person-Years (Person-Months) = 3.51 (42.11)
 (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months)                         = 0.86 (10.36)
 (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule)  = 4.07
Total Estimated Cost to Develop                           = $ 474,063
 (average salary = $56,286/year, overhead = 2.40).

So, after factoring the overhead ratio of 2.40, that works out to:

  • $197,526.25 salary for the developer
  • $276,536.75 corporate overhead

It estimated about 3.51 person-years to develop. I’ve been doing it in my free time for about 4.5 years. So it’s probably not too far off. However, there just isn’t that much money in flashlights. The estimated total cost is probably almost as high as the total revenue of all lights sold with my code so far… so even in an ideal scenario where I got literally all profits, I’d only get a fraction of sloccount’s number.

Lexel wrote:
Toykeeper is trelling for last months first Texas Ace
then me
last Astrolux
that her firmware has no bug its perfectly regulating temperature
does not want to write new code Astrolux paying her because she claims there is no bug

I have not been saying it works perfectly. I have been saying it needs the correct compile options and calibration. I have also been saying it is important to understand how PID works, and understand how to work with source code. And saying that companies need to talk to me directly if they want my help.

On a related note, your pogo pin flashing adapter design should make it a lot easier to do thermal testing on real hardware. I should have one of those soon, and I plan to make good use of it. Maybe I won’t even have to build a simulator… though I’d still prefer to to use a simulator so I can get more precise results faster. Then I could run a whole test suite in a couple minutes instead of having to wait for batteries to charge between tests.

WTF
Offline
Last seen: 1 year 5 days ago
Joined: 03/05/2017 - 20:13
Posts: 318

Would it help to put some small current sense resistors in series with the led on the driver.

Not to measure current flow just to generate some heat so the mcu can respond quicker?

TrueRMS
Offline
Last seen: 1 year 5 months ago
Joined: 08/09/2013 - 13:24
Posts: 306
Location: Middle of nowhere OH

Thank you Ma’am, this worked perfectly!

Thank you too Tom for making the easy to read pinout diagram.

ToyKeeper wrote:
Tom E wrote:
/*
 *                  ---
 *    Reset PB5 1 -|   |- 8  VCC
 *   switch PB3 2 -|   |- 7  PB2 Ind.LED
 * 7135 PWM PB4 3 -|   |- 6  PB1 Not Used
 *      GND     4 -|   |- 5  PB0 FET PWM
 *                  ---
 */

…but I think the easiest method would be to tell it the light has three channels, and then put the PWM data out of order. More specifically:

  • Copy the FF ROT66 cfg file.
  • Copy the PWM data from a 2-channel driver like the Emisar D4.
  • Rename PWM1_LEVELS to PWM3_LEVELS.
  • Rename PWM2_LEVELS to PWM1_LEVELS.
  • Define PWM2_LEVELS and set it to all zeroes.

Basically, PWM1 has the FET data, PWM2 is zero, and PWM3 has the 7135 chip data.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.

WTF wrote:
Would it help to put some small current sense resistors in series with the led on the driver.

Not to measure current flow just to generate some heat so the mcu can respond quicker?

It seems to get the measurements fast enough on most lights… but it probably helps if the LED wires are thick and the MCU is close to the copper pours for BAT+/LED+. Heat travels through those wires and traces into the feet of the MCU.

i42dk
i42dk's picture
Offline
Last seen: 3 weeks 6 days ago
Joined: 08/30/2017 - 05:35
Posts: 201
Location: Denmark

I’ve been gathering courage over the last few months; to give firmware code/editing another go. I’m not there yet, but I do have a question about a feature Smile

How much code/work would it require to make Anduril have the option to do a “soft off” ?

When clicking once when on, instead of the light turning off instantly after the tiny delay:

I would love to make it do a really quick ramp down from the ramp level it was on. And THEN turn off completely.

I mean, “we have the technology”. So why not add another fancy feature Big Smile

User revdns did this mod back in 2016. Same concept. source

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.
i42dk wrote:
How much code/work would it require to make Anduril have the option to do a “soft off” ?

I tried adding a soft-on and soft-off feature once. It wasn’t very hard to add, but there’s a catch. If the user clicks during the ramp-up or ramp-down period, things can get a little tricky. It needs a way to abort the animation. This is probably at least a little bit easier now though, since I built automatic abort into the nice_delay function any time a button is pressed.

So it’s not a lot of code, but it may take some experimenting to find a good way of dealing with interruptions.

joechina
Offline
Last seen: 6 months 2 weeks ago
Joined: 03/05/2016 - 08:23
Posts: 1459
Location: Germany

Does anybody know if Andúril has a reset function implemented yet?
(hold the switch while connecting the battery)

Or is this only planed?

Edit:
Not at the moment, maybe in the future

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

Toykeeper I know what PID is and how it works
But even if I put a pot of water on my hotplate that is 30K above set point it wont start very quick to do a 70% duty cycle its likely starting about 10K above to heat up again,
but your PID even starts to increase current 40 or 50K above set point

I know even before you hit the Temperature ceiling if temp is climbing it is throtteling the output

That Video was made under Lab conditions, the heat up (I know it was way too fast) was in this test totally irrelevant
It was way more interesting what happens when the driver cools down slowly

The fact that the driver is starting to increase current even 30 or 40°C above the temperature set point is causing the heat up bug TA, Matemineco and myself has seen in multiple tets
in the video I could clearly show that it went up to 70% FET duty cycle when the temperature is falling but still 20-25°C above temperature ceiling

.

All what has to be done is keep the PID regulating to Ceiling +5K then disable it for safety reasons till ther light cooled down enough
(current PID model seems not to work so well for flashlights, when its getting hotter than set point, it wents into some sort of oscillation heating up more and more)
instead ramp down current down to MIN_THERM_STEPDOWN and stay at that level till it falls below temp ceiling
This would be sort of “Soft Turbo dropdown” dependant on temperature

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

Another question is about Lowering the PWM frequency on Moonlight to like 2kHz like you do which code is responsible for that
I would also like that in NarsilM some day

I am currently working on a CC FET driver and I also want to try getting on low levels the PWM to the OPV constantly at this frequency to see if this can be used to dim more
its not working on 15kHz with NarsilM

I have in main.c
#define BLINK_AT_RAMP_FLOOR
#define MOON_TIMING_HINT
enabled but it does not blink Astrolux wants it

P33
Offline
Last seen: 2 months 1 day ago
Joined: 09/25/2018 - 16:41
Posts: 303
Location: Kraków, Poland

I got round to flash Anduril onto my D4S and I think I bricked it.
I just simply copied the command from the first post without reading more about it and now I wish I did..
That’s what I did. Now after pressing the button only aux LEDs blink in low mode.

Quote:
C:\>avrdude -p t85 -c usbasp -u -Uflash:w:d4s.hex:a -Ulfuse:w:0×75:m -Uhfuse:w:0xFF:m

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0×1e930b
avrdude: NOTE: “flash” memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file “d4s.hex”
avrdude: input file d4s.hex auto detected as Intel Hex
avrdude: writing flash (7372 bytes):

Writing | ################################################## | 100% 6.48s

avrdude: 7372 bytes of flash written
avrdude: verifying flash memory against d4s.hex:
avrdude: load data flash data from input file d4s.hex:
avrdude: input file d4s.hex auto detected as Intel Hex
avrdude: input file d4s.hex contains 7372 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.07s

avrdude: verifying …
avrdude: 7372 bytes of flash verified
avrdude: reading input file “0×75”
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0×75:
avrdude: load data lfuse data from input file 0×75:
avrdude: input file 0×75 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying …
avrdude: 1 bytes of lfuse verified
avrdude: reading input file “0xFF”
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xFF:
avrdude: load data hfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0×0000 0xdf != 0xff
avrdude: verification error; content mismatch

avrdude done. Thank you.

After this MCU doesn’t respond to anything

Quote:

C:\>avrdude -p t85 -c usbasp -n

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude done. Thank you.

Can I still rescue it somehow or do I have to replace ATTiny on the driver?

Forgive me if that’s something obvious but I’m really not too educated on this stuff..

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

You used totally wrong fuse bits
Only a high voltage flasher may reset the MCU

Doesn’t help if its not flashable anymore you got to replace it

I may send you from Germany a flashed MCU

Best is to carefully unsolder one side leg by leg then folding up a few times to break other side legs

beastlykings
beastlykings's picture
Offline
Last seen: 5 days 9 hours ago
Joined: 12/29/2017 - 17:06
Posts: 193
Location: Michigan, USA

I was gonna say I might be closer and could send you an MCU, but then I realized your in Poland lol.

Sorry, it sucks to brick an MCU. Been there, done that, you’re not alone at least.

P33
Offline
Last seen: 2 months 1 day ago
Joined: 09/25/2018 - 16:41
Posts: 303
Location: Kraków, Poland

You live and learn. Eh..
Could you explain how to do it correctly for the future reference?
Will probably use your offer Lexel and place that long overdue order for couple drivers and get MCU straight away.

Actually how would it work with new ATTiny, do they come preprogrammed or how does one place initial firmware on it?

Excuse stupid questions but have no experience with it.

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

there are 2 ways of programming
pre solder with a SOIC socket adapter
or past reflow with an SOIC clip pusching on the MCU from above the PCB

indutrially with a pre reflow flashing robot that may be also able to retube/rerail the MCUs after flashing for PCBA machines feeder

Ryzbor
Ryzbor's picture
Offline
Last seen: 3 weeks 11 hours ago
Joined: 01/21/2018 - 10:52
Posts: 387
Location: Poland

Lexel, can you also slightly modify the code of Anduril/Ramping IOS V2 in such a preflashed MCU? With a appropriate remuneration of course.
In Poland it seems almost no one is capable of doing ui flashing related stuff.

virence.com Nichia E21A sw30+sw40 Wizard Pro ; Skilhunt H03 XP-E2 660nm ; Wizard Pro E21A 2000K ; S2+ E21A sw40 d220 ; Sofrin C01R 660nm, Mf01 Mini Nichia 219B sw35+sw40

Lexel
Lexel's picture
Offline
Last seen: 1 year 2 months ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany
Ryzbor wrote:
Lexel, can you also slightly modify the code of Anduril/Ramping IOS V2 in such a preflashed MCU? With a appropriate remuneration of course. In Poland it seems almost no one is capable of doing ui flashing related stuff.

I always work with NarsilM and Anduril constantly doing small easy code modification regarding replacing numbers or switching features on or off

But I can not write code itself like changing original code sections

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.
joechina wrote:
Does anybody know if Andúril has a reset function implemented yet? (hold the switch while connecting the battery)

No, not yet. I was trying to find a method which would work for FW3A, but it can’t detect the switch until quite a while after power is connected… and I haven’t added it yet for other lights where it’s easier to do.

So far I only have it on my lightsaber.

P33 wrote:
Could you explain how to do it correctly for the future reference?

Sorry about the bricked MCU. It sucks when that happens… and there’s no easy way to fix it.

Normally, it’s best not to set fuse values at all. Just let them stay as is, and there’s virtually no risk of bricking the MCU. But if you do flash them, I recommend using the bin/flash-*.sh scripts in the firmware repository. They have the correct fuse values; just pick a script which matches your MCU type.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.
Lexel wrote:
Another question is about Lowering the PWM frequency on Moonlight to like 2kHz like you do which code is responsible for that I would also like that in NarsilM some day

It’s in a few parts of the code — anything which refers to dynamic underclocking. Since it’s a compile-time option, the exact relevant parts of the code are already marked.

DrafterDan
DrafterDan's picture
Offline
Last seen: 2 years 1 month ago
Joined: 11/21/2014 - 13:33
Posts: 95
Location: phoenix, AZ
ToyKeeper wrote:
So far I only have it on my lightsaber.

Okay, may we see your lightsaber? I wonder if you lean towards the light, or a bit towards the darkness Smile It seems the darksiders have all the cool toys

I’ve not purchased/ made one yet, but I’m waning. Strangely enough, I feel it’s impractical. Doesn’t do anything more than be a cool thing. Of course I’m also the guy with a bunch of flashlights just sitting on a shelf in my office…

have light, will travel

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 58 min 39 sec ago
Joined: 01/12/2013 - 14:40
Posts: 10834
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.
DrafterDan wrote:
may we see your lightsaber? I wonder if you lean towards the light, or a bit towards the darkness Smile


You mean this one?





Here’s a closer look at two sabers I use… green for the good days, purple for the not-so-good days:

The one I’m using a custom driver in, though, is a rainbow saber. It is all colors… sometimes even at the same time.

DrafterDan
DrafterDan's picture
Offline
Last seen: 2 years 1 month ago
Joined: 11/21/2014 - 13:33
Posts: 95
Location: phoenix, AZ

Good answer! Those are top notch.
Funny, I don’t remember seeing the middle one in the movies though

have light, will travel

Pages