Just having a bit of a current control problem.

dl324

Joined Mar 30, 2015
18,376
I have been eyeing a soldering microscope lately and I though a decent unit would climb into the thousands of dollars. this one seemed to have little or no lag in movement under the microscope.
I use a Elmo document viewer instead of a microscope. It requires a laptop, but there's no lag. I bought mine used on Ebay for under $50.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
For making up boards , I picked up one of these a while ago, they include a magnifier which is very handy.


View attachment 368506
I have one of those but it just does not magnify enough. in fact I just bought another one with a bigger base and 3* magnification on it but my glasses are 3.5 mag themselves and I still can't see past the end of my nose.
 

Attachments

Last edited:

Thread Starter

robp1956

Joined Jun 12, 2026
32
I used it because I decided on a 2.5V cutout voltage for the Li-ion battery. If you wanted it to be higher, you could just use a higher voltage zener. I think the next value in my stock would have been 3.3V.
I chose MOSFETs because they'd dissipate less power than a BJT would.

AO3400 is rated for about 5A (at a higher threshold voltage). RDS is less than 20mOhms, so it would dissipate around 40mW at 2A. A BJT would dissipate watts at that current.
View attachment 368495

I started studying electronics in the mid-1970's and they didn't teach about MOSFETs. They were more curiosities at that time and didn't have anywhere near the capabilities they have now (in particular low threshold voltages, low on resistance, and high current capacities, and SMT wasn't that common back then). I learned about them pretty much on my own.
I tend to choose LM358 and LM393 (both around 50-year-old designs) when nothing better is required. LM358 is an opamp and LM393 is a comparator. Aside from the compensated gain stage of the LM358 and the open collector output on LM393, they're pretty much the same in functionality. That's why I suggested using a comparator for the opamp if you wanted to eliminate one of the ICs. Comparators are okay as slow opamps (due to the lack of compensation).

The opamp needed to allow a low input voltage and the input stage of LM358 is PNP, so ground is allowed. These days, users are more likely to opt for a rail-rail input device (and pay a buck or so for it vs $0.25 for LM358). The issue I have with rail-rail input opamps is that they usually use a complementary input. I worry about distortion in the crossover point. Early rail-rail opamps used charge pumps to operate the internal circuitry at more than the supply voltage. That could introduce noise. So I only use rail-rail input/output opamps when I need something better than LM358. It's hard to study modern opamps/comparators because manufacturers don't include detailed schematics. Also, you need to know the threshold voltage of the MOSFETs to analyze the circuit. You can't assume single Vt because multiple Vt's in the same device aren't uncommon these days. It just requires a different gate implant.

Similarly for LM393. I wanted the output to be able to go to the positive rail. Modern comparators usually have push pull outputs and can't quite get to the positive rail. The limitation on input voltage swing is addressed by using a 9V power supply LM393 allow around 7V, so getting to around 4.2V isn't a problem.
For home use, I think a hot air tool is better than a hotplate. With a hotplate, I'm concerned about exceeding the maximum allowed soldering times (like 10 seconds). For commercial applications, the equipment can control the temperature and time better.

For most of the SMT devices I use, I use a soldering iron and 0.015" solder wire. When I try using paste (without a stencil), I usually end up not using enough solder and have connectivity issues over time.
Thank you verry much you have been most helpful. Looks like I have to figure it out with hopefully through hole components. If not I figure out how to mount and heatsink an SMD chip fortunately pins and 3 chances each not to cook it.
 

dl324

Joined Mar 30, 2015
18,376
If not I figure out how to mount and heatsink an SMD chip fortunately pins and 3 chances each not to cook it.
You can buy these adapters on AliExpress (used to be about a nickel each):
1781830914835.png

I use solder wire on them.

The leads (called leadframes) cost about 10 cents each in quantity 100 when you can find them (I have of couple types available for 0.06" thick boards barter in the barter thread). You can also use right angle male headers.
 
Last edited:

dl324

Joined Mar 30, 2015
18,376
@robp1956

The N channel MOSFET in the circuit I posted needs to be a power device. When used in a current sink, it is being used as a variable resistor and at 2A with a fully charged battery (4.2V), it will dissipate over 8W. So, it needs to be something like IRLZ44N with a heatsink.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
Thanks I was going to go to Mouser to look for something in the n and P channel mosfets that would at least be logic level. But I have a few IRLZ44N in one of my drawers. Thank you again for you help in this.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
You can buy these adapters on AliExpress (used to be about a nickel each):
View attachment 368524

I use solder wire on them.

The leads (called leadframes) cost about 10 cents each in quantity 100 when you can find them (I have of couple types available for 0.06" thick boards barter in the barter thread). You can also use right angle male headers.
I have seen ones Similar to that but also had the 6 pin and 8 pint adaptors and a few I would not use loke BGA type chips the rebal type.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
I have put the circuit on a protoboard and it seems to work as it's supposed to or close enough that a bit of tweaking would not fix. I have not pushed it to far yet as I am waiting on a heatsink and a few of the Mosfets through hole types but they advertise turn on voltage in the 2 volt range. I guess I'll wait to see how it works when the parts come in next week. So far fingers crossed I have no dead soldiers but the game is still early..
 

ci139

Joined Jul 11, 2016
2,000
So I wish to drain an 18650 battery and I wish to sense the voltage of the battery by using a point just after the 0.1ohm sense resistor I have chosen.
ε = I·(r + R) = v + V -- where ε is EMF of the galvanic cell , r is the equivalent internal resistance of the galvanic cell , I is the current through the series circuit of battery and resistor R.
-- at your case --
ε = I·(r + Rꜱ + R) = v + u + V -- where Rꜱ is 100mΩ , u is the voltage drop at Rꜱ , which value must be pre-calibrated for different currents at different ambient , R includes the non-linear channel resistance of the MOSFET which also is T° dependent and current dependent . . . but also the r is dependent on SOC of the battery & rate of discharge of the battery & possible PWM/PFM frequency and duty

. . . basically you never mentioned what you hope to achieve with your experiment ???
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
All of that is gone I am simply looking at the voltage of the battery at any point and comparing it to a zener reference voltage of 2.5V and then shutting the battery down if it falls to that level. I may however change that zener for a dedicated voltage reference for more temperature stability. or I may go to a 3V zener and call it a day. As I said it does work on the bread board. I could build it up on a perf board but I thought it may be better to have some boards made up as this will become a small part of a much larger. The power supply I wish I had project. arduino magic will be used to control most aspects of the charge discharge cycle, and of course the power supply. I am going with a 200W toroidal transformer with 24-0-24 outputs and I guess a smaller 9 volt winding that would be perfect for this part of the project. As I have said I am retired and live in the middle of nowhere or close to it anyway with little else to do but work on a project that I have always wanted to build.
 
Last edited:

Thread Starter

robp1956

Joined Jun 12, 2026
32
I see that from reading the text, but I was just looking at the schematic when I posted my questions.

What are the answers to the rest of my questions?

Are you determined to design this on your own? Or are you willing to take some circuit suggestions?

Do you already have the voltage detector IC? Do you have a problem with using a voltage comparator? It looks like the detector IC costs 2-3X what LM393 goes for. Plus, STM1061 appears to be SMT. 2.8V is neither the usual low voltage cutout (2.5V), or the conservative voltage (3.0V). Why did you pick that voltage?

I also just noticed that you're using two different conventions for crossing wires with no connection. I'd suggest sticking with the dot convention and lose the hump. The humps with connection dots style went out in the 1960's (thankfully).

Also, your posts would be easier to read if you used paragraphs to organize your thoughts.
Sorry I didn't see the question about the voltage detector I chose. well I didn't actually choose it in fact it may well be as are a few of my parts the beat that the Zhenjiang market had to offer that day sent to me by a friend that went to China on a business trip. but It's what I had and the 2.8V choice was to stay clear of the 2.5 V or less that the manufacturer sites as the absolute lowest voltage a cell should drop to but it still shortens the life of the cell so 2.8 is as close as I will get to that voltage. and it drains the battery enough that a good estimate of the actual capacity of the cell when charged. That was really the only criteria I had. but the way you suggested does seem the better choice. Oh the 2 MOSFETS I went with are these both have Gate voltages of around 2 volts and have Ro of 2mOhm for the N channel and 4mOhms for the P channel. Both I am sure are Chinese knockoffs but I have 10 of each on order from mouser. more trustworthy I think.
 

Attachments

Last edited:

dl324

Joined Mar 30, 2015
18,376
the 2 MOSFETS I went with are these both have Gate voltages of around 2 volts and have Ro of 2mOhm for the N channel and 4mOhms for the P channel. Both I am sure are Chinese knockoffs
Those both look like counterfeits to me. Who knows what device they really are.

I've bought IRFZ44N and IRF9540N from AliExpress, but I measured threshold voltages and leakage currents on every single device. I also bought IRLZ44N and also did 100% testing for threshold voltage and leakage current. I did leakage current measurements because none of the MOSFETs were packaged correctly (in plastic bags instead of antistatic bags). Since MOSFETs with higher gate capacitances are more tolerant of ESD, I gambled and kept them. I also measured on resistance at 5-6A (largest power supply I had). Now I have a breakout board on a mini-ATX supply.

IRFZ44N should work. The threshold voltage is 2-4V. The device I mentioned was IRLZ44N. That single letter difference is significant. IRLZ44N are logic level devices and threshold voltage is 1-2V.

Note that Vgs(th) for IRFZ44N is the voltage where the device conducts 250uA.

Get used to paying attention to details

IRF9540 is not a reasonable substitution for AO3401. The threshold voltage is -2V to -4V vs -0.5 to -1.3V for AO3401. The device you select needs to be able to conduct the maximum design current (2A) at a Vgs of -2.5V.

I may however change that zener for a dedicated voltage reference for more temperature stability.
You could use a TL431.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
Those both look like counterfeits to me. Who knows what device they really are.

I've bought IRFZ44N and IRF9540N from AliExpress, but I measured threshold voltages and leakage currents on every single device. I also bought IRLZ44N and also did 100% testing for threshold voltage and leakage current. I did leakage current measurements because none of the MOSFETs were packaged correctly (in plastic bags instead of antistatic bags). Since MOSFETs with higher gate capacitances are more tolerant of ESD, I gambled and kept them. I also measured on resistance at 5-6A (largest power supply I had). Now I have a breakout board on a mini-ATX supply.

IRFZ44N should work. The threshold voltage is 2-4V. The device I mentioned was IRLZ44N. That single letter difference is significant. IRLZ44N are logic level devices and threshold voltage is 1-2V.

Note that Vgs(th) for IRFZ44N is the voltage where the device conducts 250uA.

Get used to paying attention to details

IRF9540 is not a reasonable substitution for AO3401. The threshold voltage is -2V to -4V vs -0.5 to -1.3V for AO3401. The device you select needs to be able to conduct the maximum design current (2A) at a Vgs of -2.5V.

You could use a TL431.
I have some TL431's in my box of parts that I bought a few months ago. I could try one of those in the circuit I have built up now and see if I can get that voltage closer to my preferred voltage of about 2.9 to 2.8 volts. If they get down to that 2.5 volts or worse lower they tend to lose a lot of capacity. I was given one to test that had discharged to a bit under 2.4 volts for a while and the batter stated 1200mAh and by the time I trickle charged it at low currents it had lost close to 1/2 of that 1200mAh down to a dangerous 680mAh. I advised he not use it.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
I do pay attention to the details and I did notice the 250mA initial on current but I also tested all that stuff as best I could in a test circuit for each of the MOSFETS and downloaded all the data sheets for everything I ordered from mouser. midnight reading for me. I did look for others and I will again but not much information is given for each component so I have to read the datasheets before I decide what to order. I have no other Ptype MOSFET to choose from I have several Ntypes but only the one Ptype that I have found.
 

dl324

Joined Mar 30, 2015
18,376
If they get down to that 2.5 volts or worse lower they tend to lose a lot of capacity. I was given one to test that had discharged to a bit under 2.4 volts for a while and the batter stated 1200mAh and by the time I trickle charged it at low currents it had lost close to 1/2 of that 1200mAh down to a dangerous 680mAh.
Is that from going under 2.5V just once (briefly)? Or was it long term?

I've done capacity testing on dozens of Li-ion batteries and I discharged them to 2.5V. They all charged back up to about the original capacity. I've never seen anything close to a 50% reduction in capacity.
I do pay attention to the details
When I mentioned needing something like IRLZ44N, you said that you had some. That's not the same as IRFZ44N.

Also, always posting in a single paragraph sometimes makes for tedious reading.
I have no other Ptype MOSFET to choose from I have several Ntypes but only the one Ptype that I have found.
Sadly, the industry has moved on to surface mount devices. I can't find a reasonably priced P channel MOSFET in through hole that would be roughly equivalent to 2N7000. That's why I use AO3400 and AO3401 devices and mount them on SIP adapters.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
Yea I may have to bite the bullet and just dive right into that surface mount stuff. Some people make it look so easy but then I probably don't have the right tip on my iron either. I'll have to change it. get a few of the ones you mentioned here and some boards to mount them on and see how many I can lose or make dead soldiers of. No the one I had to test was down to less than 3 volts when it was put into the garage and it was maybe a month and the battery read 4.3V so I then slow charge at maybe 509 to 100mA till the level gets over 3 volts and then up to 400mA only till full then I will do a complete discharge and recharge to work out the total capacity. and once they get down to about 75% they are on the bad side below 60 and that is entering dangerous territory they could thermal runaway out of nowhere.
 
Last edited:

dl324

Joined Mar 30, 2015
18,376
I probably don't have the right tip on my iron either. I'll have to change it.
What type of tip do you have now? I use a 700F 1/32" conical tip for almost everything.

I ordered the AO3400's and the 3401's I got 10 of each
You can use the AO3401, but not the AO3400. Use the IRFZ44N. A logic level device isn't required for the N channel MOSFET because there's sufficient headroom for the LM358 with a 9V supply.
once they get down to about 75% they are on the bad side below 60 and that is entering dangerous territory they could thermal runaway out of nowhere.
Where does this information come from? I've been charging my phone and tablet batteries between 40-80/85% for years. I try to keep my Chromebook, Ultrabook, and laptop between 40-80%, but occasionally they discharge to 0%. Sometimes I don't mind them closely enough and charge to 100%.
 

Thread Starter

robp1956

Joined Jun 12, 2026
32
It comes first from a number of years working with various lithium cells and seeing the degradation of the cells over time. I have also somewhere her a graph I produced showing degradation of the carbon wafer that capture the lithium ions over time it degrades and I saw it was almost a linear relationship over a year and 2 years of normal use and it sort of goes like this within the first 2 years you have lost about 30% of the original capacity then every 2 yaers after that you lose 10% to 15% additional loss. That is the major reason that over time your cell phone battery seems to need charging more often. Also the tools you buy over time don't seem to have the power they once did. Manufacturers do the best they can to keep the cells in the pack balanced and charging properly but the degradation still happens. I liken it to buying a car and your able to put say 30 gallons in it and after a couple years you can only put in 26 gallons that sort of thing. by the time most people notice it their battery is most likely down to 60% of it's manufactured capacity. and they decide it's time for a new battery.
 
Top