What would happen if I flash STAR off-time but didn’t have a capacitor in place? I’m looking for “off-time” memory during mode selection, but “no memory” once the light is powered off. Wondering if I can accomplish this without the cap.
, MTBR’s Lights & Night Riding Forum NOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
What would happen if I flash STAR off-time but didn't have a capacitor in place? I'm looking for "off-time" memory during mode selection, but "no memory" once the light is powered off. Wondering if I can accomplish this without the cap. -Garry
Usually, the result ends up being that every click is registered basically as a "short click", where the driver would advance to the next mode (not what you want).
Doesn't selecting "no memory" accomplish what you want, anyways? The off-time STAR with capacitor in place functions like you are describing.
But that IS what I want. When the light is on I always want a short click to advance modes. When the light is off & turned on I want it to always turn on in the first mode.
I found that regular “STAR” (on-time) even when set to “no memory” would require two clicks to advance modes because “memory” had set it. That was annoying.
Anyway, I just tried flashing STAR off-time to a 105D without capacitor and it IS working just as I wanted! Single-click always advances mode & always starts in first mode! (EDIT-see next post.)
My problem now is that I need reverse mode order which I originally planned to get by soldering star #3 on a 105C. Can I change mode order in the code simply by reversing the line entries to put high first? (I’m referring to the lines where I enter my desired PWM values – the only lines I ever edit.) Or are there other lines in the code to edit also?
, MTBR’s Lights & Night Riding Forum NOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
WAIT! My bad! You’re right RMM! Upon closer inspection it’s acting like a driver with “next mode memory” which is not what I want! Doh! So I guess I’m back to switching the 105D out for a 105C.
I would still like to hear an answer to switching mode order in the code though.
, MTBR’s Lights & Night Riding Forum NOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
WAIT! My bad! You're right RMM! Upon closer inspection it's acting like a driver with "next mode memory" which is not what I want! Doh! So I guess I'm back to switching the 105D out for a 105C. I would still like to hear an answer to switching mode order in the code though. -Garry
You can use ToyKeeper's "NOINIT" modification to the code that will give you off-time without the capacitor, so you can use it on the 105D without adding any extra parts (for best timing, also change the fuses to those listed in the initial code description). (it's in ToyKeeper's repository).
To switch the default mode order in the code, find this:
if((PINB&(1<<STAR3_PIN))==0){// High to Lowmode_dir=-1;}else{mode_dir=1;}}
Then change to this (or just solder Pin 3 to ground with the default code...):
if((PINB&(1<<STAR3_PIN))==0){// High to Lowmode_dir=1;}else{mode_dir= -1;}}
WAIT! My bad! You’re right RMM! Upon closer inspection it’s acting like a driver with “next mode memory” which is not what I want! Doh! So I guess I’m back to switching the 105D out for a 105C. I would still like to hear an answer to switching mode order in the code though. -Garry
You can use ToyKeeper’s “NOINIT” modification to the code that will give you off-time without the capacitor, so you can use it on the 105D without adding any extra parts (for best timing, also change the fuses to those listed in the initial code description). (it’s in ToyKeeper’s repository).
To switch the default mode order in the code, find this:
Thanks RMM! Perfect solution for me! Others previously pointed me toward “Bistro” with brown out detection and I didn’t realize ToyKeeper had a version of STAR modified with brown out detection as well.
, MTBR’s Lights & Night Riding Forum NOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
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.
HighEfficiency wrote:
Would there be a way to configure the LVT in STAR so that it would require a duration of low voltage before going into ADC_Low or ADC_Crit?
I’ve made a couple of lights that are temperamental with the LVT. A casual knock, or bump will trigger the LVT.
Any help here?
Doesn’t it already do that? In STAR it has a “lowbatt_cnt” thing so that it won’t step down unless the value is low several times in a row. You could slow it down just by increasing the number of readings required to trigger it.
I’m assuming this is the line of code I would change:
“if (++lowbatt_cnt > 8)”
A setting of 8 (default) would be 4 seconds and in this case definitely shouldn’t be tripping it. A brief bump is really only a fraction of a second.
I’ll try increasing the value to 8, 16, etc and see if that has any effect. Is there a max length of time that this program will accept ( say one or two minutes)?
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.
I would assume it’s probably fine up to 254.
If a quick bump trips it, maybe it’s not LVP causing the problems. Maybe it’s actually losing power and rebooting? Loose springs barely making contact? Firmware won’t be able to fix that.
That was my thought as well but one thing stands out. I have removed ADC_Low and only use ADC_Crit in my program. When it senses LVT it flashes 10 times then turns off.
The 10 flashes then turnoff is exactly what it is doing when bumped.
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.
No, doesn’t sound like a reboot. Could easily be a poor connection though. I’ve had false LVP warnings when something wasn’t connected well, and it was bump-sensitive.
What would happen if I flash STAR off-time but didn’t have a capacitor in place? I’m looking for “off-time” memory during mode selection, but “no memory” once the light is powered off. Wondering if I can accomplish this without the cap.
-Garry
My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques
, MTBR’s Lights & Night Riding ForumNOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
Usually, the result ends up being that every click is registered basically as a "short click", where the driver would advance to the next mode (not what you want).
Doesn't selecting "no memory" accomplish what you want, anyways? The off-time STAR with capacitor in place functions like you are describing.
Mountain Electronics : batteries, Noctigon, and much more! What's new?
But that IS what I want. When the light is on I always want a short click to advance modes. When the light is off & turned on I want it to always turn on in the first mode.
I found that regular “STAR” (on-time) even when set to “no memory” would require two clicks to advance modes because “memory” had set it. That was annoying.
Anyway, I just tried flashing STAR off-time to a 105D without capacitor and it IS working just as I wanted! Single-click always advances mode & always starts in first mode! (EDIT-see next post.)
My problem now is that I need reverse mode order which I originally planned to get by soldering star #3 on a 105C. Can I change mode order in the code simply by reversing the line entries to put high first? (I’m referring to the lines where I enter my desired PWM values – the only lines I ever edit.) Or are there other lines in the code to edit also?
Thanks,
-Garry
My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques
, MTBR’s Lights & Night Riding ForumNOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
WAIT! My bad! You’re right RMM! Upon closer inspection it’s acting like a driver with “next mode memory” which is not what I want! Doh! So I guess I’m back to switching the 105D out for a 105C.
I would still like to hear an answer to switching mode order in the code though.
-Garry
My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques
, MTBR’s Lights & Night Riding ForumNOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
You can use ToyKeeper's "NOINIT" modification to the code that will give you off-time without the capacitor, so you can use it on the 105D without adding any extra parts (for best timing, also change the fuses to those listed in the initial code description). (it's in ToyKeeper's repository).
To switch the default mode order in the code, find this:
Then change to this (or just solder Pin 3 to ground with the default code...):
Mountain Electronics : batteries, Noctigon, and much more! What's new?
Thanks RMM! Perfect solution for me! Others previously pointed me toward “Bistro” with brown out detection and I didn’t realize ToyKeeper had a version of STAR modified with brown out detection as well.
Thanks,
-Garry
My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques
, MTBR’s Lights & Night Riding ForumNOTE: Now hosting my photos from my Google account. Post up if you can’t see them. Older photos hosted on Photobucket or Flickr may disappear (PM me if you want access to them).
this one is for the 13A Attiny?
does 25 44 ones work too?
[Reviews] Miboxer C4-12, C2-4k+6k, C2, C4 / Astrolux K1, MF01, MF02, S42, K01, TI3A / BLF Q8 / Kalrus G35, XT11GT / Nitefox UT20 / Niwalker BK-FA30S / Sofirn SF36, SP35 / Imalent DM21TW / Wuben I333 / Ravemen PR1200 / CL06 lantern / Xanes headlamp
[Mods] Skilhunt H03 short / Klarus XT11GT, XT12GTS / Zebralight SC50+ / Imalent DM21TW / colorful anodisation
[Sale]
Drivers: overview of sizes and types
DD+AMC based drivers Anduril or Bistro OTSM 12-24mm, S42, 24-30mm L6, Q8, MF01(S), MT03, TN42
Anduril or Bistro 8A buck driver for 20-30mm, MF01/02/04, TN40/42, Lumintop GT, MT09R
UVC and UVC+UVA drivers
programming key
Remote switch tail DD board with FET
Aux boards:
Emisar D1, D1S, D4, D4S, D18, Lumintop FW3A, Fireflies ROT66, Astrolux MF01, Tail boards like S2+
Lexel – Yes this works for ATTiny 13A.
On another note:
Would there be a way to configure the LVT in STAR so that it would require a duration of low voltage before going into ADC_Low or ADC_Crit?
I’ve made a couple of lights that are temperamental with the LVT. A casual knock, or bump will trigger the LVT.
Any help here?
Doesn’t it already do that? In STAR it has a “lowbatt_cnt” thing so that it won’t step down unless the value is low several times in a row. You could slow it down just by increasing the number of readings required to trigger it.
Toy – as always, you’re a big help. Many thanks.
I’m assuming this is the line of code I would change:
“if (++lowbatt_cnt > 8)”
A setting of 8 (default) would be 4 seconds and in this case definitely shouldn’t be tripping it. A brief bump is really only a fraction of a second.
I’ll try increasing the value to 8, 16, etc and see if that has any effect. Is there a max length of time that this program will accept ( say one or two minutes)?
Big thanks.
I would assume it’s probably fine up to 254.
If a quick bump trips it, maybe it’s not LVP causing the problems. Maybe it’s actually losing power and rebooting? Loose springs barely making contact? Firmware won’t be able to fix that.
That was my thought as well but one thing stands out. I have removed ADC_Low and only use ADC_Crit in my program. When it senses LVT it flashes 10 times then turns off.
The 10 flashes then turnoff is exactly what it is doing when bumped.
That wouldn’t be a sign of a reboot would it?
No, doesn’t sound like a reboot. Could easily be a poor connection though. I’ve had false LVP warnings when something wasn’t connected well, and it was bump-sensitive.
Thanks for the help. I’m going to tinker with “if (++lowbatt_cnt > 8)” and just see if that makes for a quick fix.
Pages