Polish project: Extended version of Nanjg 105C driver based on Attiny25V

Bocian, will this driver be available to purchase?

Yes, it will be. Soon.

I think it is a wonderful driver, If they are not too expensive, I'm in for a few when available :-)

There will be also available another, cheaper version of programmable driver based on Attiny13A (everyting like in this project except temperature monitoring and battery cell voltage measurement).

I'm mostly interested in swapping out an Attiny13a for the Attiny25v. Same package size but with 2k memory vs 1k and a temp sensor?

Yes. :)

Yes.

PS. Hi DrJones, nice to see You. You are doing a great job here with Attiny13 :slight_smile:

Uhhh...so why are they not making the 105C's w/ the 25v from the start? Just cost?

EDIT: Or just jump to the 85v?

They don’t need it for the simpler programs and cost is different.
Place an order to the factory and they might make it. It’s all about what shops want to sell and buy or order from the factories/distributors.

For DIY most people go with Attiny85 in this package.

Here is the SALES THREAD

Hi Bocian,

thanks :) I spent a lot of hours optimizing code to get all the functionality into the 1kB of ATtiny13. I occasionally used ATtiny25 and 85, also experimented with off-time memory (using a cap and a 100k discharge resistor; yours is the simplest off-time memory setup I've seen; nice idea to use the internal resistance. I'll have to investigate further), but my premises were not to mod the hardware.

I really wish they had used ATtiny25 or better.

However recently I begun to design my own boards, clearly not using the ATtiny13 :) After so many hours of writing compact code, I feel sort of guilty when writing 'expensive' (in terms of program space) lines of code, even though the 85 has plenty of space. :)

How do you make the 0.2% and 0.015%? Just by PWM levels or something more tricky? I found that the real brightness at the lowest PWM levels strongly depends on hardware variations. With some luck I get a nice very low low, the same value in another driver/LED combo (same models) may be much brighter - or won't even light up.

DrJones sorry for a mess, but I’ve answered Your question in sales thread 0:)

Maybe if Your custom project is not very advanced yet You should think about using current regulation based on operational amplifiers instead of common AMC7135. That gives You lower drop Voltage for a constant current regulation and possibility to mix digital control PWM and analog output (no flickering and using LED advantages in lm/W when low powered). Currently I’m developing Headlamp XP-G2 S2 mod using such solution and it works wonderful (those efficiencys when powered 0,2-20mA and more)l 8)

Ok, about the cap on the input pin. I was reading this thread, https://budgetlightforum.com/t/-/17286#comment-400487, which outlines what DrJones was referring to with a discharge resistor. Does an I/O pin have a specified state when power is disconnected from the MCU? According to the diagram in the datasheet (what PilotPTK referenced), although not a complete diagram of the circuit, it looks like the cap would discharge immediately when the device is powered off. I tried measuring the resistance of the pins, but different pins came up with different numbers and the resistance changed over the time that my DMM was connected.

It's great that adding a simple SMD cap can give us "off-time" mode switching, I just don't see how it will work besides just trial and error (add a cap and see how long it takes to discharge). It would be nice to know what state the pin is in, and what the resistance is, when the battery is disconnected.

Bocian: I'll reply here though :)

Interesting; I didn't know the ATtiny25 can handle the lowest modes more reliably. I'll try that. And yes, one of my next drivers will have 2 channels, one with only 1*7135, the other with the remaining ones. I'll also try an AMC7136 based driver for a change.

I thought about an OpAmp linear driver, too, PWM filtered with an RC low-pass (maybe second order), but I'm not enough of an electronics engineer to know how to choose a suitable OpAmp for those small voltages down to some µV for the low modes. There's quite a gap between understanding the principles and really building a working circuit (depending on the complexity of course).

JonnyC: I tried measuring the resistance of star4 to GND; depending on the multimeter used I get ~5 MOhm or 30 MOhm - they measure at different voltages. I'll probably try an oscilloscope soon.

It is in off state and the resistance is dynamic, not the same value at different voltages. I asked before, Bocian did not like the questions.

Yes a capacitor is enough if you have a big enough capacitor and big enough resistance in the MCU when it is off so the capacitor does not discharge too fast. The specs don’t say these values like resistance of different pins in an off state.

The way it is implemented in BLF-VLD thread is by adding a resistor and using a smaller capacitor, to charge the capacitor fast there is a diode to bypass the resistor. All you need really is a capacitor if you can find big enough one for your MCUs resistance.

Johhny, 1st page, I got: 66kOhm on 3 samples of Nanjg105C with ATtiny13A, on all pins, 200k range on DMM, minus on ground. If I put minus on pin the resistance was 27kOhm. Resistance was higher when I used 20MOhm on the DMM, maybe 1.3MOhm, I did not note it down. It is really a bit of a trial and error unless you can make a graph of resistance vs voltage.

From Bocian’s values of capacitors I calculated/guessed a resistance of about 1MOhm for the capacitors to have some reasonable voltage left after 0.5-1s. Although beware he uses 25V not 13A, may not be that comparable.

JackCY - Sorry, I totally passed over your exchange with Bocian and then asked basically the same question, ha . I looked through the datasheet and searched the AVR forums and couldn't find any info on the state of pins when the device is powered down. So it really does just seem like a crap shoot on picking a capacitor that would work.

Is there a maximum amount of 7135s this can control/be a master too?

In my opinion: 1-2 or max. 3 of additional AMCs on board (105C) should not cause a problem (if You correctly cooling them in flashlight). But You must keep in mind that the electrical connections in this driver was not designed for currents like 4-6A.

PS. I can always (if remove orginal MCU anyway) drill a hole in PCB + connection to other side of driver and solder there copper wire from one side to another. Also can solder better connections between AMC current stabilized ground :slight_smile:

Ive done a total of 16 before on more than one occasion. 5,9A on a single 105C (Qlite). I have seen others go higher on a single board...

I have seen master/slave setups around the 15A range. (Something I will do soon too, not with the one Im buying from you, but I might try that out too.)

If that can be done with a regular 105C, I would assume yours can handle it just as well?

Do you or anyone know if there is an upper limit if you master/slave 105C drivers with 8-12x7135 on each board? Can a 20A driver be made? 0:) (Im aware of possible issues with switch, spring, etc ..)

(picture from DrJones)