I have 5 pieces of Attiny85V ready for your new firmware. Thanks for your guys’ effort for us to have a perfect flash light what we want.
I should perhaps mention that the 85 firmware I’m coding is written with standard clicky button only in mind. I do have a few projects with both clicky and E-switches that I’ve yet to start coding (have all the hardware), but they all use the ATtiny24 or 84 which is a 14 pin chip.
14 pin chip is perfect for bigger light such as lantern and has more I/O pins to play with.
I’ll be posting threads about the lights when I get around to them… Ahh, so many projects, so little time… And heading for a PC free vacation week on Sunday.
Anyhow, don’t won’t to hijack this thread any more with my off topic clutter. I’ll make new threads when I have something to show.
As you have mentioned, it is hard to get a medium press precisely. I prefer to the original one.
Hi, I know this is way late… but I finally made a version of STAR which uses memory decay instead of a capacitor to measure off time. In case anyone wants it:
http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper/STAR_noinit/
It’s just STAR_off_time 1.3 with the OTC bits replaced by mem-decay bits. No other changes.
Shall I need to set the high fuse to 0xED instead of 0xFF?
I have just tested my build is successful and working well but with 5 warmings. Need not set the high fuse to 0xED. 0xFF is OK.
Hi, sorry, I forgot to include the flashing script and fuse settings. That’s fixed now, and re-published.
Thanks for doing this, I’m sure quite a few people appreciate it.
I played the STAR_noinit for a while. It worked perfectly with my QX5241 buck driver but it did not work with my CL6807 ( similar to PT4115 ) driver. The driver became no memory. I thought may be the 3.3V VCC to the Attiny13A from the voltage regulator is too low for the ram retention. I will replace with a 5V regulator to test again when I am free.
Any chance we can get a version of this with a hidden beacon instead of the hidden strobe?
Is there a standard beacon? I’ve never used a light with one. How long on, off, how many flashes etc?
I’m not aware of any sort of standard beacon, but there are a few I find useful… one is what I call a heartbeat beacon, which flashes in the following pattern:
- On 5ms
- Off 245ms
- On 5ms
- Off 745ms
- repeat
Another I find useful is a looping battery check mode, which flashes once for each 25% of the battery’s current charge, then pauses and re-checks and repeats. It’s more like 100ms on-time with 400ms between, and 2-3s between cycles. If left on for a long time, the number of flashes will decrease until the light eventually shuts off.
One more thing to consider is the brightness. A signal beacon should be pretty bright, but a “find the light indoors at night” type beacon should be dim. For the latter, one popular approach is a short (~3ms) flash at a moon or low level every 2s.
The one I use the most is a stutter beacon, used on a head light or tail light while biking or skating. It stays on all the time, but changes brightness to make itself more noticeable. The pattern I use there is:
- High 5ms
- Low 65ms
- High 5ms
- Low 65ms
- High 5ms
- Low 65ms
- High 5ms
- Low 65ms
- Low 720ms
- repeat
So, 4 brief high-brightness blinks and then it rests at low, and repeats at 1Hz. As for the levels to use, I’ve found that 40lm / 400lm works well, or 7lm / 150lm. There must be a pretty big difference between high and low.
This is what i was thinking.
Although would have to check the timings to see if they are suitable.
Do you want a hidden beacon instead of the strobe? Or a bunch of “strobe modes” including beacon modes, accessible after activating the strobe?
I was after a hidden beacon and no other flashier.
quick and dirty:
static void inline pwm_strobe()
{
while (1){
PWM_LVL = 255;
_delay_ms(20);
PWM_LVL = 0;
_delay_ms(90); // change the parameter 90 to up to 65535(ms you want the light to be off)
}
}
Ahhhh that’s great I’ll try that out after work! Thanks!
You would have to move the pwm configuration code up a bit as well, since you are using pwm here. You could just call strobe2(on, off) instead, with the values you want.