Attiny25/45/85 FW Development Thread

wight wrote: . . .

  • First of all, looks like neat stuff. As you all know, any move to physically larger MCUs is a pain for the CAD folks – so I tend to resist that change. If it nets us nice thermal protection features though, I’ve got to be game! As usual I’d prefer to try cramming in the 20M1 package with ISP headers for programming. . . .
  • Tom E – did you ever get a handle on the calibration points you wanted? 0c and 100c are easy to reliably achieve using ice-water and boiling-water so those are common at-home calibration points. Atmel bins some chips (not the ones we buy) for 105c and 125c, I think it’s fair to say that all of them are going to be OK at 100c long enough for a one-time calibration routine. Just throw the light in a plastic bag and drop it in for a while, right?
  • I wonder how much better an LDO driver would fair with the stuff mentioned in post #601 by Tom E. I did publish an LDO driver a while ago – it’s probably suitable for testing. A17DD-SO8+LDO

I've been pushing for keeping the SSU footprint on the boards and just bending the legs. It really makes it easier to position the programming clip and the hold is much better. Those that have tried it have reported positive experiences so far.

I don't think temperature read calibration is worth the effort. Each light is going to behave differently anyway due to many factors. User adjustable seems the best approach to dealing with all the variables.

I think you may be on to something with LDO, I've been putting my 25/45/85's in buck and LDO (at opposed to zener modded) DD drivers and haven't had any issues yet, but I'm also using an older version of Tom E's FW for the 25/45/85. Unfortunately, the LDO I use is for 2S and higher cell arrangements only.

EDIT: Another benefit of bending the legs (which is easy) and is that the MCU stands higher. It allows low profile components like resistors and small caps to be placed right up to the legs, if necessary. Resistors could even go under the MCU.

Oh boy, now I'm behind... Latest Narsil is on my google drive - posted share earlier?? It's all renamed though to Narsil - it uses your header files though.

This should get you all the files: https://drive.google.com - full set of Narsil files. I'm think'n I had updates of Dec 12th, very minor maybe, maybe no change at all... Don't have access now cause @work.

I never did anything bout temp cal. TK has a pretty good solution though in Bistro, and didn't really explore/work with it yet. I'd probably lean towards dropping her implementation in to my code base.

The bent pin thing works well for me so far as well, though not liking the narrow pin contact - seems vunerable for solder issues.

FWIW: After carefully calibrating a thermal ceiling on one driver, I tried the code on another driver… and it started stepping down at room temperature. It seems there is significant variation between individual MCUs.

So, I built in a runtime config option for it instead. Turn the light on at the highest level, read and save the temperature once per second, and when the user decides it’s too hot they can turn the light off. This becomes the new thermal ceiling.

The tricky part is getting heat to the MCU quickly enough for it to be a useful measurement. The MCU is usually surrounded by a buffer of air, so heat travels slowly. It would probably be a good idea to stuff some thermal-conductive foam between the MCU and the pill. This wasn’t an option for the X6/X5 though, so instead I gave it a really strong lowpass filter to keep the regulation from bouncing due to thermal lag. It works, but unfortunately makes the regulator pretty slow.

It’s debatable whether thermal regulation is even relevant for such a big copper pill though, so it also has an option to turn regulation off. The first two seconds of thermal calibration mode only have the light on a dim mode, and if the user clicks during that time it sets the ceiling to 255.

I’ve gone one step further. I made my own footprint for the 85 with bent legs, it’s a little smaller than the original 13A footprint so it gives me even more space. It’s verified and working on several of my boards.

I do. I do a single point calibration at room temperature, simply because I like to know the temperature that the MCU is at. Once temp is calibrated I do the routine that Toykeeper uses to set the max allowed temperature. I don’t have to do a temperature calibration for that, but as I have temperature readout (in Celsius), it is worth it for me. I’ve seen up to 15 degrees Celsius differences between MCUs at the same room temperature.

^
Good stuff Mike C

First off, you know a whole lot more than me on pretty much everything Electronics and FW. So I defer to you by default on pretty much anything you say.

Second, Great idea on the legs. I do find that if I push the legs (push on the inward arch above the "foot") all the way until they touch the chip, the legs barely make contact with the SSU footprint.

Third, That room ambient temp calibration idea makes sense.

EDIT: I just remembered that I have done the same thing regarding the SSU footprint. I was working on some boards (LDO bucks and LDO DD's) and did the same thing but only extending the inside part of the padst. Now that you mention it, I should bring in the outside part of the pads too. Thank you again. :)

I’m about to place a mouser order and haven’t kept up with the testing for awhile. Is there a reason to buy 45’s vs 85’s or vice versa? Are the ‘v’ versions necessary?

45 vs 85 is just a matter of space and cost. I figure I’ll mostly get 85-based drivers because I don’t see much point in the 45.

My non-v 25 driver seems to work fine, but a v version should in theory let it work at somewhat lower voltage. The non-v might die before LVP finishes activating. I haven’t tried one below 2.7V, so I’m not sure exactly how low it’ll go.

I thought I remembered someone having more trouble flashing either 45 or 85 at some point but I can’t remember which. I’m only planning to order a few so cost isn’t a huge issue, should I just go with 85v’s?

I suspect that if you decapsulate the two chips, you will find that they use the same chip die inside…

I’d recommend plain 85. 45 is pointless, same package size but less code room. I’ve actually seen 45 be more expensive in some places. So far no one has shown a need for the low voltage “v” versions. And they are a good bit more expensive.

TK (or anyone who knows) -- I thought there were some issues with the X6/X5 Rev 2 ATTiny25 based drivers. I had to double up the 10 uF cap or add another cap after the diode to get it working reliably at high amps. Was that a problem? If so, how was it solved?

I thought TK mentioned this a while back - was anything done in hardware to the drivers that shipped? It couldn't have been a firmware change because they shipped it with the October version.

** For the 45/85 issue - I agree, for same cost go with the 85. I bought my last 85's from Richard.

sub thanks

There was an issue. The driver would reboot when the FET went from 100% to 0% on a full high-amp cell. Some sort of power spike was knocking it over.

Some people worked around this by using ~20uF on C1 instead of 10uF. And I suggested this to Manker.

However, I never heard anything about how they fixed it. It works now, but I don’t know what changed.

(not to imply there has been any direct contact… because there hasn’t… communication has been an ongoing issue)

Ah, ok. That's exactly the problem I had, sounds like, and think it was only me that tried the doubling up of the 10 uF cap to fix it, originally.

I got 2 of the 3 X6/X6 rev2 sets I ordered, other might be here today or tomorrow. Was wondering because I didn't see any obvious changes, but dunno how to tell what size cap they used. Didn't get a good look at the driver yet - wires were not long enough to fully flip over the driver and was hesitant to unsolder the LED leads. They could have done the cap thing or maybe found a FET that didn't cause as bad a spike.

On that board, the bleeder resistor, cap, and LED+ wire are all done with one solder blob - kind of nasty to work with.

Ahhh ok, all about caps.

I removed the supposed 10 uF cap off the new SS/Cu X6 driver and tested it. It reads about 11.5 uF consistently, while a 10 uF cap reads about 9.6 uF consistently. So, pretty sure they changed the 10 uF cap to a 12 uF, or possibly 14/15 uF. Only ones I could find in 0805 size were 15 uF at +/-20% tolerance, but they might have found a 12 uF in that size.

This could be all that was needed to fix it.

TK,

Whould ATTINY25V-10SU be okay you your firmware ?…i`ve found those at a rofl price arround here

Also, could the threshold temperature be preprogramed, not used defined?

The SU should work fine, but it’s bigger than the SSU. It might not fit onto the usual driver layouts, or it might need its pins bent underneath.

The temperature threshold can be defined in the code (and already is), but I’ve found individual variation between attiny units is generally too wide to make a “factory default” very useful. I calibrated one carefully, flashed the same firmware on another unit, and it started stepping down at room temperature.

Thanks TK!
Will i meet any issues using Attiny 25-20SSU instead of 10SSu?

I doubt it matters much. The data sheet says they’re the same package but 10SSU runs at up to 10MHz with a voltage down to 1.8V, while the 20SSU runs at up to 20MHz with a voltage down to 2.7V.

It’s usually abbreviated here as attiny25 (20SSU) versus attiny25v (10SSU).

Most drivers are using the lower-voltage version, attiny25v. But I have an early one from RMM using the non-V version, and it seemed to work fine too. It just runs the risk of failing before LVP is complete. I don’t know what happens if the attiny voltage gets too low to function.

Last night I tried a Attiny85 on a PD68 Double-down 17mm board for the first time and couldn’t get the 0.1 uF cap across the MCU grnd and VC pins to fix the problem. Also adding the stacked 2nd 10 uF cap didn’t work as well.

I’m testing the driver on the bench, even using a low performing under charged TF Flame cell, and the highest level modes don’t work, and strobe modes don’t work as well (strobe uses full FET). Not sure if it’s just FET full mode, or also the 30%40% 2nd high mode also. I’ll try another 0.1 uF cap to see if it’s just the cap could be.

Boy, sure wish there was someone helping with this trouble-shooting of the 25/45/85 problems. Yes - I’m begging for help again. Also wondering if anyone else is having these problems. Not sure if no one else is working with these MCU’s or just being silent on it.

This behavior of losing all high FET modes is one type of failure. The other is more subtle, where changing modes seems to work for a while then, occasionally resets the MCU - I can tell because in my Narsil firmware, I blink twice with low power on startup.