I remember back when I joined, people were talking about the missing “wight”.
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.
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.
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.
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.
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.
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.
*/
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();
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.
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.
Thanks for the welcome back & for the flashlight & lantern links!
To all the folks who showed up during my hiatus: welcome to BLF 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!
I think that you’re confusing my builds with yours.
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!
Thank you for sharing the PoC! Hopefully the idea will get more traction now with a compact demo available. :laughing: 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 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!
The truth is that this was actually the situation long before I left. 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.
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!
I built my last OTSM drivers in early 2017 (focused on momentary switches now) and couldn’t find any notes :person_facepalming: 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?
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).