New 105D. replacing Nanjg-105c @ FT? (no stars!)

132 posts / 0 new
Last post
garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA

Ugh! I have a need to reflash 4 drivers and convert them to off-time memory with the added capacitor, but when I checked the lights I see they have 105*D* drivers installed! Ugh! I guess my best and easiest option is to replace them with 105*C*‘s? Unless someone can point me to a firmware that gives me proper off-time memory without the capacitor. What I am really looking for is to have “off-time memory” on a driver set to “no memory” (it makes mode switching much much easier!). I’m very much a novice with firmware code and flashing, so it would have to be easy for me to modify and reflash (I’m currently only using STAR & STAR Off-Time and only modifying PWM levels for modes).

-Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).
HarleyQuin
HarleyQuin's picture
Offline
Last seen: 3 months 1 week ago
Joined: 03/29/2013 - 04:47
Posts: 588

Hi Garry,
take a look at a relatively new firmware @Toykeeper has written.
It’s named “biscotti”.
Written for the 105D, offtime memory without cap by using brown out detection (BOD). And she crammed in all functionality the 13A with 1 kB can take.
You find it in Toykeepers firmware repository.
Just be sure to use the right fuses, there are reports of bad timing when flashed incorrectly.

EDIT: And take a look whether you already got the driver version where pin 5 of the attiny seems to be connected to ground. You might need to cut this for biscotti to work as intended.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA

Thanks HQ! Quick questions: does biscotti work with regular tailcap switch lights (as opposed to momentary switch lights)? Does the off-time memory function no matter how long the light has been off? (Though in my case it shouldn’t matter since I want “no memory” once turned off for say 2+ seconds.)

Can you give me some guidance (or point me toward some) for a simple-stupid here’s what settings to change, here’s an example flash command with appropriate fuses . . .? I’m not real savvy with flashing firmware and right now just modify my existing command-line avrdude “flash command” line of text I saved in a text file. I assume the code is easy to find where I modify PWM values for the modes I want. I assume I don’t have to touch anything else in the code (except maybe to toggle memory on or off).

I’ll check into it when I get more time.

Thanks,
Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).
gchart
gchart's picture
Offline
Last seen: 59 min 12 sec ago
Joined: 03/19/2016 - 11:57
Posts: 2883
Location: Central IL

Garry, biscotti and similar firmware use a trick (RAM decay on a NOINIT variable, explained by TK here) to accomplish OTC-like functionality. I can’t say an exact timing, but it’s around 1/2 a second. Anything shorter than that is considered a short tap (mode switching), longer than that is considered to be the light turned off. It works out really well for typical clicky switches. The only advantage, to my knowledge, of a proper OTC is the ability to detect “medium” presses (say, more than 1/2 sec but less than 1 sec).

Don’t get too hung up on the fuse settings, but the correct ones are necessary. Assuming you don’t need to play around with the code, just download the hex file from here and then flash it to your driver using this command:

Quote:
avrdude -c usbasp -p t13 -u -Uflash:w:biscotti.hex -Ulfuse:w:0×75:m -Uhfuse:w:0xFF:m

The above command was borrowed from TK’s flash.sh script, I’ve used it with biscotti and it works just fine. It works for most of the attiny13a drivers (105C, 105D, etc)

gchart
gchart's picture
Offline
Last seen: 59 min 12 sec ago
Joined: 03/19/2016 - 11:57
Posts: 2883
Location: Central IL

Also, mode memory can be turned off in biscotti (or is it off by default? I forget), which is what you’re looking for if I read that correctly. So if the flashlight is off for more than 1/2 second, it will start back at the first mode. This isn’t something you’ll need to change in the code, it’s user-selectable via button taps once you’ve got the light assembled.

garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA

Hmm . . I’m a little confused. Tell me this: Say I have the light set to have 2 modes (high, then low) with no memory, always starts on high from “off”. Say the user has the light on in “high” mode for a minute (or could be 2 mins, 3 mins, whatever, but much longer than just a few seconds) and that user wants to switch to “low” mode, will 1 “quick” half-click change it to “low” mode? Secondly, say the user turns the light off from “high” but 10 seconds later turns it back on, will it come on in high again?

Thanks,
-Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).
gchart
gchart's picture
Offline
Last seen: 59 min 12 sec ago
Joined: 03/19/2016 - 11:57
Posts: 2883
Location: Central IL

That is correct. The amount of time that the light is on does not matter, just the amount of time it’s off.

With mode memory off, whenever you’ve got the light off for more than 1/2 second, it will return to it’s first mode (high in your example).

Just FYI… Biscotti doesn’t have a 2-mode setting that starts on high, but there is a 3-mode starting on high (mode 6: 100% – 20% – 1%). I know it was an example, just thought I’d mention it.

garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA

gchart wrote:
That is correct. The amount of time that the light is on does not matter, just the amount of time it’s off.

With mode memory off, whenever you’ve got the light off for more than 1/2 second, it will return to it’s first mode (high in your example).

Great! Thanks!

gchart wrote:
Just FYI… Biscotti doesn’t have a 2-mode setting that starts on high, but there is a 3-mode starting on high (mode 6: 100% – 20% – 1%). I know it was an example, just thought I’d mention it.

Wait a minute, can I not set my own modes in the code like I can do with STAR? I’m counting on being able to customize the modes exactly as needed (balance of runtime & brightness for my co-workers use underground).

-Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).
chouster
Online
Last seen: 1 min 20 sec ago
Joined: 02/20/2014 - 15:05
Posts: 746
Location: germany

I didn’t like 105D’s either, until I modified the BLF-A6 code to have the OTC pin next to the GND pin. 0805 cap fits nicely across.

garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA
HarleyQuin wrote:
EDIT: And take a look whether you already got the driver version where pin 5 of the attiny seems to be connected to ground. You might need to cut this for biscotti to work as intended.

I just caught this “Edit”. I have pics of the backside of the drivers, but not the front (mcu) side. I’d have to desolder them to remove them to check. Well 1 is a Convoy M2 with a driver retaining ring; I could check that one easy. (Btw – I didn’t see any pics posted showing the trace that needs cut or any of the other issues.)

I’m thinking I’ll just plan to swap these drivers out with good old 105C’s. It’ll give me the chance to get the drivers done ahead of time without pulling the lights out of service for an extended period of time. Plus, it avoids the users being able to access a programming mode and change settings.

I just read the biscotti “instructions” in that Convoy C8 thread and see it’s a user-programmable multi-group driver.

-Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).
garrybunk
garrybunk's picture
Offline
Last seen: 1 day 40 min ago
Joined: 10/31/2011 - 09:25
Posts: 6098
Location: Johnstown, PA

I didn’t realize ToyKeeper had a version of STAR modified with the same “brown out detection” until RMM posted it here. I’ll proceed with trying this out so then I can set my own modes and not worry about another user mistakenly entering programming.

-Garry

My Bike Lights Thread, Optics (TIR) Comparison Beamshots, Diffusion Techniques

, 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).

Pages