1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Not being able to understand simple LM317 lead acid battery charger

Discussion in 'General Electronics Chat' started by Willen, Nov 25, 2015.

  1. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    Wow, do I feel old. I used to build the circuit on a protoboard and if it didn't work.... I figured out why and changed things until it did.
     
  2. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    Because to get a finished design you have to build it up. You can sim it and then build it or you can build it and do the development on the prototype and then you're done. I like doing things the easy way, but the difference is I had to deliver working designs. People who rely on sims don't.... unless they build them which is step #1 in my process.
     
  3. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    rare?

    My whole career was helping customers who found their way to that rare occurrance. I don't mind if people use sims as long as they finish the job and check the design with reality. But most people don't. They are lazy and allergic to the lab bench and they end up with non functional prototype units and they call me..... to gripe about the crappy Spice model.

    Funny.... TI (who bought my old company NSC) must have gotten sick of it because they put this on the data sheet:

    TI’s customers are responsible for determining suitability of components for their purposes. Customers should validate and test their design implementation to confirm system functionality.

    I was also the guy who worked with the software guys who develped the models. I had to document all the places they didn't work, wouldn't converge, didn't match data, etc. My ludditeedness is based on experience....
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81

    Not a universally true statement. But I would also say that the process of troubleshooting the circuit (even if more time intensive) yields a lot more learning than punching numbers into a sim until it outputs what you need. The troubleshooting process forces one to actually learn how the circuit works.
     
    Last edited: Apr 17, 2016
  6. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    Simulations for phase margin and stability calculations caused more problems than the others combined. The sims could never comprehend the effects of things like bond wire inductance. We had three different regulator products released by the design group that later were found to be unstable under conditions they never tested.... just simulated. The LP3963 got out unstable and cost the company many millions when we were sued by Japanese companies to recover their wasted product and rework cost on parts that did not work as advertised. That got up to the CEO (Halla) and we were issued a blanket warning that the next oscillator was going to mean people fired. But the designers still used sims for "test data".

    I caught one of them (LP38501) on my bench the day that marketing was going to release the ad with erroneous information. I stopped it in time although the magazine had to run an empty space where our ad was supposed to be. I wouldn't trust a sim to give valid stability data for all the gold in Fort Knox.

    Here is the data sheet for the LP38501 which the designer guaranteed would work with ANY input and output cap. Look at the text I put in on page 16 for the input capacitor. It shows what is required to stop the oscillations I found. The designer showed me the sim data proving that it was stable all the way down to an ESR of zero Ohms on CIN. I walked that idiot into my lab and showed him it oscillating.... we all missed being fired by that much.

    http://www.ti.com/lit/ds/symlink/lp38501-adj.pdf
     
    Last edited: Apr 17, 2016
    • Like Like x 1
  7. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,593
    Likes:
    477
    Location:
    L.A., USA Zulu -8
    The least you can do is not quote me out of context to make a point.
    My full statement was: "but it's rare for a circuit to not simulate correctly (other than simulator problems such as convergence issues) but still work in practice."

    You seem proud of the fact that you'd rather do it the grunt way and debug your breadboard rather then use a tool that could help you avoid many of those bugs before you built it. I don't really understand that reasoning but to each his own.

    I fully realize that you have to breadboard the circuit before you release the design. Never implied that you shouldn't
    But it can save a lot of effort and redesign and lengthy troubleshooting if you simulate the design as best you can with estimated parasitics and component tolerance variation before you build it, is all I'm saying.
    Try doing a Monte Carlo test of component tolerances with a breadboard circuit. :rolleyes:
    I've had to deliver working designs for military and space systems, and I simulated them first before I built them. That saved me a lot of grief.
     
  8. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    OK, then I really don't get the point of your statement. It's rare for it to simulate as not working but still work in practice? Who would care if that happened, that would be fine, you would end up with a working circuit. What we are discussing is the chronic use of sims which show a circuit working which does NOT then work in reality, and the labeling as luddites as those who believe that building the circuit should be the development cycle.

    This horse has been beaten to death, but aside from my personal experience showing me to NEVER rely on sims as final word on a working design, the real problem is what I pointed out before. hands on building, debugging and analyzing (using one's brain, not a computer) is essential to understanding how the circuits work. And that is essential to ever obtaining the ability to design.... as opposed to copying circuits off the internet, screwing them up in the build process, then asking peole on forums why they don't work.

    This is epidemic in schools and it shows here: students do their "labs" in sims and the professors are accomplices to this because it makes less work for them. But at some point, they actually have to learn how to design circuits, build them and debug them. I never assume anything I build will work right the first time, but it will by the time I am done. I believe bench data. That makes me a luddite.

    But that's not what they are being used for. Just read the posts on this forum if you want examples. In 20 years I never saw a single person using one for that. They all use them in system sims to replace discreete components to avoid building prototypes.

    Did you see the legal disclaimer TI has added to NS data sheets I posted:

    "Customers should validate and test their design implementation to confirm system functionality."

    You probably have no idea how bad they were being misused before the sales/marketing group would allow such a statement to be placed on a document. Not that I dispute the need, I just wish they would have done it when I worked with them. The point is that says it all. I don't use sims because I don't need them. And I think 99.9% of the people who do use them are using them as crutches in place of knowledge so I don't like that.
     
    Last edited: Apr 17, 2016
  9. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    I have had to fix lots of designs where people just kept changing components on a bread board "until the prototype circuit worked", and on that basis, they put it into production. Then they hired me to figure out why they had 25% fail rates at final test.

    Simulation is the key to finding how the circuit is effected by component tolerances, voltage, thermal and environmental conditions.

    How are you supposed to build a VLSI chip (millions of transistors) using breadboarding when a single IC production run costs $millions? Simulation is used extensively (and exclusively) in IC design.
     
  10. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    Which does not say that a customer should not simulate their design. It doesn't say how the customer should validate their design, just that they should.
     
  11. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    Apples and oranges. What we are talking about is using sims in place of building or actual bench data which is what they are used for about 99% of the time in both system design and IC design.

    If people actually confined sim use to where they are applicable I wouldn't care. It just amazes me sometimes to see five page threads run about sims to a circuit that would take 15 minutes to breadboard.

    As for IC design, I know exactly how sims are used and what their shortcomings are. I spent 20 years as the backstop whose job it was to find all the things that they missed. They have specific uses. When used correctly, they are OK.

    As for "tolerance analysis", I have been doing that for 30 years far before sims existed. In the 70's, we built all IC's on breadboards using kit parts and had "over under" boards to check performance at process limits. Sims can be useful for such "variance" calculations, not for absolute performance . The problems start when people use them for performance testing.
     
    Last edited: Apr 18, 2016
  12. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    So... you read the following:

    " Customers should validate and test their design implementation to confirm system functionality. "

    and think that a simulation qualifies as test confirmation that the system will function as designed?

    You couldn't have proven my point any better. That's what I have been saying all along. That's the problem I dealt with all the time and clearly, TI is fed up with it. The other thing is that data sheets are binding legal contracts in some countries (like japan) and they are putting that in as a legal warning to customers.

    Sims (at best) give data that is fairly close typically over a narrow range of conditions (Vin, Vout, Load, etc). In many cases, that is because the sim was "dialed in" to match given bench data over that range not because the sim accurately represents the circuit's performance. That is reality.

    When people think prototype performance can be verified using only sims, that's the problem. If they have a proven, working design and want to do some tolerance spreads, I have no problem with that.

    Maybe so. There are plenty of clueless "designers" out there.

    I'll guarantee I had a lot more cases of people calling to ask how to get the sim we had for our part to work in their "Sabre" model or whatever the heck they were using to do their prototype and thirty seconds of conversation proved they didn't even under stand the basics of what the part did.
     
    Last edited: Apr 18, 2016
  13. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,032
    Likes:
    952
    Location:
    NJ
    Hello there,

    On the design and testing of circuits, there is an order that is most logical.

    1. First comes circuit theory. The more you have of this the better.
    2. Second comes simulation. This helps to validate the theory and operation.
    3. Third, breadboarding.
    4. Forth, field testing.
    5. Production.

    Theory helps to understand HOW the circuit SHOULD be designed and what the pitfalls might be.
    Simulation helps to verify that the theory worked ok with simulated practical components.
    Breadboarding helps to verify that the practical components actually work in the design.
    Field testing helps to verify that the actual environment does not bother the design too much.
    Productions comes when all is considered to be well.

    Many people skip right from 1 to 2, because the available theory may be limited or too difficult.
    Simulation can help to reveal problems but only if you look for them.
    Breadboarding helps to verify with real parts, but if something goes wrong we have to go back to theory and/or simulation because changing parts ad hoc can bring about other secondary effects that we did not know about. Adding capacitors here and there is a good example which can clear up one problem and bring about another as yet undetected problem.

    If we were going to cut a board for a shelf that had to fit in a space 32 inches long, we would use a ruler, we would not keep cutting until it fit. If we cut too short we screw up the whole job and have to buy another board to start with.
    Theory is like that ruler where we can figure out what we actually need before we go about doing it.
    Simulating is like drawing the board and space on paper or computer to see what is involved.
    Breadboarding is like actually cutting the board, and if we do it according to the ruler we get it right the first time.

    The only difference is in electronic work we can get more close in theory and simulation to what we actually need.
     
    • Agree Agree x 1
  14. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    Did I say that? You are putting words in my posts...

    You think that the disclaimer says that simulation is no good. It doesn't!!!

    I think that the disclaimer says: Customers should validate and test their design implementation to confirm system functionality by any means possible, including simulation (emphasis mine).


    You obviously don't bother to read .sig lines....


     
    Last edited: Apr 18, 2016
  15. Mikebits

    Mikebits Well-Known Member

    Joined:
    May 24, 2008
    Messages:
    6,214
    Likes:
    174
    Location:
    San Diego, Ca
    ONLINE
    It sounds to me that you are blaming the tool when in fact you should be blaming the users who are using the simulations as there test bench. The sim tools when used as adjunct to the design flow, is an invaluable tool and probably saves thousands of dollars in board redesign, in-fact I have worked at fortune 500 companies that preached simulations as part of the design flow.

    I recently started using LTSpice again and I think it is wonderful, I built a RF splitter, and just as an exercise I also simulated it. I was able to compare my actual test results with the simulations and they were almost identical in behavior of the model versus the real deal. Below was the RF splitter I simulated:
    Due to Test equipment limitations, I was only able to do some of what the simulator could do, so the sim results gave me an extra bit of confidence in my splitter design.

    [​IMG]
     
  16. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    Speaking of inventing words......

    "You think that the disclaimer says that simulation is no good. It doesn't!!!"

    What I am saying, and clearly TI is saying, is that to verify functionality you have to actually verify functionality meaning make sure it functions as it is supposed to. period.

    Here is the definition of the verb "function" as it applies here:

    "to perform a specified action or activity; work; operate."


    A sim does not verify that. A SIM is a model which HOPEFULLY reflects functionality (over some conditions) and in many cases fails to do that accurately. Whether a sim is "any good" depends on how it's used.... if it is used as a substitute for a prototype build, then it's certainly no good for that.

    And yes, what you said:

    "Customers should validate and test their design implementation to confirm system functionality by any means possible, including simulation "

    underscores the point I have been making all along. Many people (maybe most) mistakenly believe that running a sim is an adequate substitute for verifying operation and that leads to massive problems. TI knows it and their data sheets give them some legal cover against being sued by people who did not adequately verify their designs. I guarantee you that what you added is not what that statement means and if you build a product which falls on it's face in the field and try to claim the sim should have been adequate.... they will explain it to you. It still amazes me they got enough political momentum to force the sales group to allow that statement to be put on the D/S. Something really bad must have happened.

    I have said what I have to say on the subject and you simply keep repeating the same erroneous statement over and over (that a simulation verifies functionality) so I now will be leaving this thread.

    adieu
     
    Last edited: Apr 18, 2016
  17. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    I am not blaming as much as I am WARNING that sims should not be used as a substitute for bench data..... and that is exactly how they were used in about 99% of the cases I have been involved in.

    I also have stated that I think young engineers (and students) use them as a crutch. IMHO, the process of analyzing, debugging, trying new things is how designers gain the skills they need and the sim generation is not getting that anymore. I freely admit that is my opinion (based on posts I see and my experience). You can not be a designer when all your "experience" has been by downloading circuits off the net and getting other people to help you get them to work.

    Like I said: I don't have a problem with sims if they are used correctly.

    But when you have people claiming that they verify system performance? Speaks for itself.
     
  18. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    If you think that's what you need, that's fine. What you don't realize is how many people think #2 is an adequate substitute for #3 (just read the post 95 above). What I am saying is there are plenty of good designers who don't need #2 and go straight to #3. My gripe is with people who skip #3 and then call the company's apps line or start posting all over the internet looking for people to do their job.
     
  19. gary350

    gary350 Well-Known Member

    Joined:
    Dec 28, 2005
    Messages:
    1,097
    Likes:
    53
    Location:
    Murfreesboro, TN 37129 USA
    I fail to understand why anyone would put a battery charging circuit on a Lead Acid battery since lead acid batteries are self regulating. A battery that is very low will take a high charge but as the battery becomes charged it takes less and less charge. When the battery is almost fully charged it will take almost no charge.
     
  20. ronv

    ronv Well-Known Member Most Helpful Member

    Joined:
    May 30, 2010
    Messages:
    4,725
    Likes:
    488
    Location:
    Tucson, AZ. USA
    Maybe I spend to much time here. It is usually way to easy to simulate someones project to see why it doesn't work. I can't imagine building them all.
    Just seems silly to have this nice tool in the box and not use it. :banghead:
    Edit:
    But I could eat raw meat - just not as tasty to me.:)
     
    Last edited: Apr 21, 2016
  21. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    LA Batteries are not self regulating. What makes it appear that they are is charging them with a voltage regulated (or at least voltage-regulated) charging source. If you dont believe me, try charging a six cell LA Battery with a power supply set to 20V open circuit...
     
    • Agree Agree x 1

Share This Page