[WIP] 17mm DD+single-7135 driver / single sided / Dual-PWM

Sounds like the OTC is not discharging or at least that’s what the attiny thinks. Is it the same OTC cap as the other (working) drivers?

Yep

You could try ToyKeeper’s offtime-cap.c to check what OTC values it’s seeing. It’s in the battcheck folder in her repository.

I have the same problem in one of my drivers. I think I need to run offtime-cap on his driver and adjust the settings in the firmware. Hopefully this solves the problem.

http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper/battcheck/

Usually that indicates a hardware problem, but the offtime-cap.hex firmware can at least help diagnose things.

I measure the OTC a few times at 0.5s, 1.0s, 1.5s, 2.0s, and 3.0s. This provides a good estimate of the discharge curve, and the values can be plugged into code to select whatever timing you like. Here’s a graph of three different drivers measured this way:

The blue line is close to ideal.

Of course, if you get 255 every time, the OTC isn’t working at all. :slight_smile:

Yeah I think I might remove everything and rebuild the driver. Considering two different caps did the same thing, and reflashing did not help.

Or maybe just reflow the attiny.

I didn’t read all 286 posts… but perhaps this can be useful:

The stencil for Attiny:

actually, when I was starting with attiny85 I learned that the legs can very easily be bent downwards, it takes probably less than 1 minute

That means that the actual footprint for the attiny13/attiny85 can be smaller than official contact pads spread - if you bend the legs downward - the contact pads can almost all be under the MCU itself, not extending so wide around it.

That would save some space on the PCB

If you test with TK’s firmware and find that it’s simply discharging extremely slowly for some reason you could add a pulldown resistor from the MCU (ATtiny) side of the OTC to GND. High value, maybe 100k or something (I don’t know).

I had a driver with the same next mode behaviour, and it was due to OTC and R1 were spined 90 deegress.

v014 was never published, here it is. Untested (would you expect any different? ;-)). ” 17mm DD + single 7135 v014”:OSH Park ~ These updates are actually very old of course; I still haven’t done any updates to this board since I came back to the forum.

It’s got a star on the bottom which is hard to see due to OSH Park’s rendering. IIRC my star is barely within the OSH Park design rules. This is the same star I used on the A6 version, but apparently the Chinese fab wasn’t confident about producing it so they changed it to a more conventional / larger one.

I’ll note that the star is a potential dead-short hazard if you use a spring >11mm. If your spring is 11mm OD and you install it w/in the provided area you should see no problem. 12-13mm OD might fit but could easily short and a lot of care should be taken. What would anyone be doing with such a large spring anyway!?

I didn’t want to be left out. :wink: Here’s a simple expansion of the v014 17mm board to 20mm. ” [untested] 20mm DD + single 7135 v001”:OSH Park ~

sub thanks

wight - was there a v013 in the 17 mm version? Latest I thought was v009, as in this OP. Could not find a 013 on OSHPark under your name, but Dale posted a v013 version. Any other changes of note between x009 and v014?

That’s a fair question Tom E. The answer is I don’t think so. I can’t be positive of course.

v009 - last public release
v010 through v013 - all marked “group-buy_with-star”
v014 - schematic cleanup

v014 should be identical to v013. The Chinese fabs tweaked v013 a fair amount so most folks probably haven’t seen a ‘real’ v013 I think. Sending over the gerbers for v013 was probably my last involvement with the BLF A6 group-buy and I haven’t reviewed exactly what was changed for cheap-fab production. Obviously the star is different. I think silk was also changed.

v014 vs v009: Looks like the exposed copper was expanded a lot on the edges , the star was added, bottom silk now reflects the “A17DD-L” nomenclature vs the earlier name, the spring pad was changed significantly (hopefully to support common spring sizes? or maybe just look snazzy? who knows :-(), and consequently lots of silk locations were tweaked slightly on the top and bottom.

Do you have a link to Dale’s pic? I always enjoy looking at the built pics. I don’t think I have any v013 or v014’s here. I’m certain that I have not built one.


EDIT: I think that v14 is intended to be easy for 5mm or 11mm springs.

  • The OD of the inner spring pad is 6mm, which should be decent for 5mm springs/buttons or workable for 6mm brass buttons (doesn’t someone sell 6’s?) I wonder why I didn’t add some 0.5mm centering indents to help 5mm items stay put? Probably just because Eagle makes it a pain.
  • The ID of the four outer spring pads is 5.5mm. That’s probably a (big) stretch for 10mm springs but I think that it should be a good/decent fit for the 11mm OD springs. Clearly this isn’t suitable for mass production with the star there, but for hand assembly I think that the 4 point setup should provide an easy-to-build and attractive setup. I stand ready to be proven wrong of course.
  • To me this thing doesn’t seem very friendly for 8mm OD springs at all. There’s plenty of copper to scrape in a pinch. I’ll continue to think about how to make it attractive looking and have 8mm guides. I’m a slave to form…

For those who aren’t clear on why the OD of the pads are actually larger than the OD of the spring - it can be very difficult to get the soldering iron to heat the pad and spring nicely when there isn’t a bit of extra space on the pad.

Ohhh - think Dale's post on v013 was in the humongous BLF Kronos X6/X5 thread, long buried by 100's of posts by now, only hours later Undecided.

Thanks wight for the info! I do like the expansion outer tabs for the springs - definitely useful.

In the last couple days I used one of you 009's with a ATTiny85, pins bent in, and piggybacked to the stock driver. The stock driver had a blue LED on it that shines thru the rubber around an e-switch. So, I left the LED and resistor (also switch and charger connector) on the stock driver/contact board, and wired MCU pin #3 to the resistor of the LED. So far it's working great! Got some more tweaks to make to the Narsil firmware to fix bugs, and have it handle low battery alerts, but it's working real nice. Even with the wire on pin #3, I can still clip the MCU for programming because the bent pins elevate the MCU up. Would much rather have a pad for pin #3 on the component side for doing this, but you probably don't have space.

For me, using pin #3 as a jumper doesn't help - I got lots of configuration options in the UI of Narsil.

  • Ah, thanks. I was able to find it based on that. The post you were referring to is #4869 and shows a “real” v13 from OSH Park. The discussion going on around/before that post seems to cover a lot of ground we’ve already covered. I think Sharpie had the Gerber viewer set with a layer missing. :wink: Some points are still valid, even if they’ve been touched on before.
  • I agree with you - the star doesn’t do much for me except look cool. I don’t use stars.
  • Maybe later I’ll scoot things around on a 20mm board and break out the extra pins. I prefer to break them out when I can, but as you’ve mentioned space is at a premium.
  • Please be sure to report back on your results with those spring pads.

I’ll post my question and the answer from wight here if someone is interested :

… and I don’t use stars any more either. It seems to have become an obsolete carry-over from nanjg days. But I sure could use a convenient pad to solder other stuff to, like an e-switch.

The tiny25/85 efforts have really expanded options, and reduced the need to actually open up the light to make changes.

Another option is to choose a FET with higher on resistance. You will reduce peak current, get rid of turbo-to-moon blink, and save several dimes.

This might not be a great idea. I plead the fifth.

  • This is a Zener+resistor setup placed behind a polarity protection diode. Normally the polarity protection diode might cause our infamous boost problem, but with a 5v zener in place this should not occur. I expect that this should allow for a much smaller decoupling cap for the MCU… but I’ve been wrong before. At this moment I’m not actually certain whether this setup presents a quiescent current problem for single-cell momentary lights.
  • 17mm layout… which is a mess of course.
  • 0603 and SOD-323 sized passives.
  • 2mm via for positive.
  • This passes DRC.
  • Physical component keepout is 0.8mm rather than 1.0mm. Electrical keepout remains at 0.5mm.
  • LED- is smaller than I’d like.
  • GND vias are all placeholders.

BTW, any ideas on how to enable a bleeder to leak power to a lighted tailcap while off, without interfering with OTC drain? Or how to influence the rate of OTC drain?

Also, any thoughts on how to reduce power fluctuations at the MCU when the main FET power circuit is repeatedly going from zero to a zillion amps? It seems to have sort of a splash effect, and the tiny25/45/85 chips aren’t as splash-resistant as the tiny13.