wight catchup

57 posts / 0 new
Last post
staticx57
Offline
Last seen: 1 day 15 hours ago
Joined: 04/11/2016 - 00:43
Posts: 712
Location: New Jersey, United States

Before my time but the legend lived on. Welcome back!

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 11 hours 51 min ago
Joined: 03/24/2016 - 07:44
Posts: 9143
Location: Everything is brighter in Texas

Good to see you back Wight, while our times here did not cross your work was what heavily influenced the TA driver series (with the work of PD68 and DEL adding there share in the mean time of course).

I look forward to seeing what you cook up now.

Getting the OTSM working with some viable firmware would be nice for the time when clicky lights are required for example. Right now the only firmware that supports it is a bit too buggy to make widespread use possible and dealing with the OTC is a royal pain, having to deal with this right now actually and think I might just revert to a non-OTC firmware in order to solve the problem.

TBone
Offline
Last seen: 2 months 2 weeks ago
Joined: 01/27/2016 - 16:42
Posts: 346
Location: Europe

Welcome back!

Schoki has made a boost driver that will be very interesting once Lexel gets it running and on sale… Party

Tom Tom
Offline
Last seen: 2 years 1 month ago
Joined: 09/10/2017 - 08:30
Posts: 1162
ToyKeeper wrote:
It’s probably worth mentioning that OTSM has not gotten any widespread use yet. It’s only implemented on a couple drivers, and is only supported by one firmware. Part of this, I think, was due to the overall difficulty of making it work right. Part was probably due to the relevant code being tricky.

That is putting it very politely.

Flintrock disappeared quite a while ago, but whilst he was here, he had, lets say, a high opinion of his abilities, and derision for almost every one else who questioned some things.

And his code was, let’s just say, unusual.

Tom Tom
Offline
Last seen: 2 years 1 month ago
Joined: 09/10/2017 - 08:30
Posts: 1162
Texas_Ace wrote:
dealing with the OTC is a royal pain, having to deal with this right now actually and think I might just revert to a non-OTC firmware in order to solve the problem.

I think I fixed the OTC design some years ago and made it consistent, defined, analysable. Instead of a capacitor just dangling in the breeze.

But it seemed nobody at the time was interested. Or perhaps felt threatened.

I could discuss, but only in PM.

DavidEF
DavidEF's picture
Offline
Last seen: 1 week 2 days ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA
Tom Tom wrote:
ToyKeeper wrote:
It’s probably worth mentioning that OTSM has not gotten any widespread use yet. It’s only implemented on a couple drivers, and is only supported by one firmware. Part of this, I think, was due to the overall difficulty of making it work right. Part was probably due to the relevant code being tricky.

That is putting it very politely.

Flintrock disappeared quite a while ago, but whilst he was here, he had, lets say, a high opinion of his abilities, and derision for almost every one else who questioned some things.

And his code was, let’s just say, unusual.


Hmmm… I wonder if Flintrock ever thought about coming back under a different name and trying to build a different reputation for himself… Davie

I’ve heard it can be done. Wink

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 40 min ago
Joined: 01/12/2013 - 14:40
Posts: 10648
Location: (469219) 2016 HO3

The code supporting OTSM was tricky mostly because it relied on bare interrupts running raw assembly code. This made it extremely hardware-specific, and it also appears to have made the code buggy in some pretty unpredictable ways. I think perhaps the bare interrupts were less safe than Flintrock had thought, and may have had subtle unintended effects, but I haven’t tested to verify that. I just know that, whenever I tried BistroHD on real hardware, it exhibited a pretty wide variety of issues which were not easy to reproduce on purpose.

I’ve been trying to push code in the opposite direction instead — making it less hardware-specific and more portable, so people can mix and match whatever hardware they want with whatever UI they want. And for that, I think it’s about time to support more than one MCU architecture. I’m not sure which one to add next, but I’m thinking maybe tiny84 or tiny841 or tiny1634. New driver designs frequently seem to need more pins, and I have a bad habit of filling space, so it wouldn’t hurt to have more ROM too.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 11 hours 51 min ago
Joined: 03/24/2016 - 07:44
Posts: 9143
Location: Everything is brighter in Texas

I agree, a new MCU is needed, something with both more pins and rom space.

I am also very grateful for the move to more universal firmware setup, now that I have started to play with Anduril I am seeing the flexability, I just need to figure out what the limits are. I tend to push past the bounds unless I know exactly where they are.

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 01/14/2016 - 16:38
Posts: 1222
Location: Germany

OTSM is absolutely reliable, pretty simple to handle, no "raw assembly code" required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Try it!

 

/* Simple sample firmware for otc less design (single cell).
   
   Half press less than about 300 ms: next mode
              between 300 and 900 ms: previous mode
              longer:                 blink out voltage reading
                                      (0 to 255) in 3 decimals
   
Suggested capacity of buffer cap (C2): >= 47 uF.
   Vbatt is connected to PB3 (Pin2).
Voltage divider still connected to Pin7.
   Timing specified for Attiny25 at 10 Mhz.
   Don't fuse BOD.
   Created and built with Atmel Studio.
   Fuses for Attiny25: lfuse: 0xD2, hfuse: 0xDF.
*/

#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/wdt.h>

#define PIN_7135            PB0
#define PIN_FET             PB1
#define PIN_POWER_DETECT    PB3
#define INT_POWER_DETECT    PCINT3
#define VLT_PIN             PB2
#define VLT_CHANNEL         0x01
#define VLT_DIDR            ADC1D
#define ADC_VREF            ((1 << REFS1) | (1 << REFS2))    // 2.56V
#define ADC_PRESCL         0x06

#define PWM_PHASE           0xA1
#define PWM_7135            OCR0A
#define PWM_FET             OCR0B

#define MODE_COUNT          6
#define PWM_LEVELS_7135     30, 80, 255, 255, 255,   0
#define PWM_LEVELS_FET      0,   0,   0,  30,  80, 255

// forward declarations
uint8_t adc_init_and_read();
void blink_once();
void blink_once_long();
void blink_value(uint8_t value);
void delay_250_micro_sec(uint8_t n);
void delay_50_milli_sec(uint8_t n);
void delay_1_sec();
void led_off();
void led_on();

volatile uint8_t s_clicked = 0;
const uint8_t pwm_levels_7135[] = { PWM_LEVELS_7135 };
const uint8_t pwm_levels_fet[] = { PWM_LEVELS_FET };
uint8_t mode_index = 0;

////////////////////////////////////////////////////////////////////////////////

int main(void)
{
    uint8_t blink_voltage = 0;
    uint8_t voltage;
    
    // set LED ports as output
    DDRB = (1 << PIN_7135) | (1 << PIN_FET);
    
    // initialize PWM
    TCCR0A = PWM_PHASE;
    TCCR0B = 0x01;

    // enable pin change interrupts
    PCMSK = (1 << INT_POWER_DETECT);
    GIMSK |= (1 << PCIE);
    sei();
    
    // start with first mode
    PWM_7135 = pwm_levels_7135[mode_index];
    PWM_FET = pwm_levels_fet[mode_index];
    
    while ( 1 )
    {
        if ( s_clicked )
        {
            if ( s_clicked <= 10 ) // < about 300 ms
            {
                blink_voltage = 0;
                mode_index++;
                if ( mode_index >= MODE_COUNT )
                    mode_index = 0;
            }
            else if ( s_clicked <= 30 ) // < about 900 ms
            {
                blink_voltage = 0;
                mode_index--;
                if  ( mode_index == 255 )
                    mode_index = MODE_COUNT - 1;
            }
            else // > about 900 ms
            {
                mode_index = 0;
                blink_voltage = 1;
            }
            
            s_clicked = 0;
            PWM_7135 = pwm_levels_7135[mode_index];
            PWM_FET  = pwm_levels_fet[mode_index];
        }
                
        voltage = adc_init_and_read();
        
        if ( blink_voltage )
            blink_value(voltage);
        
        delay_1_sec();
    }
}

////////////////////////////////////////////////////////////////////////////////

ISR(PCINT0_vect)
{
    // disable output
    PORTB = 0;
    
    // turn off PWM generation (might not be necessary)
    TCCR0A = 0;
    TCCR0B = 0;
    
    // ADC off
    ADCSRA &= ~(1 << ADEN);

    // disable pin change interrupt
    GIMSK &= ~(1 << PCIE);
    PCMSK = 0;

    s_clicked = 0;
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    
    do
    {
        s_clicked++;
        
        wdt_reset();
        WDTCR = (1<<WDIE) | WDTO_30MS;

        sei();
        sleep_mode();
        cli();
        
    } while ( (PINB & (1 << PIN_POWER_DETECT)) == 0 );
    
    wdt_disable();
    
    // debounce
    delay_250_micro_sec(10);
    
    // activate pwm generation
    TCCR0A = PWM_PHASE;
    TCCR0B = 0x01;

    // enable pin change interrupts
    PCMSK = (1 << INT_POWER_DETECT);
    GIMSK |= (1 << PCIE);
}

////////////////////////////////////////////////////////////////////////////////

void delay_250_micro_sec(uint8_t n)
{
    while ( n-- )
    {
        int k = 180;
        while ( k-- )
        {
            if ( s_clicked )
                return;
        }
    }
}

////////////////////////////////////////////////////////////////////////////////

void  delay_50_milli_sec(uint8_t n)
{
    do
    {
        delay_250_micro_sec(200);
        if ( s_clicked )
            return;
    } while ( --n );
}

////////////////////////////////////////////////////////////////////////////////

void delay_1_sec()
{
    delay_50_milli_sec(20);
}

////////////////////////////////////////////////////////////////////////////////

void led_on()
{
    PWM_7135 = pwm_levels_7135[mode_index];
    PWM_FET  = pwm_levels_fet[mode_index];
}

////////////////////////////////////////////////////////////////////////////////

void led_off()
{
    PWM_7135 = 0;
    PWM_FET = 0;
}

////////////////////////////////////////////////////////////////////////////////

void blink_once()
{
    led_on();
    delay_50_milli_sec(5);
    led_off();
    delay_50_milli_sec(5);
}

////////////////////////////////////////////////////////////////////////////////

void blink_once_long()
{
    led_on();
    delay_1_sec();
    led_off();
    delay_1_sec();
}

////////////////////////////////////////////////////////////////////////////////

void blink_once_short()
{
    led_on();
    delay_50_milli_sec(1);
    led_off();
    delay_50_milli_sec(5);
}

////////////////////////////////////////////////////////////////////////////////

void blink_value(uint8_t value)
{
    // 100er
    if ( value < 100 )
        blink_once_short();

    while ( value >= 100 )
    {
        value -= 100;
        blink_once();
    }
    delay_1_sec();

    // 10er
    if ( value < 10 )
        blink_once_short();

    while ( value >= 10 )
    {
        value -= 10;
        blink_once();
    }
    delay_1_sec();

    // 1er
    if ( value == 0 )
        blink_once_short();

    while ( value > 0 )
    {
        value--;
        blink_once();
    }
    delay_1_sec();
}

////////////////////////////////////////////////////////////////////////////////

uint8_t adc_read()
{
    uint8_t value;
    
    while (ADCSRA & (1 << ADSC))
    {
        if ( s_clicked )
            return 0;
    }
    value = ADCH;
    ADCSRA |= (1 << ADSC);
    return value;
}

////////////////////////////////////////////////////////////////////////////////

uint8_t adc_init_and_read()
{
    DIDR0 |= (1 << VLT_DIDR);
    ADMUX  = ADC_VREF | (1 << ADLAR) | VLT_CHANNEL;
    ADCSRA = (1 << ADEN) | (1 << ADSC) | ADC_PRESCL;
    adc_read(); // first run not reliable (see spec)
    return adc_read();
}

////////////////////////////////////////////////////////////////////////////////
// empty interrupt function required otherwise mcu will reset

ISR(WDT_vect)
{
};

////////////////////////////////////////////////////////////////////////////////
ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 40 min ago
Joined: 01/12/2013 - 14:40
Posts: 10648
Location: (469219) 2016 HO3
Flashy Mike wrote:
OTSM is absolutely reliable, pretty simple to handle, no “raw assembly code” required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Oh, nice. I didn’t know anyone except Flintrock had done it. This is much more useful, and demonstrates a pretty clean way to do it. It would not have occurred to me to go to sleep inside an interrupt handler.

Could I add this to the repository?

gchart
gchart's picture
Offline
Last seen: 8 hours 52 min ago
Joined: 03/19/2016 - 11:57
Posts: 2986
Location: Central IL

A legend returns! Welcome back wight. Even though I joined after the start of your “sabbatical”, it seems like I’ve read (and re-read) so many of your posts. Thanks for your contributions thus far.

leroycp
Offline
Last seen: 2 weeks 1 day ago
Joined: 12/27/2015 - 19:24
Posts: 738
Location: Stewart TN

Also a welcome back. Heard quite a bit about you. I keep following along.

RotorHead64
RotorHead64's picture
Offline
Last seen: 6 months 2 days ago
Joined: 10/31/2015 - 02:49
Posts: 430
Location: United States

Good to have you back wight. 

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 01/14/2016 - 16:38
Posts: 1222
Location: Germany
ToyKeeper wrote:
Flashy Mike wrote:
OTSM is absolutely reliable, pretty simple to handle, no “raw assembly code” required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Oh, nice. I didn’t know anyone except Flintrock had done it. This is much more useful, and demonstrates a pretty clean way to do it. It would not have occurred to me to go to sleep inside an interrupt handler.

Could I add this to the repository?

Yes.
wight
Offline
Last seen: 1 year 1 month ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

In no particular order:

various parties wrote:
Welcome back + links
Thanks for the welcome back & for the flashlight & lantern links!

To all the folks who showed up during my hiatus: welcome to BLF Silly I’m thrilled to think that anything I posted was still of use while I was away.

To all the folks who were already here – it’s really nice to see that you folks are still kicking!

MRsDNF wrote:
wight catch-up. Now that bought a smile to the dial. Welcome back. For those that don’t know wight also built a light or two that defied the laws of magic. Must go find the threads for a refresher.
I think that you’re confusing my builds with yours. Wink

Tom Tom wrote:
I think I fixed the OTC design some years ago and made it consistent, defined, analysable. Instead of a capacitor just dangling in the breeze. But it seemed nobody at the time was interested. Or perhaps felt threatened. I could discuss, but only in PM.
There are several obstacles besides dangling. IIRC the ATtiny25/45/85 thread contains some work trying to compensate for temp & voltage. For 1s lights the voltage divider may no longer create a problem for the OTC, but for 2s lights w/ a Zener or LDO there will still be a voltage divider messing with drain on the OTC. I generally prefer to discuss things out in the open so that everyone can benefit, but with that said sometimes it’s easier to get the ball rolling in PM. Feel free to drop me a PM where we can get our thoughts together.

The capacitor recommended by Flintrock for the OTSM solution is expensive and it would certainly be nice to avoid it!

Flashy Mike wrote:

OTSM is absolutely reliable, pretty simple to handle, no “raw assembly code” required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Try it!

Thank you for sharing the PoC! Hopefully the idea will get more traction now with a compact demo available. LOL I don’t have a 25/45 right now, only 85, so I won’t be able to try it right away. I’ll try and pick up the necessary bits on my next parts order. Did you or Mike C look into component selection? Flintrock recommended a $1/ea capacitor w/ legs which looked troublesome for hand soldering/rework. A bulletproof offtime solution is worth $1, but less expensive is always appreciated, especially if anyone mass-produce a driver using this technique.

Boaz wrote:

Joshk wrote:
Hello. Who the heck are you? Silly

  Wight is so old …

  he wrote the original low/high sos/strobe next mode memory driver

Boaz caught me. It was I who released that scourge upon the world. When my secret finally leaked I couldn’t face the forum for years! Silly Silly

Joshk wrote:
I remember back when I joined, people were talking about the missing “wight”. Smile Here’s my catch-up. Maybe I am wrong. I think the hobby has changed. As I understand, years ago the average person expected Alkaline/light-bulb performance, so showing them a lithium/LED flashlight was a mind-blow. Everyone had fun. Now there are lithium/LED flashlights on every retail shelf. And while it’s will always be possible to out-perform a mass-produced light, it takes more money and effort than ever to ‘wow’ the average person. The “Giggles” light for example is great for wow-ing people, but had to be built so absurdly big it’s hard to even think of an excuse to take it off the shelf.
The truth is that this was actually the situation long before I left. Shocked Still, there is a lot of bang-for-the-buck (as well as satisfaction) to be had with reasonable custom builds or customized budget lights.

Texas_Ace wrote:
Good to see you back Wight, while our times here did not cross your work was what heavily influenced the TA driver series (with the work of PD68 and DEL adding there share in the mean time of course). I look forward to seeing what you cook up now. Getting the OTSM working with some viable firmware would be nice for the time when clicky lights are required for example. Right now the only firmware that supports it is a bit too buggy to make widespread use possible and dealing with the OTC is a royal pain, having to deal with this right now actually and think I might just revert to a non-OTC firmware in order to solve the problem.
Thanks TA, I’m glad that you carried to torch! I hope that I’ll do some cooking, but no promises on that front. Step 1: build a couple of working flashlights out of my piles of supplies.

Right now I’ve got to get my work space up to snuff. In the intervening years since I left the forum my flashlight stuff has been packed, repacked, moved, etc. I’ve got a new hobby area now but it’s been in use for (and is currently in use for) other projects. So in other words… right this moment I should stop reading forum threads and go clean up! Big Smile

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 01/14/2016 - 16:38
Posts: 1222
Location: Germany

wight wrote:
Flashy Mike wrote:

OTSM is absolutely reliable, pretty simple to handle, no “raw assembly code” required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Try it!

Thank you for sharing the PoC! Hopefully the idea will get more traction now with a compact demo available. LOL I don’t have a 25/45 right now, only 85, so I won’t be able to try it right away. I’ll try and pick up the necessary bits on my next parts order. Did you or Mike C look into component selection? Flintrock recommended a $1/ea capacitor w/ legs which looked troublesome for hand soldering/rework. A bulletproof offtime solution is worth $1, but less expensive is always appreciated, especially if anyone mass-produce a driver using this technique.

I built my last OTSM drivers in early 2017 (focused on momentary switches now) and couldn’t find any notes Facepalm so had to open a S2+ triple with this driver and see what I’ve used:

Found 2 added ordinary 100uF X5R ceramic caps, connected to GND and Vcc of mcu. I measured them about 160 uf together. The driver is a BLF X6 with Attiny25. But beware the BLF X6, there was a batch with reprogramming locked by fuse. I don’t know if Banggood made a change afterwards, I haven’t bought this driver since that time.

Btw – why do you think you can’t use the Attiny85?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 40 min ago
Joined: 01/12/2013 - 14:40
Posts: 10648
Location: (469219) 2016 HO3
Flashy Mike wrote:
beware the BLF X6, there was a batch with reprogramming locked by fuse. I don’t know if Banggood made a change afterwards, I haven’t bought this driver since that time.

I think they fixed it. As soon as I heard about it I sent a pretty strongly-worded message that they shouldn’t do that, for a handful of different reasons, including legal reasons (locking it violates the code license).

Some relevant parts of the license…

GPLv3 wrote:

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures … and you disclaim any intention to limit operation or modification of the work …

wight
Offline
Last seen: 1 year 1 month ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Flashy Mike wrote:
I built my last OTSM drivers in early 2017 (focused on momentary switches now) and couldn’t find any notes Facepalm so had to open a S2+ triple with this driver and see what I’ve used: [snip] Found 2 added ordinary 100uF X5R ceramic caps, connected to GND and Vcc of mcu. I measured them about 160 uf together. The driver is a BLF X6 with Attiny25. But beware the BLF X6, there was a batch with reprogramming locked by fuse. I don’t know if Banggood made a change afterwards, I haven’t bought this driver since that time. Btw – why do you think you can’t use the Attiny85?
Flintrock’s OTSMC Build Instructions say so, see my excerpt below. (My 85’s will be 5 years old next month.) Thanks for cracking open your build to share the info/pics with us. What gauge magnet wire (enamel wire) do you use? I keep meaning to order some but then I’m indecisive about what gauge to get. I think that 30awg is thin enough to be a pain, maybe 26awg?
Flintrock wrote:
All builds: It’s required to have BODS support for the mcu (see theory below). From page 36 of the manual this requires:
  • ATtiny25V-10SSU®, revision E, and newer (all known recent attiny25V’s) or
  • ATtiny45V-10SU®, revision D, and newer (all known recent attiny45V’s) or
  • ATtiny85V-10SU®, revision C, and newer (none have ever been seen, skip the attiny85)

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 01/14/2016 - 16:38
Posts: 1222
Location: Germany

As you can see in my code, I haven’t used this BODS option at all. I’ve checked all my Attiny25 that time and there wasn’t a single one supporting BDOS. Its a pity that I don’t even remember why I used such a high capacitance of 200 uF, might be because I wanted to be on the save side with lowest voltages, or because I fused BOD even without the BODS option. Can’t read the fuses now since I locked that mcus after programming Facepalm .
Anyway – I’m pretty sure your Attiny85 will work with OTSM and my code, at least without fusing BOD.

Regarding the wire: I’ve bought it decades ago, I guess at my local electronics store. I used it for my commercial prototypes that time. Unfortunately there are no specifications on the roll, only the price tag: 2.90 DM. This currency doesn’t even exist any more.
My caliper measures about 0.2 mm in diameter, including insulation, nevertheless this wire is pretty tough.

Lexel
Lexel's picture
Offline
Last seen: 6 months 4 days ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

I also found a fix for OTC, odd but works

2S lights with buck or boost have caps making the OTSM tricky or impossible
Solution flash 1S firmware 1uF capacitor with 680kOhms in parallel

The key is to get the drain of the OTC decoupled by thermal variable self discharge which raises a lot on higher temperatures, also using X7 or even X8 caps in bigger physical size like 0805 which are a bit less temperature sensitive

Lexel
Lexel's picture
Offline
Last seen: 6 months 4 days ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

wight wrote:
In no particular order:

various parties wrote:
Welcome back + links
Thanks for the welcome back & for the flashlight & lantern links!

To all the folks who showed up during my hiatus: welcome to BLF Silly I’m thrilled to think that anything I posted was still of use while I was away.

To all the folks who were already here – it’s really nice to see that you folks are still kicking!

MRsDNF wrote:
wight catch-up. Now that bought a smile to the dial. Welcome back. For those that don’t know wight also built a light or two that defied the laws of magic. Must go find the threads for a refresher.
I think that you’re confusing my builds with yours. Wink

Tom Tom wrote:
I think I fixed the OTC design some years ago and made it consistent, defined, analysable. Instead of a capacitor just dangling in the breeze. But it seemed nobody at the time was interested. Or perhaps felt threatened. I could discuss, but only in PM.
There are several obstacles besides dangling. IIRC the ATtiny25/45/85 thread contains some work trying to compensate for temp & voltage. For 1s lights the voltage divider may no longer create a problem for the OTC, but for 2s lights w/ a Zener or LDO there will still be a voltage divider messing with drain on the OTC. I generally prefer to discuss things out in the open so that everyone can benefit, but with that said sometimes it’s easier to get the ball rolling in PM. Feel free to drop me a PM where we can get our thoughts together.

The capacitor recommended by Flintrock for the OTSM solution is expensive and it would certainly be nice to avoid it!

Flashy Mike wrote:

OTSM is absolutely reliable, pretty simple to handle, no “raw assembly code” required! This is the proof-of-concept code I sent to Mike C on request almost 2 years ago. I would have given it to anyone here who had asked but sadly there was no interest.

Try it!

Thank you for sharing the PoC! Hopefully the idea will get more traction now with a compact demo available. LOL I don’t have a 25/45 right now, only 85, so I won’t be able to try it right away. I’ll try and pick up the necessary bits on my next parts order. Did you or Mike C look into component selection? Flintrock recommended a $1/ea capacitor w/ legs which looked troublesome for hand soldering/rework. A bulletproof offtime solution is worth $1, but less expensive is always appreciated, especially if anyone mass-produce a driver using this technique.

Boaz wrote:

Joshk wrote:
Hello. Who the heck are you? Silly

  Wight is so old …

  he wrote the original low/high sos/strobe next mode memory driver

Boaz caught me. It was I who released that scourge upon the world. When my secret finally leaked I couldn’t face the forum for years! Silly Silly

Joshk wrote:
I remember back when I joined, people were talking about the missing “wight”. Smile Here’s my catch-up. Maybe I am wrong. I think the hobby has changed. As I understand, years ago the average person expected Alkaline/light-bulb performance, so showing them a lithium/LED flashlight was a mind-blow. Everyone had fun. Now there are lithium/LED flashlights on every retail shelf. And while it’s will always be possible to out-perform a mass-produced light, it takes more money and effort than ever to ‘wow’ the average person. The “Giggles” light for example is great for wow-ing people, but had to be built so absurdly big it’s hard to even think of an excuse to take it off the shelf.
The truth is that this was actually the situation long before I left. Shocked Still, there is a lot of bang-for-the-buck (as well as satisfaction) to be had with reasonable custom builds or customized budget lights.

Texas_Ace wrote:
Good to see you back Wight, while our times here did not cross your work was what heavily influenced the TA driver series (with the work of PD68 and DEL adding there share in the mean time of course). I look forward to seeing what you cook up now. Getting the OTSM working with some viable firmware would be nice for the time when clicky lights are required for example. Right now the only firmware that supports it is a bit too buggy to make widespread use possible and dealing with the OTC is a royal pain, having to deal with this right now actually and think I might just revert to a non-OTC firmware in order to solve the problem.
Thanks TA, I’m glad that you carried to torch! I hope that I’ll do some cooking, but no promises on that front. Step 1: build a couple of working flashlights out of my piles of supplies.

Right now I’ve got to get my work space up to snuff. In the intervening years since I left the forum my flashlight stuff has been packed, repacked, moved, etc. I’ve got a new hobby area now but it’s been in use for (and is currently in use for) other projects. So in other words… right this moment I should stop reading forum threads and go clean up! Big Smile

I have tested and sold about 100 OTSM drivers with a differet cheaper 50 cents capacitor, basically the good infineon FET and MCU make about 2/3 of the parts costs of FET+1 driver design

Still the OTSM firmware on some revisions caused me problems and possible some hidden bugs still present

Tom Tom
Offline
Last seen: 2 years 1 month ago
Joined: 09/10/2017 - 08:30
Posts: 1162

A cap is just a cap. In this application. Really. There is no special magic, and obviously the cheaper the better, as long as they are good. And store energy reliably.

BTW, other things can also do that nowadays, maybe better, and might be worth looking at.

Whether 100 uF is the right value, I don’t know, but it is a nice round number.

Bye the way, Flashy Mike has just posted some OTSM code that looks interesting. It is beyond my abilities to venture an opinion, but it already looks much more plausible than Flintrock ever managed.

Ronin42
Ronin42's picture
Offline
Last seen: 1 year 6 months ago
Joined: 12/17/2014 - 22:17
Posts: 1760
Location: Alameda, CA

I understand wight is back.

Welcome and thanks for the help before you left. Smile Beer

As for the rest I’m confused but happy because I know wight understands.

“wight is back, (A bump to BLF’s IP quotient)”

(“It’s good that most people can’t remember their previous lives. Otherwise
things would be a lot more complicated than they already are.”
Ajaan Lee Dhammadharo)

eas
eas's picture
Offline
Last seen: 1 year 3 months ago
Joined: 07/14/2014 - 18:53
Posts: 1363
Location: PNW
Tom Tom wrote:
Bye the way, Flashy Mike has just posted some OTSM code that looks interesting. It is beyond my abilities to venture an opinion, but it already looks much more plausible than Flintrock ever managed.

What are you talking about? Flintrock managed a full-featured Bistro firmware rework with support for OTSM and OTC that has been used successfully by multiple members of this forum.

I may be mistaken, but I don’t think Flashy Mike’s firmware has similar levels of adoption, at least not at this point.

Tom Tom
Offline
Last seen: 2 years 1 month ago
Joined: 09/10/2017 - 08:30
Posts: 1162

eas wrote:

What are you talking about? Flintrock managed a full-featured Bistro firmware rework with support for OTSM and OTC that has been used successfully by multiple members of this forum.

I may be mistaken, but I don’t think Flashy Mike’s firmware has similar levels of adoption, at least not at this point.

Go back to post #38 and read on from there.

Flashy Mike has only just shown us his code, so it’s hardly surprising that it’s not been “adopted” yet.

Lexel
Lexel's picture
Offline
Last seen: 6 months 4 days ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

I see no problem in easier and more reliable OTSM code

if the Off detection works well enough 47uF is more than enough, the discharge down to 2V takes way longer than you ever need for medium presses

on Buck and boost drivers the off detection is a problem as thiose got input capacitors, not sure how this can be handeld, but it srewes OTSM often enough depending on hardware

Pages