Attiny25/45/85 FW Development Thread

Added 1st draft of a user manual in the same google drive share here:

https://drive.google.com- 25-45-85 stuff

It's a 2 page doc. Both PDF and docx formats are posted.

Update: Hope someone can take a looksy at the manual and tell me what you think. Tried to keep it short and to the point. Made a couple minor tweaks to timing values.

Lights w/85 new firmware so far:

  • SupFire MR-Z test light
  • Rocher AS31 (shipped out)
  • ZY-T11 clone w/XM-L2 T6 4C, MaxToch 26mm - does bout 1500 lumens
  • Another this eve: X6R

Got 3 lights now here with the 85V and e-switch firmware. For the X6R, I turned on the "OffTimeEnable", so I could use the fwd clicky tail switch. Actually, it works kind of nice. It appears the 2 blinks is in the mode rotation on the tail. So, I can enable 2 blinks when the light is powered up from the tail, or, I can set one of the regular modes as the power-up default mode -- interesting feature....

Really liking the battery voltage display - it's coming in handy. The X6R gave me some troubles. Apparently the PWM level of 2 for moon mode is not working on this 7135. Not sure if I installed a 350 or 380 - I was using both. I disabled moon mode for now, and even the low mode is pretty darn low on this light/driver. Hhmm...

^

I just read your manual. It reads easy and clear. Man, you have a lot of nice stuff in this FW. Can't wait to try it out. I was hoping to have by now, but I just been to beat after work this week.

I got my first 85 up & running last night, with the most recent version of TomE's code.

I had to up the Moon value a little, but other than that, it works well 'out of the box'.

At first I didn't expect the 'one-click-off' after the mode had locked in, as I was used to being able to step up & down modes like in STAR Momentary. A more thorough read of the manual clarified things for me...

I'm guessing if the line "#define IDLE_TIME" was commented out, the modes would not 'lock in', & you could step up & down the modes?

If so, could this be added to the config table easily enough?

I'm about to install this into a D01, can't wait to try it out in a light! :beer:

Yes, I believe so - commenting that out should disable it. Probably didn't try it. I'll review it once again. For that moon mode, I used the same value TK had, think a PWM of 2 - originally I used 3. I also ran into a problem with a X6R using 2, but think the X6R driver has a 380 7135. It's working fine on 3 other lights - I think they are using 350's. Do you think yours is a 350 or 380?

It's a 380, but the bench test led is an old XML, so that will have a bearing on it as well.

I ended up using a value of 4 to get it solid.

Hhmm... I really like the low-ness (is that a word?) of the 2 value. Stupid me didn't fully test it out before assembling the X6R, so might be stuck with no moon mode for a while. Too many other lights to update. Great though I can simply re-configure it to eliminate moon mode. Want to do a lot more of course - endless # of ideas. Also need to install TK's bistro and play with it.

I'm finding the 85 mod upgrade is going pretty smooth. Here's what I do for the FET+1 13A drivers to upgrade:

  • use my slow hot air gun (stamp heat tool) to remove the 13A MCU
  • bend the 85 pins in, try to keep them even - they bend quite easy
  • clean up the pads: use solder wick w/extra flux to remove old solder, clean up with isop. alcohol
  • dnld the firmware to the MCU (MCU is air clipped in)
  • use a decent amt of solder paste on the pads, then use my stamp heat tool to reflow the MCU on
  • I continuity check every used pin (6 of them) - sometimes find a poor pin contact, and touch it with the iron with solder on the tip to fix it up. Even with the bent pins, it's a real tight fit on those pads.

Thanks Tom E Iam really pumped about the Rocher AS31 will you do a seperate link for the build of the AS31?

Anyone have, or thinking of creating a 20mm FET+1 driver, preferably with 45/85 spaced pads?

I can do that if you want might have to wait till the start of next week tho.

EDIT: There is this

If you want anything special done just ask. 3rd PWM output 1 x 7135 + 2x 7135 + FET. Whatever

After getting a driver into a light & messing with testing it for the last few days, I decided to pop it back out & re-flash with a Moon value of 2. The LED is an XP L HI. It was brighter than I expected, but still a very nice usable Moon. I reckon I could have used a value of 1 & it would have been fine.

Oh - this was on a 350 chip as well.

Ahhh, that PD68 looks real good, in sizes of 17, 20 , and 22 with the 20 and 22 to fit 45/85's. Gotta order some - they will do for sure. Looks like no pads for zener or LDO, but zener should be do-able, not sure how to jury rig up a LDO - have to research/look around.

This?

Need a post #. Your direct post link depends on the "comments per page" setting.

#46

Just searched for this discussion as I’ve just come across a few things.

I’m working on my dual switch firmware that has multiple UIs and other stuff, and use a few noinit variables extensively. I’ve just spent the last three hours re-writing code to weed out bugs, but they just wouldn’t go away, like loosing E-switch, strange UI changes and so on. I’d only get these bugs if I was rapidly switching modes with off button, and as I have E-switch, off time cap and voltage monitoring on the same pin I naturally thought the bugs where related to this setup.

Then I remembered that I’d turned off the brownout detection fuses, so I turned them back on… and all bugs vanished. Notice that I did not get the bugs under normal operation, noinit variables where working fine, it was only when I started to stress test the mode changing a little that I started to get really weird behavior. So, depending on what you are doing, the brownout fuses can make a difference. Just thought I’d give you some heads up, because I was tearing my hair out until I figured this out.

That’s actually really handy to know about. I had also been trying to figure out whether brown-out detection was necessary. I’ve occasionally seen really strange behavior that I couldn’t trigger again on purpose, and I wonder if this might be why.

Wait, I'm confused. Even with OTC is it standard to turn on brownout detection? I' thinking I've seen flaky probs also with NOINIT, using th power switch to change modes but with my e-switch firmware, but really haven't tested it much. I got it on a X6R and a Y3 now.

Totally unrelated - Dale reported in TK's firmware thread I believe, a problem with high amps and a 25 MCU, think with multi parallel LED's. I'm having problems now with an 85 MCU with high amps in a FET+1 based driver in a SupFire M6: 4P cells with 3P LED's. I haven't narrowed/isolated the problem down, but seems to work fine on a poor cell like a TrustFire. I gotta begin to isolate it - could be anything to do with this driver at this point. It was fully working 100% with an older FET driver, and I replaced it with a 22mm FET+1. Did my usual careful continuity tests on this driver and all looked good. Also the driver tested fine on the bench with 1 LED. I could try:

  • wire up only 1 LED, not 3
  • replace FET (SIR800DP high performance)
  • 85 MCU? Maybe the firmware?

Dunno - symptoms when it flakes out seems to be problems with FET PWM modes, and seems like the MCU goes out to lunch - gets stuck in blinking state, etc. Maybe I should try turning on brownout detection...

To clarify, I’m using the noinit variables for variables that I’d like to keep track of during short to medium off presses (like mode programming and voltage under load). I do not use noinit variables for off time detection at all any more, I found it too unreliable (was getting 10 second decay periods on some drivers). I use the noinit for short term memory storage only, and found that I certainly need to enable brownout detection fuses for stability, atleast when stress testing.

If you are getting brownout errors during normal operation (i.e. cells are good/charged) you have more serious problems hiding in your driver/firmware/hardware.

Did you un-edit your post just because I quoted the original version instead of the edited one? … the timing just worked out that way — I hit quote, got distracted, finished my post, then found I had an out-of-date version. But now it seems to be re-edited back to the original.

Just curious. There are, of course, plenty of other explanations which have nothing to do with me. :slight_smile: