Nanjg Clone Driver with 12F683 MCU Question

possibly a schlocky diode? for reverse protection but no low voltage resistor bridge?

No diode is present at the normal location

Since you confirm this then that’s the PIC. I swear I see an unmarked chip even after you say this.

Looks like the PIC Vcc leg is tied to one of the 3-leg IC. So this thing sees or control something on the power side. Simple diode or cap should only need 2 terminals, those are dirt cheap, and unlikely the chinese will purposely opt the more expensive option. So, I’m with nickel/ohaya - voltage regulation/detection IC probably?

Anyhow, I like the 5mode with moon and off-time memory. The reason I can’t stand Nanjg was the on-time memory. How much were these including shipping?

They make 3 pin diodes, the original TexasPyro 20mm Nanjg used em, my tweak changes it back to the stock diode footprint

Sorry for the crappy picture, i think you could read the part# of this.

I’m at a loss…searched all over for C731 and nothing

oops, sorry wight, I call everything MCU, not that I know what I am talking about...

Thanks for the lecture on MCU's and IC's, I see the difference now

I mix up the terms all the time too. :stuck_out_tongue: I called whatever control the signal to the LED = MCU.

Back to the circuit: Looking at the new picture and the traces, I’m pretty sure now that the 3leg is a diode. Pin 1 = Vcc powering the MCU (is this correct here?) is connected in series with the 3leg IC, and only from that it can draw power. So it’s likely a reverse voltage protection for the chip.

Stilll doesn’t exclude it being a voltage regulator though, but I just thought that a diode is more likely.

No problem on terms guys; of course we want to get that sort of thing correct.

I don’t think that the 3-pin chip is a diode. In post #23 you can clearly see a diode with the S4 marking. The S4 diode has one leg in B+, so that’s probably the reverse polarity protection diode. If we look at pads next to S4 we see an unpopulated placement for a capacitor. It appears that this capacitor is for use as a decoupling cap when the C7xx IC is not present. [I hypothesize that ] when C7xx is populated they use the capacitor placement we see in the photos. Therefore I think C7xx is a voltage regulator, although I don’t see why they bothered with it.

Pulsar13, I did not see where it was said that this driver has offtime memory? To me the machine translation of the Taobao listing makes it sound like 3-second ontime memory.

Don’t have time to catch up on this thread right now but there is no Vdivider cause the PIC has an internal reference.

Is that responding to something or just additional information?

Just additional info in general. Someone (WH maybe) mentioned earlier that un-ID’d SOT-23 part may be a voltage detector for battery monitoring (since there definitely isnt a Vdivider circuit). Just pointing out the PIC can handle battery monitoring internally without any additional hardware.

Yeah, that needs clearing up from the OP. See why I thought it was:

The first time I read the bold part it sounded like “off under 3 second will change mode”. But after reading the whole, you’re probably right, it does sound like having on-time mode memory.

@CK, et al,

Ding, Ding, SOT-23 device deciphered in post #6, here: Nanjg Clone Driver with 12F683 MCU Question
2.7V voltage detector or, low battery voltage supervisor if you will. Battery voltage below 2.7V will shut the PIC/flashlight down, with a low standby current of 1ua.

Reading the referenced datasheet “C73A”: C means 2.XV device: 7 is the decimal number of the detect voltage (i.e. 2.7V): 3 means zero delay: A means some sort of manufacturer code.

The PIC12f683 doesn’t have the internal voltage reference, like the PIC12f1822, and the other newer improved midrange devices. Thus, the need for either a voltage divider, Or, this voltage detector IC.

Gotcha, I see where you were going now!

If it doesn’t have an internal reference then a divider wouldn’t do much good I think: it still wouldn’t have a ref voltage. Hence the whole discrete IC, eh? Thanks for reiterating your find. I briefly looked at the datasheet after you posted it, but I misread the “MARKING RULE” section and thought that those markings did not match! My mistake.

You are right, would still need a voltage reference with the voltage divider (tl431 anyone? haha), so edited previous post.

That is pretty cool. Real simple way to add real hardware voltage protection - just add in series to MCU power. No programming or other extras necessary.

(No why the heck didn’t SRK have this?)

Pulsar13, sorry for being a noob, what is the different between a on time memory and a off time memory? How do i differentiate it??

On-time counts how long you turn on the light before saving the mode. If you click before this time, it advances the mode.

Off time counts how short you turn off the light, if it’s short enough it advances the mode.

Example for default Nanjg, you have to turn on the light for at least ~2s every time otherwise it will start in next mode. For short clickers like me, this is annoying because quite a lot of the time I use it to quickly see something, then turn it off. Then the next time I use it in the middle of the night, it would give me the full 1000lm right on my face. Awesome.

For off time memory it doesn’t matter if I click in for a quick look, as long as I leave it off long enough (normally only around 1-2s), it will not change mode.