Attiny25/45/85 FW Development Thread

Well I'm going to have to order an assortment of caps for the sake of science and maybe even build a light. I don't like the power saving I programmed in bistro now. It's too unreliable with 16ms minimum watchdog idles. It needs 1ms resolution to make sure it's always engaged when you need it. I think I have code for that too using the internal clock timer, but it's a few lines longer and it would help if that other space savings trick works out.

I don't see any downside to recommending 5.0V LDO for 1S TA (non op-amp) style. It comes in both flavors probably no? Does 5.0V require a substanitally different part or it's just a choice in the series? If building a 1S tripple, I'd just buy the 5.0V and use it as if it's just a diode. Actually, I'd use the 1st gen board at the moment, because I know it works, but assuming the LDO works out (and does actually act like a diode), then 5.0V for 1S, and well, for tripple drivers also for multi-S. Yeah, 5.0 V for any TA tripple. Sure if you ordered a bunch of 3.3's for other builds they might work ok too, but you usually know what you're building when you buy the part. 1S op-amps are a different issue. I'd use whatever is best for the build. It's the same effort either way.

You can use a normal diode on the TA drivers for 1S operation but like I said, I am not worried about them directly. Anything that works on the new driver is backwards compatible. So all development should be focused on the new opamp driver as that will be the long term winner here.

I can’t really think of a reason to use the TA series anymore once the opamp is working as it should, while they basically do the same thing the opamp will be the better one to use due to it fitting in lights easier and being more adjustable. Plus it could be machine made for group buy lights / cheap mass produced driver option compared to the TA series which would not work well outside hand built setups.

This is the driver planned to use in the Lumintop SD26. I took a 30mm LDO and converted to std diode setup. I think it would work. I added a wire jumper and a 0 resistor to make the connection of Batt+ to the MCU and C2. If anyone gets a chance, can you review/comment? Thanx!

Basic parts:

It should work like that. I think I actually said in the TA thread that you could put the diode across the far inner set of LDO pins facing towards the MCU and it would work fine.

The way you did it would be fine as well though, same thing, different placement. Although I did figure out a way to remove those jumpers but can’t bring myself to update all the drivers with the minor change when I have a new driver in the works that should render LDO versions of the Texas avenger moot.

K, thanx!!

Oh regarding the 1.1V, no that won't work with this bistro OTSM implementation, unless you want to make a separate pin for power-off detection and voltage divider. Presently the divider voltage needs to be logic high. For 1S the only practical way to make that work with constraints on the ADC is to use Vcc "reading" , and then for 2S use Vcc/LDO-referenced (not 1.1 or 2.56) reading of the divider. It will just be a define to switch.

It's certainly possible to make a purely ADC-based implementation. It's a rewrite of bistro's adc system, not just changing a couple of initialization registers or the name of an interrupt. It won't perform quite as well either, maybe a little because the ADC uses a little more power on these BODS scales, but even more because you lose the possibility to wake on the power-on signal. Instead you only wake on the watchdog timer, which, to save power in BODS, is presently set to 0.25s intervals and is thus too un-responsive. You'd need to lower it to 0.125s at least, requiring maybe 50% more power draw in the sleep loop and still being I think noticeably less responsive (based on my non-thorough observations of that setup). So I'm not really seeing that as the direction to go in, but it could be something to try.

I'm not sure how well the 3.3V 1-S Op-amp OTSM will work though. It's all going to depend on the quality of caps we can find. There seem to be options in things other than ceramic, but anyway, it just needs searching and testing. Specifically leakage should be less than 1<uA, and that doesn't really fit with specs on Ta Ta-Polymer, NbO, but comments I find are that real world results are much better than spec.

Worst case a 5V LDO could be used in the higher voltage drivers, it would remove a lot of the point of having these mass produced though if that was to happen. The sales pitch for someone to mass produce these is that they would be the one size fits all driver for anything.

Good news is I've saved a TON of space (by attrition mostly). This is presently looking like it will be even smaller than the last version. The bad news is I'm presently noticing that it's not working well (or maybe at all) on high modes. I'm not certain if that's something new, or just something I hadn't noticed. Hmmm... something to try to understand still. Obviously that would be no good.

well.. ok, not smaller than the last one, but still 140 bytes left over for now.

very nice, the more space the better, we will always find a way to use it!

Yep.. Anyway, high is working, just not well. hmm, hoping it's a pin setting thing. Not sure. Mostly I haven't used turbo because the star isn't heat sinked. So will have to figure this out. The led shouldn't be able to drain C2, and if anything should help. Well I've got at least one idea to check so we'll see.

I don't know the cause of the high mode thing yet. Haven't had a chance to do any testing. I realize that one thing my power measurements missed, well that's the wrong word... they measured the mcu power draw. But there can also be a reverse current through the diode (I was feeding power forward through the diode so didn't measure that). I checked the specs on the diode in your digikey basket (likely the one I'm using, but I'm not sure) and it's not very good:

http://www.diodes.com/_files/datasheets/ZLLS410.pdf

At 25C it's around 1uA or less but at 85C it's around 80uA maybe. I wouldn't think my board is getting this hot (not sure, it's hanging in the air without a case to heat sink too, but it also has no led to heat it up), but it would only have to be 5ua to have the kind of effect I'm seeing. It's another case where I don't know how conservative the specs are. If it causes this issue or not though it's probably not ideal anyway. This would be a better choice I think:

http://www.onsemi.com/pub_link/Collateral/RB751V40T1-D.PDF

With the graphs indicating around 1uA at 85C. That diode is a bit fragile in comparison but should do the trick (with an R5 installed to protect it).

Of course all this brings the question, how good is the LDO at reverse current blockage? I lost the link to your new LDO. uA are small. Can it really work without an inline diode?

Psst…
Debug>>Properties>>Toolchain>>Optimization

Edit: Hmm. I guess I was reading an old post when I saw Texas_Ace was using a Linux virtual machine to compile with optimization.

Interesting points on the diode reverse voltage. If you find a better one that is obviously easy enough to change out. Although the LDO would be better if it works.

The latest LDO we have found is the LT3009, the real issue with it is the rather scarce availability compared to other options.

It must have been an old post. I do use Linux now (in a virtual machine simply because I don’t like having to walk over and use the Linux box lol).

Atmel complained constantly about things, Linux uses the same exact files and compiles it without any issues and the final size is smaller too boot. So I now just use that.

Yes, I know the -Os option. I'm well past that level of tricks now I hope, but it's a good tip thanks.

So, I took some measurements. At 3.3 V I'm at 8uA in sleep measured through the usual power chain, so the same as my much older tests in similar configuration. But I before I measured that I happened to be measureing at 4.2V which put me at 10uA, ok fine. But if instead I connected direct to Vcc, powering C2 directly with 500 ohms bleeder to ground upstream of the diode (the amount of resistance there really doesn't matter for diode reverse current since all the voltage will still be across the diode) then I got about 11.5uA. Ok, no big deal, seems like maybe there's 1.5uA of reverse leakage through the diode.

But I had taped a thermocouple to the diode body, and heated everything up (starting at 22C). By 55C it was 20 uA and by 70C it was at 33. Actually I stabilized at about 75 and took those numbers as it cooled because that seemed more stable than while blowing hot air on things. One time I cranked it up to 85 because the spec sheet has a line there, looks like aroun 70uA maybe on the spec sheet, and sure enough, it went off scale, somewhere pegged past 50uA. So it follows the specs pretty closely actually.

I'll look up your LDO, but this could be a real issue. I'll also try to see how warm things were getting on my high mode because I'm not sure yet that these are related issues. It's all I came up with so far though and it kind of checks out so far.

Oh, and I ran the same test powering it with forward current through the diode (with the bleeder removed), the normal way, and heating it, and the current did not go up past 12uA. Actually it dropped a little a few times, but came back to the same point. So I think that's pretty conclusive.

This backside powering is actually pretty handy because you can pull the wake pin up and down and trigger the interrupts at will while watching current. It's easy to setup too because you just power it through the Vcc pin on the programming clip.

I am not sure I am following exactly.

So the diode is leaking a lot more then expected but it doesn’t seem to actually effect the driver in real world use as you only get 12ua?

What is the new powering approach exactly, you are powering the MCU after the diode?

"real world" is still unknown. The diode is leaking as much as the spec sheet says it does, which is quite a lot at high temperature. Powering the mcu from downstream of the diode allows me to measure the effect. Powering it from upstream does not, because my power is going through the diode anyway. The fact that I see it one way and not the other, just confirms that the temp effect is the diode and not something else. However during sleep, the mcu is powered from downstream of the diode and the leakage will be a problem if it's hot. So yeah, that could definitely be a real world issue, and at those current levels, a pretty big one. I don't think 55C is unreasonable to expect and that's already going from 12 to 20 uA so that would impact turbo performance on this diode. I suspect your LDO is worse.

However, I just teste this setup on turbo (2A limited though), and it rises a degree or two just if I set the board near the star, and leave it a minute or so (which is as long as I dare anyway without a heat sink). So I don't think that's the issue affecting high modes at the moment. I suspect it could be a pin state thing, but I don't really know yet.

Ah, ok that makes more sense.