Author Topic: Please Help with LTSPICE for My Battery Charger Circuit  (Read 40456 times)

0 Members and 1 Guest are viewing this topic.

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Please Help with LTSPICE for My Battery Charger Circuit
« on: December 22, 2021, 04:46:51 pm »
I am a fairly skilled, self-instructed circuit amateur design engineer of sorts, but I've not yet learned yet on how to use the powerful simulator LTSPICE and  I know that knowing how to use this tool is very important if I am to take my engineering skills to a new level.

Please,  could some  electronic design engineer or more experienced person show me how or even just point me to learn how to learn LTSPICE myself well enough how to analyze my circuit?

Please see the attached .asc file

I am new to using LTSPICE and hope someone could help me set it up to analyze my battery charger circuit.

My circuit idea is to  charge a series string of any combination of up to four insertable AA and AAA NiMH cells at the same time.

While 500mA CC is a good choice for charging current for AA, it is over twice the current (as seen on the battery label) recommended for charging AAA cells.

To allow charging both AAA and AA cells at the same time, my circuit attempts to shunt the charging current around the AAA cell when the charging current exceeds .25-Amp or when the voltage across the battery exceeds the maximal charging voltage of 1.6V.

When the MOSFET is off, the .5-amp CC charges C1 slowly, and this increase in voltage causes the charging current to reach a threshold high enough to charge the battery and then charging current increases very rapidly within a short time.

|n a simulation I want to have the MOSFET turn on when the voltage across the NiMH battery reaches 1.6V from the .5 amp Constant Current Source.   The MOSFET should turn off again when the voltage across the battery falls back to 1.5V.

What I want to do is to try to find a value for C1 that would allow a slow slew up in charging current to reach the 1.6V level. At the this point the MOSFET shunts a 2.2-ohm resistor across the CC source to disconnect it from charging the battery and discharge C1.

What I need to find out what optimum value of C1 would allow the charging/discharging of C1 to be slow enough/optimal  for a MCU to control this oscillation driving the MOSFET in the simulation.

If I can see if this idea is practical, I plan to code a MCU  to generate a 39KHz 10-bit PWM MOSFET gate drive to control the 4 MOSFETs after making A/D measurements and thus manage the charging operation of all 4 cells.
----
Seems like a simple relaxation oscillator problem with LTSPICE, but I have yet found no idea how to get LTSPICE to do this.

I previously posted the topic to get some help, but didn't get any help:

https://www.eevblog.com/forum/projects/simple-mixmatch-aaaaa-4-cell-nimh-charger/

Thanks for your help!
« Last Edit: December 28, 2021, 06:53:57 pm by SuzyC »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #1 on: December 22, 2021, 05:08:49 pm »
Possibly the other thread didn't get much response because the characteristic behavior of NiMH cells when being charged, and the best way to charge them, has been thoroughly described and documented for the past many years. People will get a little weary when a post is made that does not reference any of the existing theory or documented best practice for charging such cells.

Nearly always, battery charging is based around a constant current circuit. This is true of NiMH, lithium ion, and lead acid.

With NiMH, one option is to use a very low constant current and simply wait for a given time, or wait until the terminal voltage stops increasing. This is suitable if you have hours to wait for charging to complete, and is also suitable for charging several cells in series.

The second option is to use a rather higher constant current and monitor the battery conditions for an end of charge signal. Common signals used include looking for the voltage to start decreasing, or looking for a sharp temperature rise. See the attached chart where I monitored an AA cell while charging it at a constant current of 1600 mA. You can see the very clear voltage and temperature signals that occur when the charging is complete. These signals are best detected with some kind of microcontroller logic. If the charging current is too low, these end of charge signals will become less distinct, so higher charging currents are preferred.

Therefore, the ideal battery charging topology for NiMH will be a constant current circuit in the analog domain, and a microcontroller program in the digital domain, with measurements of voltage and temperature as inputs to the microcontroller.
 
The following users thanked this post: SuzyC, tooki

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #2 on: December 22, 2021, 05:16:59 pm »
Thanks IanB,

I am well-aware of many(if not nearly all) common circuits for NiMH charging circuits and their charging strategies, even if I might have failed to make this obvious in my initial  posting!
I have done my homework.

What I wanted was to try a new approach of my own that attempts to improve upon the speed and versatility of common consumer and industrial NiMH chargers.

In my attached .jpg schematic, I have attempted to show that a a cell temperature monitoring thermistor is part of the charging scheme and my MCU is certain to monitor each  cell's temperature continuously and would terminate charging when a 5 to 10 Deg C rise above ambient is noticed, and this means charging is optimally completed. At this point my code turns the MOSFET continuously on and this completely shunts any charging current away from the cell being charged.
« Last Edit: December 22, 2021, 05:37:47 pm by SuzyC »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #3 on: December 22, 2021, 05:41:16 pm »
I'm really not an expert on LTSPICE, but I think the best way to begin is to start by simulating small circuit elements and gradually build things up, adding one extra piece at a time.

One question to address is the initial condition for the simulation. For a circuit that cycles, you typically would have to do a "zero volt" start up and run enough cycles for it to stabilize. I don't know if there is a better way to set up the initial conditions. A spice expert might be able to say more.
 
The following users thanked this post: SuzyC

Offline tooki

  • Super Contributor
  • ***
  • Posts: 14786
  • Country: ch
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #4 on: December 22, 2021, 09:15:05 pm »
Thanks IanB,

I am well-aware of many(if not nearly all) common circuits for NiMH charging circuits and their charging strategies, even if I might have failed to make this obvious in my initial  posting!
I have done my homework.

What I wanted was to try a new approach of my own that attempts to improve upon the speed and versatility of common consumer and industrial NiMH chargers.

In my attached .jpg schematic, I have attempted to show that a a cell temperature monitoring thermistor is part of the charging scheme and my MCU is certain to monitor each  cell's temperature continuously and would terminate charging when a 5 to 10 Deg C rise above ambient is noticed, and this means charging is optimally completed. At this point my code turns the MOSFET continuously on and this completely shunts any charging current away from the cell being charged.
You need to look into the theory of NiMH cells more. An absolute temperature rise doesn’t tell you much. There’s a reason proper chargers use delta-V/delta-T termination: it’s the increase in rate of temperature rise that tells you charging is done. (The internal resistance of a NiMH cell increases once it’s full, which causes the cell to heat faster, and the voltage to drop.) A NiMH cell, once full, converts any further current to heat, in turn causing its internal resistance -- and thus the voltage drop -- to fall. (Thanks to IanB for the correction!)

The chemistry and charging of NiMH cells is well understood; the chances you could actually improve upon it are vanishingly small.

Absolute temperature rise is useful as a safety cutoff, though.
« Last Edit: December 29, 2021, 02:07:12 pm by tooki »
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #5 on: December 22, 2021, 10:18:02 pm »
Thanks Tooki, for the encouragement!

It is always enjoyable to know that encouraging experimenting with designs on this blog is always known to be a way to encourage  people to learn about electronics. I am glad this blog often encourages people to experiment with their own designs to create their own electronic devices. Some blogs just tell posters to go out and buy a module to do what they want..no learning in that!

I may not be able to make something that is better than the best industrial-grade chargers, but I know I can design my own charger circuit and assembly that could outperform most consumer-grade multi-cell chargers in charging and in regard to protecting the battery and the charger itself.

I know that while a NiMH battery is being charged very little energy is turned into heat until charging is complete, especially with C/4 charging conditions. Therefore, any increase in cell temperature, assuming ambient temperature is stable, is charge current generating heat because the battery has nearly or already reached full charge. 

There can be no other explanation for the rise in temperature.  My design also incorporates an ambient temperature measurement of the charging area to ensure accurate thermal rise comparisons.

I also want to  build a gentle charger that doesn't overcharge any cell because too much cell heat rise certainly damages the anode and weakens the cell.

I am measuring the temperature of the cell on the back of the positive cell charger connector area, the back of the place where the positive tit on the cell contacts the charger connector. Perhaps I will measure a smaller detected temperature rise at the back of  the positive charger terminal, but this event could certainly mean there is a much larger rise in temperature inside the core of the battery and charging is finished.

I have examined some delta-V chargers that fail to protect the cells(or the charger itself) because they fail to measure cell temperature at all, and the charger connects all the cells in series, and if a fully charged cell inserted into such a charger, the chances are good that this cell would become overcharged and leak.  This is  exactly what I've noticed with a  charger of this  design.


« Last Edit: December 22, 2021, 10:52:05 pm by SuzyC »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #6 on: December 22, 2021, 10:27:26 pm »
There’s a reason proper chargers use delta-V/delta-T termination: it’s the increase in rate of temperature rise that tells you charging is done. (The internal resistance of a NiMH cell increases once it’s full, which causes the cell to heat faster, and the voltage to drop.)
It's true about the rate of temperature rise. When the cell is charging, most of the supplied power is accumulated inside the cell, but once the cell nears full charge it can no longer accumulate energy and the input power starts to be dissipated as heat, causing the sharp uptick in the temperature. Simultaneously, the increase in temperature causes an increase in ion mobility in the electrolyte, which decreases the internal resistance, which causes the minus delta-V that can be detected. Both of these effects can be seen in my chart on the previous post.

You get stronger delta-V and delta-T signals with higher charging currents; if the charging current is too low there is a chance of missing the signals.
 
The following users thanked this post: SuzyC, tooki

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #7 on: December 22, 2021, 10:28:47 pm »
I have examined some delta-V chargers that fail to protect the cells(or the charger itself) because they fail to measure cell temperature at all, and the charger connects all the cells in series, and if a fully charged cell inserted into such a charger, the chances are good that this cell would become overcharged and leak.  This is  exactly what I've noticed with a  charger of this  design.

The "best" chargers charge and monitor each cell individually. Only the "lazy" chargers charge the cells in series.
 
The following users thanked this post: tooki

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #8 on: December 22, 2021, 10:30:51 pm »
Thanks again IanB! I can see you are one of the rare esoteric fluid-flow experts that is able to understand the electrolytic events inside a NiMH cell.

This is exactly why I am relying on temperature rise to detect when to stop charging, a Delta-V might be missed, especially if the charger charges all the cells inserted in series and each cell is from a different use and therefor at a different state of discharge.

And at the same time, with my design, other cells that have been inserted into the charger can continue to charge until their own temperature rise terminates charge.

No lazy chargers for me!
« Last Edit: December 22, 2021, 11:07:19 pm by SuzyC »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #9 on: December 22, 2021, 10:34:18 pm »
Some of the better chargers I own have a plastic cover that I believe is to minimize air circulation and keep the heat in--this helps with the temperature detection. Another charger that has no cover has the instruction to plug it vertically on a wall, and not to lay it flat on a desk, presumably for the same reason.
 
The following users thanked this post: SuzyC, tooki

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #10 on: December 22, 2021, 10:38:52 pm »
One must be most careful with the care and feeding of their NiMH cells to ensure their health and long life!

The legacy charger chassis that I am using to make my "Novel Improved Charger" has a plastic lid that prevents errant winds from  upsetting those cells under treatment. This old charger is quite large in size and there is a cm or more between cells. This benefits my design because it prevents adjacent cells from heating each other and confusing their charge state.
« Last Edit: December 22, 2021, 11:08:02 pm by SuzyC »
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #11 on: December 27, 2021, 02:40:37 pm »
Suzyc, how is the evolution of your project going?

If I understood correctly, when reaching the 1.60 volts, the load should be interrupted and re-established when the battery voltage reaches 1.50v. This leads me to understand that the battery voltage will have the behavior represented in the image below (blue lines). You then want to determine the size of the capacitor, to have a more damped drop, as line in red. That's it ?
 
The following users thanked this post: SuzyC

Online Peabody

  • Super Contributor
  • ***
  • Posts: 2561
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #12 on: December 27, 2021, 03:18:12 pm »
Going back to your original question about LTspice, I went through that learning process a while back on a solar charger for 18650 batteries.  I found the Youtube videos to be the most helpful source for how to do things, including Dave's video #516 and some tutorial videos posted by Linear Techology and others.  One thing you have to watch out for is there are two versions - 4 and 17 - and there are some differences in how they work.  Try to stick with v17 if you can.

I did not find anything in LTspice in the way of a solar panel, but found a video that gave me that.  But I still haven't found a way to simulate a TP4056 charger.  You can simulate a NiMH battery as a voltage source, but I doubt you will find anything that simulates a battery's behaviour during charging, which it seems is what you really need.

I'm an amateur, and maybe that's why I found LTspice to be non-intuitive and difficult to work with.  I hope you will find it easier than I did.  In any case, I think you'll do best if you watch a bunch of video tutorials on Youtube.
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #13 on: December 27, 2021, 08:56:02 pm »
Avelino, Sampaio & Peabody..Eggsactly! Thanks for bringing my topic back to life.

Actually, with my many hours of searching, I found an LTSPICE model for a 1350mAH NiMH cell.

I have watched most everything on YouTube re. LTSPICE, but models of antennas, noise-figure analysis, oscillators of several types, LT IC circuits and many other circuits with op-amps, etc.  are all over the place, but battery charging circuits that come anywhere close to my idea.. I'm still looking.

I don't know how to create the LTSPICE directives/code that shows operation linking/simulating voltage across the capacitor and the turning on/off of the MOSFET.

Attached is my non-working LTSPICE .asc file.

It's just a relaxation oscillator.

It's this simple: When the MOSFET is on, the 2.2-ohm resistor discharges the capacitor a little and then the MOSFET turns off and the  500mA const cur source then ramps up the capacitor's charging voltage slowly to a point where the MOSFET is turned on again.

I want to see how to get a MCU to manage to dither charging current in a Goldilocks zone of operation. where each cell's voltage and current is dithering minimally and yet kept in a range near optimal charging voltages and currents.

I need to limit the charging current into AAA cells in the string of charging cells to ~250mA and also want to accurately measure the average charging current to determine the mAH of charge. If all this is achieved, It is easy enough then to terminating charging where a rapid rise in  cell temperature indicates charging is done(I have thermistor monitoring for each cell  in my design detecting that).

.
« Last Edit: December 28, 2021, 03:18:48 am by SuzyC »
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #14 on: December 27, 2021, 11:28:12 pm »
SuzyC

Tomorrow I'll test the circuit on my protoboard and give you the results.
 
The following users thanked this post: SuzyC

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #15 on: December 28, 2021, 03:19:58 pm »
SuzyC

I decided to start the tests controlling the current to 250mA, simulating the use of the AAA battery.

image1 : circuit I used for this test.
Image2 : without using the capacitor. Oscilloscope in DC. Note the huge spikes displayed on the battery. The DUTY was adjusted by 30% to reach 250mA (image 3).
image 4: with the use of a capacitor (100uf). Oscilloscope in AC. The DUTY is adjusted by 56% to obtain 250mA (image 5).

ADC reading will not be compromised? What is your assessment?
« Last Edit: December 28, 2021, 03:21:55 pm by Avelino Sampaio »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #16 on: December 28, 2021, 06:00:25 pm »
I thank you much for your effort so far. 

Firstly, I truly approve using a MacGyver approach to designing a quick and dirty circuit to very quickly create a circuit solution that would work "good enough". This seems what you are doing here. MacGyver gets his ideas to work perfectly every time!

I am not sure I can gain much from these pictures to help my design effort, though. This is not what I was expecting to see in LTSPICE.

It' s not quite the '393 circuit you said you would breadboard and I am not sure where the probes are in any picture.

I am surprised by the size of the spikes and would certainly like to find out their cause.

A LM317 could generate transients like this and would behave naughty like this if the load is rapidly changing(which it is), else perhaps is is also the recovery time of the 1N4007 diode in series with battery(or are all the spikes due to extra long wires or uncompensated probes?)
Adding a 1-amp 30V schottky diode in series with the 1N4007 might solve part of the spike problem.

Try using an output capacitor from the LM317 output to ground?, else a fast output compliant CC SMPS P/S for the const. cur source might also be needed if the LM317 is the fault. I would not expect to use a LM317 in my circuit because of it's slow transient response and the heatsink required.

I am not sure what your are measuring these pictures,  I guess, but I am not sure if the scope probe in all the pictures is always across the top of the diode to the bottom of the battery.
-----------
I am trying to get away from a cut and try approach to circuit design and instead use LTSPICE and some math to try to get this circuit to work.  At the same time, I also understand there is always a need to prototype a circuit after using math and
a circuit simulator. But most of all, I want to be using math to create a careful design that would be tested to verify correct operation.

Most importantly, the behavior of the constant current supply  under changing load is something that must be explored by actual testing.
---------------------
For instance, discharge of the capacitor:

the capacitor is only being discharged by a 2.2-ohm resistor when the MOSFET is on.

The time-constant formula T=RC can be  used to show the capacitor discharge voltage waveform.

With a little more math, it is also possible to determine then the time it takes to partially discharge a capacitor (ok, pick and try I admit, by plugging in various capacitor uF values) to achieve an optimized discharge change in voltage (a 200mV decrease (perhaps) from the cell reaching 1.7V) , but find a suitable time charge/discharge time compatible with a MCU monitoring all four charging circuits in series. 

Charging the Capacitor and the cell when the MOSFET is turned off again:
 (DeltaV/DeltaTime)= (Current/Capacitor uF).

 A capacitor charges linearly with time when a constant current is applied.

======
What would be revealing would a scope image of both the current and the voltage across the cell at the same time.


I see that you first adj. the duty cycle to get the a 250mA charging current, but only a dual-trace scope picture would show the actual charge current (across a sensing resistor, (perhaps a 1-ohm  to ground would work) ) in one trace and the other simultaneous trace should show the voltage across the cell. This requires using at least a dual-channel scope.

Why not use the Hantek to show what's going on?
« Last Edit: December 28, 2021, 07:20:53 pm by SuzyC »
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #17 on: December 28, 2021, 07:45:47 pm »
I am not sure what your are measuring these pictures,  I guess, but I am not sure if the scope probe in all the pictures is always across the top of the diode to the bottom of the battery.
The oscilloscope is measuring the value on the battery.

A LM317 could generate transients like this and would behave naughty like this if the load is rapidly changing(which it is), else perhaps is is also the recovery time of the 1N4007 diode in series with battery(or are all the spikes due to extra long wires or uncompensated probes?)
I'm using the MUR160.

It' s not quite the '393 circuit you said you would breadboard and I am not sure where the probes are in any picture.
I had already done some preliminary tests but I will redo them. For example, look at the result of the voltage over the battery in image2 without using the capacitor. Also note the frequency. The LM393 is slow and I am using a relatively large resistor in the mosfet gate. I will also test with the LM311.

I'm going to add the 100uf capacitors, as shown in the image 1, and I'll run new tests.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #18 on: December 28, 2021, 10:31:09 pm »
I am having difficulty identifying pictures attached. I am confused. I don't know which images are what image numbers, all your pictures are not named or numbered this way.
If you are first referring  to the image directly under the previous schematic, then seeing 2.55 volts at its peak, across the cell, is quite alarming.

The latest picture you've sent shows around a 1-uS period, if the 315mV waveform is with a LM393 circuit driving the MOSFET, it makes sense, but shows that charging is occurring only about 25% of the cycle and the average current is unknown.

This circuit is perhaps not charging the cell 3/4 of the charging time. Using AC coupling doesn't show the actual cell voltage or current, just the change of cell voltage. In any case, an exceedingly fast A/D on a MCU would be required to manage even one cell charging with this circuit, unless the MCU is only monitoring cell voltage while charge pauses or is just reduced in function to monitoring cell temperature.

Why use a LM393 that does dumb charging when a MCU could replace this charging charge/discharge function intelligently?
« Last Edit: December 28, 2021, 10:43:10 pm by SuzyC »
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #19 on: December 29, 2021, 12:01:44 am »
SuzyC,
Quote
Why use a LM393 that does dumb charging when a MCU could replace this charging charge/discharge function intelligently?
i have the PIC12F765. If you send the programming (hex) I perform the test.

Below is the image of the last test, with all the 100uf capacitors installed. What changed well was the amplitude, which was 400mv-pp.
« Last Edit: December 29, 2021, 09:33:20 am by Avelino Sampaio »
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #20 on: December 29, 2021, 05:44:06 am »
Don't mean to be picky, but there is no such thing as a PIC12F765, according to Microchip.
Perhaps a typo, maybe you meant PIC16F765?

The latest waveform shows <=50% charging time. A charger should not waste time charging a cell and this waveform guarantees that approx. half the time the design causes a cell to not being fed electrons.

My idea here is too evaluate an unusual circuit for a charger. In design of a charger, there are always alternative ways to accomplish a task.  If a circuit, after some experimentation, seems like a hare-brained idea then it is a poor choice to accomplish the goal, and one should  then go back to the drawing board!

There are more ways to skin a cat.  A plan B might be better here.

A circuit idea might be a good idea to be implemented if:
1) It accomplishes a task better than an alternate circuit.
2) It is cheaper to make, easier to find parts for, easy to make, yet gives as good performance as alternatives.
3) It has fewer and inexpensive components than other circuit ideas, but doesn't compromise performance.
4) It has a smaller PCB footprint, yet works as good as an alternate.
5) It offers many advantages in performance, it is more versatile, easier to repair than alternatives.

A circuit idea should be abandoned or rethought if:
1) It is a dumb way to do something, unstable, hard to fabricate, uses hard to get, obsolete or imaginary components, performs erratically, costs too much in parts, wastes time accomplishing a design goal, doesn't perform as well as alternative circuits, isn't safe, likely to catch fire or burns, scares small children, police or pets, or likely to explode or maybe just trying to set it up to work causes incidences of mental illness, severe frustration and depression, or its operation cannot be understood by ordinary people, or is likely to require a visit by a Buddhist priest for a blessing, and even then requires summoning both a member of the clergy and then an exorcist to get it to work, or just brings bad luck to anyone who constructs it and tries to use it.
2) Hasn't been optimized to work well so much that it causes unexpected results, causes damage to the environment, damages libido, else somehow causes pains in the neck or the posterior,  else its implementation just causes you to be shamed and shunned by your friends, parents, peers and also insults your ancestors.
3)Hideously ugly.

So, maybe too early to throw code at an imaginary chip?
« Last Edit: December 29, 2021, 06:06:27 am by SuzyC »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12800
  • Country: us
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #21 on: December 29, 2021, 06:03:25 am »
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 838
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #22 on: December 29, 2021, 06:24:40 am »
The 4-cell circuit requires legions of A/D input pins, the 12F675 only has four and even lacks a 16-bit timer and so little flash code memory or data to cause a coder to experience loss of sleep, ennui, possibly hallucinations of grandeur.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13889
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #23 on: December 29, 2021, 09:25:54 am »
Additionally the PIC12F675 is notorious for loosing its OSCCAL internal oscillator frequency calibration and the bandgap voltage reference calibration during development, and its got Microchip's original 14 bit 'midrange' PIC core, which makes it a PITA to develop for.   Its also overpriced when compared to more modern 8 pin PICs and indeed other brands of low pin count MCUs.  Unless supply chain issues, or massive legacy stock in hand force your hand, you'd be crazy to use it for a new design.
 

Offline Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: br
Re: Please Help with LTSPICE for My Battery Charger Circuit
« Reply #24 on: December 29, 2021, 09:49:40 am »
SuzyC and Ian.M,

this here is looking like a conversation between drunks. The PIC12F675 is sufficient for the circuit I'm testing, so an ADC input is sufficient. All I asked for was the programming to test the 1.6v cutoff voltage, in place of my test with the LM393. Who said here that I'm proposing this PIC12F for the original project?

Well, I think you already have enough information for you to move forward or not.
« Last Edit: December 29, 2021, 10:24:30 am by Avelino Sampaio »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf