Attiny25/45/85 FW Development Thread

TK, the F35 is pretty a sweet little light. The host may still be on sale for $15. There is a ton of space in the driver compartment. You would just need to rig up something to hold the momentary switch. You could use plastic, wood, copper, sugru, etc.

I wouldn't use a long post switch like below. Just stuck it in there to get the concept across.

Yes, sorry, been tied up - no progress. I'll pm you today, later.

Hey guys, I finally got an AVR Dragon so I can do HV programming. If any of you have bricked chips you want reset you can send them to me and I'll try and fix them for you (no cost, just shipping).

I've got a few more projects to get out of the way then I'm going to flash my beta firmware from a month or so ago and see if it actually works...it built then, but I never had a chance to try it.

Which variants of the Attiny45 and 85 are you using? Are they the same package size? I’m going to see if I can fit one of them on my new driver

Attiny45 and 85 are only available in a wider package. But by bending the legs under, it can be made to fit on board meant for attiny13.

I was going to see if I could fit the pads so you wouldn’t have to bend the legs

Here's what I would lovingly call a "ghetto mod" 17mm FET + 7135 driver. It's rough around the edges, but it should work for those of you who are early adopters. Still lots of edge clearance.

Oshpark Link.

So which package size did you use, Richard?

That's the SU instead of SSU. Longer legs, same pin pitch, and room for a much wider body as well.

Ahhh, cool!! Thanks Richard! I gotta order some - do you think it's fairly low risk, meaning good shot at working well?

Yeah I think it's low risk for functionality, but high risk for being ugly. Good thing is that nobody will see that side. ;)

^ Nice to see this board RMM. The pad for MCU Pin 1 looks really close to the FET gate pad. Seems like solder may bridge the two pads.

The Oshpark render looks tighter than it is. It is close, but not that close.

I created a 17mm mosfet +1 7135 meant for attiny13/ 25/ 45/ 85 (150mil / 208mil). It should have clearance for a programing clip. I’m planning to order a set to test out, then I’ll be happy to share it on oshpark.

LFPAK56 mosfet (for the popular NXP PSMN3R0-30YL), 0805 pads, small pin3 pad for an e-switch, OTC. Could also be used for e-switch + tail clicky lights like the EagleEye X6R.

Just ordered the 3 min for now. Hoping the 25's will be enough memory anyway, but you never know til you start adding. Just hate to waste time trying to save every byte - been there, done that years ago, back in the Z-80 days.

Haven't started yet on expanding modes and config options, but I much prefer an e-switch for doing an advanced UI, and so far, the timing at 8 Mhz is dead on and needs no calibration.

I gotta look into the benefits/features of the ATMEL AVR Dragon. Richard - I should just send you the 10-12 bricked 13's I have though - I will probably have no need for them anyway.

Aww… but that’s half the fun! It’s like sudoko, or haiku, or trying to say something meaningful on twitter.

I figure nearly everything important can probably fit onto an attiny25v, though it’ll still need different firmwares for different types of lights or different styles of interfaces. And the attiny85v can probably fit nearly everything into one build.

But for some other projects, I’m using an ATmega32U4. Like, modding the firmware on a new keyboard.io whenever it shows up. Aside from basic stuff like modifying the keyboard layout, I think I can also make it run my old “water” demoscene effect on the keyboard LEDs. Only 64 pixels, but each one is individually-addressable with an RGB value. Partial derivative vector calculus computed at each keystroke! :slight_smile:

All sounds good! Yikes, done a few things with pixel addressable displays a ways back too - financial systems with those old style big board displays, early early rev. RGB graphics controllers. Worked on a few 2D graphic plotting systems as well with actual line drawing built-in!

Gotta go open up my BLF Manker A6's - just got a 3D and 5A in today. The 3D so far looks good - came apart easy at the threads. The threads and tube look good so far, boxes are excellent. Very hard to tell % wise what the real deal is - lots of issues reported, but who knows if it's common or 1 out of 50, or how bad the issues really are. I'm not too concerned - I really bought them just to see it all come together, and how it fairs, first hand. BLF is really breaking some new ground with this GB. I was never found of the A6 style host itself. Had a couple early ones, before Convoy sold them - wasn't happy with working with them, but that could have changed - was my early days of modding too Wink.

Just back from my one month computer-less vacation, not read through everything here so you might all be set by now…

I have working firmware for the 85 (I use the 85V 10SU version), but it’s not really sharable as it’s for my own specific driver design that uses different pins for everything. While I was gone my new driver board came from OSH Park where I’ve done some major changes I need to test before making available. Sharing one without the other is a little pointless because it’s all based on different pins, and I still have an 84 based project I want to complete.

I haven’t yet used the temp sensor on the 85, but I have on the 84. Seems to be reliable enough for overheating protection, providing you don’t need to be totally precise on the temperature. I’ll be setting mine with a margin for error. Once I’ve got the new 85 design built with components I will make the necessary adjustments and try it out. Registers are different between the 84 and 85, so I’ll need to tweak a few things.

On the 84 I’ve done some testing with a temperature controlled mode, meaning that the light gradually fades as the temp rises, trying to stick around an average temperature. I just did some quick testing, I’m not sure it’s worth the hassle completing. As mentioned earlier in this thread the temp characteristics of each light are so different that there would have to many calibration variables to actually be useful in any other light that the light it’s developed on.

I did read early on in this thread about the need for calibration and why not just stick to the turbo timer. Well, the turbo timer can be reset repeatedly offering no real temperature protection. I’ll still be using turbo timers but will be having an additional temperature controlled step down that can not be overridden by mode changes or turning it off. I’ve had a light almost start a fire in my backpack, so I know they can get pretty darn hot.

In some other thread (I think STAR) someone asked about holding the switch during start-up for hidden functions. I don’t know if that got answered, but I’m doing this on all my 84 and 85 based projects to access hidden features and mode programming stuff. However, I don’t use pin interrupts as I’ve seen on STAR versions. I run the WDT interrupt at the highest speed and check if the switch is pressed just as I’d check the voltage on the cap for startup or the battery level in the while(1) loop. It makes the logic so much easier.

Here is my first entry into the Attiny85 crowd. It’s built specifically for the Eagle Eye X6R (That’s why those three big vias are there), but I don’t see why it wouldn’t function in any other 20mm application. I’ll share the actual oshpark link once it’s completely finished.

I don’t have hardware yet, but the plan I’m going with is to let the user calibrate the temperature cutoff. Basically, run in turbo and save the temperature value every second or so, until the user turns the light off or presses the e-switch. From then on, that value will be what it uses as a maximum temperature. I think this will be an easy and effective way to make it work for different lights and different preferences.

As for the switch, I’ve also been planning to ditch the switch interrupt, because it takes a bunch of extra room and seems to make the code very fragile. We don’t exactly have a proper threading library on the attiny… so, I had also planned to go the WDT route.

But I’m starting with clicky-switch code and a small attiny25. E-switch stuff will have to happen later.