Musings on the FET+1 and lighted tailcap.

Good summation wight. The problem makes sense to me now.

On “point 2”, my intention wasn’t to call you out on something - clearly we both realize that draining through the MCU is undesirable. My intention was to communicate to those reading the summary exactly why we need a high ratio on the two resistors involved. (eg in the same way that “point 1” mentions being unable to measure the OTC)

As far as the 85 vs 13A I’ll just be straightforward about it: the 13A has some merits and will continue to be used with or without you. If you want to be part of the development conversation you’ll have to make some allowances for that fact.

Switching analog references on the fly has been discussed here in the past, to include the need to discard the in-between readings. It wasn’t worthwhile then, but it might be worthwhile now. Extra work and complication in the firmware is to be added cautiously, but I do think that measuring against Vcc would be ideal here.

I see that you are correct about Rain! I’m glad, that makes life much easier (since it completely knocks out what I was saying about the input current possibly varying). In regards to Atmel’s recommendation of using input sources <10K-ohm: I understand decently what we/they are talking about, but I’m not sure what the end result actually is for us. Will conversions just take longer with our 1M-ohm input resistor?

While the improvement which we are discussing here involves both new hardware and new software and could be designed to exclude the ATtiny13A… there’s no reason to do so. The ATtiny13A is very plentiful and popular. It’s feature-set covers what we need to do this job. Twisting folks’ arms won’t make any friends. When an ATtiny25 or ATtiny85 can really do useful things which the ATtiny13A can’t we’ll find that end-users will come.

Following along, listening and learning. Nice stuff guys/gals!! :face_with_monocle:

Hmm, I hadn’t thought that far into it RE: the Rain value. 1k charging a cap definitely =/= 100M, heh.

I guess I don’t have a good handle on how the “sample and hold” works. How does the circuit identify when C (s/h) is done charging and it’s time to start the searching for the voltage? Seems to me that if it took too long we’d potentially start doing the “successive approximation” process while it was C (s/h) was still charging. This is based on my understanding from skimming the Wikipedia and Maxim articles on how SAR ADC’s work. I could be subject to a serious misunderstanding, but I take it that we charge C (s/h) and then start comparing that against a variety of voltages. (eg so if we actually take one sample per bit then I totally misunderstood)

I had some comments to make, but I think wight already made all those same points.

There is a small tangential topic which might be worth mentioning though…

In the UK, copyright is automatically implied on all copyrightable works, with all reserve-able rights reserved. The explicit statement is only really needed to specify a non-default license, to specify that a copyright has been officially registered ®, or to attempt to exert copyright in places which probably don’t respect the copyright anyway.

More importantly, the copyright statement only has meaning if the author’s legal name is used. If your legal full name isn’t Sharpie, you may have just given away the copyright to someone who doesn’t legally exist.

The explicit mark does make me wonder though… When you create circuit designs on BLF, do you intend for those designs to be restricted or freely usable?

Here’s something I forgot to cover: the bottom of the PCB. I’d rather keep it empty of components if we can. At this point many high-current builds require a spring bypass. The spring bypass generally requires a larger-than-Nanjg-105 spring. Between a retaining ring and a 5-10mm diameter spring there just isn’t as much space on the bottom as there initially appears.

The Nanjg-105 and similar drivers do place many components on the bottom but they also keep currents relatively low and therefore don’t (really) need the steel spring bypassed.

A brass post can also be used in place of the spring, but that’s not appropriate for all applications either. We’ll see where it goes, but I don’t want anyone to be under the impression that we can just start putting things back on the bottom of the PCB “like we used to” with absolutely no consequences.

Oh, um, a blank spring side also makes the drivers a lot easier to build (hot plate reflow), and allows them to fit into more hosts. I have a nice brass 18650 host, for example, which has zero room for spring-side components. And I’m not sure, but I think RMM’s new automated build machine might only be able to do single-sided boards… so an empty side makes it more likely that we’ll be able to buy completed boards from him.

It’s not an absolute unbreakable requirement, but it is a pretty big bonus.

Sharpie, I appreciate your work and help here on BLF.

Okay, that helps me understand what you’ve got in mind.

I use a GPL or CC-BY-SA license on everything I can. There are a few reasons for this:

  • because my goal is to help empower people to make the things they want,
  • because it’s simpler and less drama-prone,
  • because open designs proliferate more easily,
  • and because (for someone in a western 1st-world country) there is no meaningful amount of money in flashlights. I couldn’t make a living doing this even if I wanted to.

Also, it helps me keep this as strictly an enjoyable hobby rather than work. I don’t like it when my hobbies stop being fun. :slight_smile:

Anyway, just in case that helps clarify where I’m coming from. I’m hoping to help and grow the community.

There are plenty of thanks given in other threads. This thread is about tech development, not gratitude.

I don’t want to sound ungrateful - thank you for thinking of us. With that said, TK is correct.

As far as the copyright discussion: in this case it’s a moot point. The copyright covers the image (eg the artwork). Here is my own image of this design which is also protected by copyright:

While these artworks may not be reproduced without permission, new artworks may certainly be created depicting the same thing. This works in the same way that a photograph of the city of New York, NY may be taken by anyone and still enjoy copyright protection without infringing on another photograph’s copyright.

Um, I didn’t think to mention it before, but I know part of what drains the OTC.

The attiny’s SRAM maintains its state for a short while after power is disconnected. On most drivers, this lasts for about half a second. However, if the driver has a 1uF OTC and that OTC is charged, the SRAM decay takes about four seconds instead. The OTC’s charge gets used to maintain the SRAM state.

This is actually beneficial in some cases. It means that “noinit” values can be trusted between boots as long as the OTC charge is above a safe threshold. It’s a nice way to implement short-term memory without eating up EEPROM write cycles.

It can also be used to implement offtime detection without a capacitor, assuming only “short” and “long” intervals matter and the exact timing isn’t important. Set a byte to zero, and if it’s non-zero at boot the MCU knows the power was off for a “long” time. If it’s still zero, the user did a “short” press instead.

I personally like having three levels of offtime (short/med/long) instead of two, but when only two are needed the OTC may be unnecessary.

I suspect that Design Rights do not work the way you think they do. See this page under the heading “What you can and can’t register”: Register a design: Overview - GOV.UK

Note these two things:

  • “[Must] not be an invention or how a product works - you’ll need a patent instead” (although patents also don’t apply in this case)
  • “You cannot protect the functionality of a design - eg a chair that folds down more quickly than others of the same kind.”

The confusion stems from some ambiguous English language words. In this case configuration means physical configuration, eg industrial design… eg if we arranged the components on the assembled product in the shape of a heart.

Generally I agree with the quoted text, but I’m curious about the part I bolded. How do you propose to “make good use” of the effect?

For a design implementing a clamp (but not the OTC related stuff), see A17DD-L v30 here. At the time I kept the OTC at 0805 and added a 0603 pulldown for it with the though of bumping to 10uF with a pulldown of low enough value to compete with whatever is happening inside the MCU. I knew we’d still be affected by temperature so I wasn’t thrilled by that plan. In theory I like your idea much better, but we are getting pretty short on space. Adding another diode and another resistor will get tricky.

Since we aren’t positive that there will be no bad behavior due to the high input resistance it probably makes the most sense to create a demonstration board in 20mm or 22mm where there’s enough space for an easy layout.

I’ll be more explicit: physical layouts are protected (so Gerber files, circuit boards, etc). Your drawing of the circuit is protected. The circuit itself? Not protected, as far as I know. That’s exactly what the Wikipedia link you used explains in reference to IC’s - mask works are protected. We can move this conversation to another thread if you like, to keep this one on subject.

  • I wouldn’t call that making “good use of” the boost effect. The clamp eliminates the issue but doesn’t achieve anything else for us! The clamp simply keeps the voltage inside a safe range. If we did need a higher voltage for some reason (only while using a PWM duty cycle < 100%) then it would become useful. That’s why I specifically asked - I thought you might have come up with a neat idea to put the higher voltage to good use. At 4Mhz we only need a couple of volts.
  • I did have comfychair try a freewheeling diode - if you read through the thread I pointed to earlier you’ll find some results there.
  • You definitely have a point on the safety aspect of eliminating the gate pulldown resistor in e-switch applications. It’s been brought up before and we should probably address it. A17DD-L v30 includes a gate pulldown.
  • You are preaching to the choir about tinkering with C1. That’s why I didn’t just add another 0805 pad next to the existing one and call it a day with 20uF. My assumption has been that the only reason we got away with things in the past is because we had so much bulk capacitance, such a hardy MCU, and so little noise to start out with (battery powered). OTOH if you are trying to say that moving C1 in the first place was a mistake… you are free to your own opinion. It kept our parts count low and functioned well.
  • RE: the impedance problem - you didn’t need to mention it: I brought it up in #64 based on the datasheet which we both like to reference. In any case if you feel pretty confident then I’m sure we’ll get around to trying it out. If you don’t feel pretty confident… we’ll still get around to trying it out!
  • ToyKeeper’s ideas are not “pure digital” AFAIK. She’s waiting for random decay to corrupt the SRAM. This does not currently give the long/medium/short indication she desires. Are you suggesting that we could allocate a bunch of SRAM for the job and measure time based on how much has decayed? Unfortunately I do not think that this approach is at all practical, but TK would be in a better position to address it. If we could hold up the entire MCU as you mentioned that would be different: we could run a timer (so yes, pure digital). Here’s the thread where the current no-OTC approach was initially discussed: alexvh’s firmware EDIT: although running a timer and then writing values to eeprom all while running on a cap sounds crazy to me. What do you think?

I only have so much time/brainpower for tight layouts like the v30 layout I linked to. That’s why I suggested that I/we might use a larger layout to test your clever idea. That way we can knock out a layout with little to no effort. No tears will be shed if it doesn’t work.

PM the Off Topic stuff guys, please. I know, its no fun that way, but we need to to stay On Topic here.
:slight_smile:

Indeed. It may help to figure out the scope of what can be discussed without legal issues though. If we work out the technical issues and leave it at that, great. But if that gets followed up by lawsuits, the effort ends up being a net loss for everyone involved.

I add explicit GPL or CC-BY-SA licenses to the things I make, in part, because I want people to know there is no risk of legal trouble if they use it or make derivative works. All they have to do is share alike.

In this thread, the copyright notices and design right assertions don’t really foster a sense of zero-risk. It raises some potential red flags which could turn out to be incompatible with the idea of collaboration.

So what I’m wondering is… Is it safe (in a legal sense) to participate in this effort, and to build on the results here?

I’ll add — as I’m a bit old and shaky-handsed to build increasingly complicated small electronics with my own hands:
— is it safe (in a legal sense) for me to ask RMM to build me “one of those when they figure it out” and pay him for it?

How about a “protection money” fund — I’ll donate $10
in advance
to be held til needed
to pay off [you know who you are, so you’d be the one to get it, if you don’t recognize yourself, then you’re not the one]
to guarantee I can ask RMM to build the driver, and pay for the work, and not get him sued over commercializing a group concept.

Make it $15. I’ll PAY to make this potential thread to cooperation go away.

Alternate suggestion — agree ideas here are assigned to the owner of the forum to be used only for good.
Then he can at least ban participation by and advertising for any company that steals the ideas.

The self-absorption is very large……hmmm maybe…. >:-/

Post reconsidered: Let’s all just be nice to each other. Nuff said.