Q8, PMS SEND TO THOSE WITH ISSUES BLF soda can light

I have a question for Narsil.

I think I used wrong fuses so the light runs too slow

When in config mode the blinks are over a second away from each other

Which fuses are used for it?

in for 1. thanks

Should be as documented in the header, and also posted in the Bat file: 85fuses.bat.

This is the "sort of official" location for the latest Narsil, version 1.2:

https://drive.google.com - Narsil

Please download/unzip the file: AVRDudeCommands.zip for the BAT files for AVRDude.

Here's the excerpt from the source code in Narsil.c from the comment header:

* FUSES
 *  See this for fuse settings:
 *    http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny85&P=ATtiny85&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=E2&V_HIGH=DE&V_EXTENDED=FF&O_HEX=Apply+values
  * 
 *  Following is the command options for the fuses used for BOD enabled (Brown-Out Detection), recommended:
 *      -Ulfuse:w:0xe2:m -Uhfuse:w:0xde:m -Uefuse:w:0xff:m 
 *    or BOD disabled:
 *      -Ulfuse:w:0xe2:m -Uhfuse:w:0xdf:m -Uefuse:w:0xff:m
 * 
 *      Low: 0xE2 - 8 MHz CPU without a divider, 15.67kHz phase-correct PWM
 *     High: 0xDE - enable serial prog/dnld, BOD enabled (or 0xDF for no BOD)
 *    Extra: 0xFF - self programming not enabled
 *
 *  --> Note: BOD enabled fixes lockups intermittently occurring on power up fluctuations, but adds slightly to parasitic drain
 

Ok so I used the right fuses but the config mode and strobe is extreemly slow.

I use Narsil triple v1.3

The strobe is flashing between 1 and 2Hz

Just to blink through whole config mode takes minutes

Whoa, that's a weird one. So instead of 16 kHz, it's doing 1-2 hertz? That's a factor of 8,000 - 16,000 times too slow. Hhmm.

Are you using Atmel Studio 7.0 and copied the files exactly? Any mods to the code?

NarsilTriple is here: https://drive.google.com/drive/folders/0B1IxYZuk4DjcUERkZGpmdnBsWFk

So same thing applies for the fuse settings.

I never saw or heard of a problem like this that wasn't fuse settings. I can try downloading from the share, rebuild, and test it if you'd like. What driver are you using? What specific 7135 and FET?

the strobe is so slow, not the pwm

I compiled the Narsil triple v1.3.c with this method from this thread

this is the defective hex file it build
http://www.metronixlaser.de/bilder/flashlight/NarsilTriple.hex

I think it does not accept the preprocessor and other configs files, as I made a new project with just the narsil.c file

I learned a lot last 2 days getting into Amtel a bit, so i tried to compile your 3*7135 version
Compiling the whole project gives me an error in Amtel 5 that some tool is missing

Opening the Narsil triple v1.3 solution I need a newer version of Amtel studio than my 5.1

I have version 7 now installed and try to generate a new Narsil triple.hex

this is the new hex file compiled with Amtel 7
http://www.metronixlaser.de/bilder/flashlight/NarsilTriple_v1.3.hex

Oops, yep I'm all confused. it should be 16 Hz, so it's 8-16 times slower.

Yea. I'd go with 7.0. I was using 6.0 before this and have been keeping up with the latest versions every since - never a problem.

In fact in that old comfy thread I posted I was using 6.0 at the time.

I did test the new flashed driver
the old hex file is defective

the new one works a lot faster

and the new one does not do the 2 blinks at powering the driver?

Got a compile switch in there now to enable/disable the double blink - might have been left turned OFF when I posted the source code. Interesting, but good news.

What about using a hollowed-out unicorn horn for the tube? That must have some special thermal properties…

I prefer the higher specific heat capacity of Pegasus femur

Yeah, but the unicorn horn is prettier! :heart_eyes:
Maybe we can get Pegasus Femur just in the pill area, and unicorn horn for the rest of the host. :smiley:

Phoenix feather. If it does goes up in flames, it reincarnates.

how to read out the temp sensor in the MCU?

Section 17.12 in the datasheet

Well, it's an AtoD conversion, just like reading the voltage dividers for battery level. Dunno offhand the details, but yes - in the Atmel spec.

I have read the datasheet and articles people using it for an temperature measurement

but that doesnt help me getting a value out of my MCUs like the –2, –8, –11 offset values that are desribed in narsil triple to calibrate the sensor to room temperature

I need practical instructions how to get the offset value out of my chip using amtel Studio 7 or another programm

If you are an expert in programming you can easily do this but i have almost no programming expirience, if they would write the datasheet in chineese that would help me as much as the english one, even if i understand nothing for chineese one

I know how to get data in the chip flashing
but getting real time data out of the attiny is a whole different thing

Hahaha can we source this in China?

Ohh, ok. I was confused in what you were asking for (might still be). I'm thinking you are asking how to go about calibrating the temperature readings? If so:

To get a close to accurate temp calibration, I'd start trying with -2 for TEMP_CAL_OFFSET, so remove the "//" from the #define TEMP_CAL_OFFSET (-2) line and add the leading "//" on the #define TEMP_CAL_OFFSET (-11) line. Only one should be uncommented (no "//"), the other two should be commented out (i.e. leading "//").

Unfortunately you would have to assemble the light now, then give it time to settle to room temperature, then in ramping, triple-click, then double-click to get into temperature reading mode. If it blinks out room temp in Celsius close to accurate, you are good to go. If not, say for example it blinks out 26(C) when the actual room temp is 21C, then it's reading 5 too high, therefor the -2 offset should be changed to -7. Of course to make this change, you'd have to dis-assemble the light, make the change in the source code, re-compile/link and download -- then re-check the temp. Again, if the light had been used and heated up, it will take some time for it to settle back to room temp. I really need to make this settable in the UI some how..

Maybe, not sure, but you might be able to do this open on the bench - I haven't tried it this way, but would think it would be work ok. This would save the PIA assembly/dis-assembly steps. Some lights are easier than others - the SupFire M6 is great for quick programming because of the driver retaining ring, and extra long wires you need anyway - no soldering, just like the Q8 will be .

OK

I got it on my bench tested

The light blinks 3 then 2 times, with –2, so that means 32°C right?
according to this readings at 20°C I have to calibrate –14

#define TEMP_CAL_OFFSET (14) // For the Klarus XT11GT at –2, reads 32C room temp (20C)

now it blinks 2 then 1 so its 21°C almost perfect my IR thermometer says 22°C

The other thing is I want the light when powered on to go to turbo, what do I need to change in the firmware