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

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)

Oh, let me help.

This has been discussed before - in the big mammuth thread - from post #164 (look here) thru post #177 (Especially read #171).

Ah, thanks! I figured it had to be somewhere in the monster thread.

Thanks sixty.

RaceR86: why not use direct drive for outputs above 5A?
Seems silly to me to stack many boards to get a current that you can get with a single FET.
Unless of course you specifically need the current limited to a certain value.

Two improvements have been made:

- increased speed of PWM

  • thermal protection now works more smoothly (hardly noticeable to the eye when reducing brightness)
    We are thinking also about implementing additional/alternative method of temperature treshold adjustment (after some multicliks driver turns on in 100% mode, then by touch, when sense max. safe temperature You click and from now on this “touched temperature” is written as a max. temperature treshold. What U think fellows?

Ah, I had the same idea (for setting the temperature limit) a few days ago and had noted it on my to-do list for my bigger drivers. So obviously I like it :) The user should be advised to do that temperature threshold configuration with full batteries.

I personally like to see a noticeable step in brightness when thermal protection kicks in, but that's just my taste.

What's the reason for increasing the PWM speed?

Because, it was in my opinion, a little bit too much audible in previous version of thermal protection mechanism (therefore we modified both) :slight_smile:

how about some kind of notification that output is being reduced due to temperature, it would be nice to know that heat shedding is not sufficient, and one can even test different environments to figure out how long the light can maintain output before temperature induced reduction (and even compare between lights)

Oh man I get headache just for reading all the modes and configuring stuff…a factory reset seems like a good idea(drJones should also build this feature in his drivers, hint hint :wink: )
I am away from all these configurable modes and stuff because I always got confused from it.
I just use some plain brightness levels or the ramping…

One question do you also solder a bigger wire between VCC and the plate, or just the plate on top of the stock spring?

The one click/two click mode change seems to be a really good thing, that is the best. It impresses me.

Sorry but I am little busy today :frowning: About springs and contacts: Put this into translator: avoiding voltage drop at the terminals

Bocian: Didn't you already use 16kHz? I definitely can't hear that. But younger ears can hear higher frequencies. So what frequency do you use now?

Werner: Yes, my bigger firmwares (i.e. those not restricted to ATtiny13's 1kB) have a factory reset.

This is fantastic project :slight_smile:

Does the zener modification work in order to use two cells with this driver? Some features disabled?

Feel free to guide me to any decent direct drive drivers that I can buy.

Final version of extended Attiny25V driver has been established. Final PWM speed is 16,5kHz. Added: auto-calibration of temperature safety treshold invoked by 9-clik (when assembled in flashlight: driver start in 100% mode, lamps head getting warm, then by touch, when sense max. safe temperature, by any click this “touched temperature” is written as a max. temperature treshold).

Final version of programmable Attiny13A driver has been established. Final PWM speed is 18kHz. Decription below:

Navigating between modes works two-way. One click makes you move to another mode in the loop, double click takes you back to the previous one. It allows us to; for instance, reduce brightness without clicking through stronger modes in the loop. After reaching the verge of the loop, moving further will cause „a jump” to the next verge of the loop.

The programming procedure of a given mode is elicited by 6-click, while being in the mode we wish to change. Displaying the sequence occurs in the lowest mode (signaled by one twinkle) upwards. Every mode displays for about 1,5 of a second. After reaching 100% there’s one twinkle, then it displays modes downwards. The mode is programmed during the display invoked by a click or by the mechanism of turning off the switcher. If we cease to do anything during the procedure of presenting modes upwards and downwards, the light brightness will remain as previously set.

Brightness level palette available in the programming process:

0,02% (not always visible - depends on variability of electronic components parameters ).
0,15%
1%
4%
10%
18%
25%
32%
50%
70%
100%

Stroboscope (The strobo) mode is invoked by 3-click. The intensity of the flashes is the same as in the mode we have invoked the stroboscope, and has an optimal frequency 2Hz.

Simplified battery cell voltage measurement under full load is invoked by a 4-click. After invoking a 4-click, the lamp flashes for a short moment in 100, then the measurement happens. After that, with a number of flashes in 20 mode, the driver informs us about detected voltage range:

- 5 flashes means 3,8-4,0V

- 4 flashes means 3,6-3,8V

- 3 flashes means 3,4-3,6V

- 2 flashes means 3,2-3,4V

- 1 flash means 3,0-3,2V

  • no flash means 3,0V (in a moment there will be low battery cell voltage warning starts).

RESET to factory settings (modes to: 0,15; 10; 32; 100. Inovoked by 8-click.

The low battery cell voltage warning starts when the cell, in a working mode reaches about 2,9-3,0V. Then a single flash appears and a reduction to another, lower level from the programmable modes palette (we reach ~2,9V in the given mode, and after a flash, we drop to another, lower mode). This works to the level 3 (1). When this happens the lamp will retain this level, flashing periodically every 10 seconds. After reaching 2,8V you will experience the last mode reduction to 2 (0,15). After reaching critically low voltage 2,6V, the driver 4 flashes and goes into sleep mode.