A Forum run by Enthusiasts of MidNite Solar

General Category => New Product Ideas and Discussion => Topic started by: Barry Fields on October 16, 2023, 09:04:21 PM

Title: Parallel Bank Monitor
Post by: Barry Fields on October 16, 2023, 09:04:21 PM
I have several steps in solving problems.
1) Admit a problem exists.
2) How significant is the problem.
3) Solutions   Ignore it - Fix it when it occurs - Predict it's occurrence - Prevent it from occurring

THE PROBLEM
In systems with multiple parallel battery banks, one failing bank can drag down the other banks. It would be best to be able to identify a failing bank before it becomes a larger problem.

A PREDICTIVE APPROACH
By monitoring and comparing currents in and out of each individual bank, a failing bank could be identified for further assessment and corrective action.

A POSSIBLE SOLUTION
Attached is a rough suggestion for a device to do this PREDICTIVE MONITORING. I would suggest the following:
1) Set an alarm should any bank current deviate by more than 5% (best guess). The alarm would suggest further diagnosis of the problem and corrective action.
2) It should be a stand alone unit. That is, not dependent on external processing but have the ability to communicate with a MidNite charge controller/software if desired.
3) A 12 volt version might be unnecessary or look much different. (marketing decision)

NOTE
It is not my intention to cover all the possible diagnostic/corrective actions in this post. They might include: loose connections, an undercharged cell, water levels, battery age, voltage readings, SG readings if possible etc.

Any and all comments or suggestions would be appreciated.

EDIT
Sorry it was late at night.
In the upper left of the display - 00.00 is real time bank voltage
All amps are real time for short term issues.
All KWH and Efficiency data are cumulative and re settable.


Title: Re: Parallel Bank Monitor
Post by: boB on October 16, 2023, 09:52:10 PM
I love the idea !

Just costs money of course...   Have a display that shows relative  running average of Amp-Hours between the battery strings and monitor it.

The reporting of some threshold for failure of one of those strings would be handy.

I could see several shunts, each with their own Whizbang Junior feeding a cow milking looking device to handle the data.

boB

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 17, 2023, 10:20:14 AM
Quote from: boB on October 16, 2023, 09:52:10 PMI love the idea !


I could see several shunts, each with their own Whizbang Junior feeding a cow milking looking device to handle the data.

boB



I just added this edit

EDIT
Sorry it was late at night.
In the upper left of the display - 00.00 is real time bank voltage
All amps are real time (for short term issues).
All KWH and Efficiency data are cumulative and re settable (for medium/long term trending).

You may consider that it should work with a variety of shunts to broaden the marketing base.
In my case I do not have a MidNite controller or a WizBang. I presently use a 100a 75mv shunt on one of 4 banks for data. My design has a max buss draw of 300A (75A per bank). For me I would choose 4ea 200A shunts.
Should be flexible.

Thanks for the encouragement
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 17, 2023, 10:51:16 AM
Something else I do not know:

Do any of the existing Lithium battery management systems do this kind of Inter-Bank monitoring?
If so, what price bracket are they in?

Also, no insult intended but I prefer to deal in KWH as opposed to Amp Hours. All my loads are rated in and use watts, not Amp Hours. Just saying.
Title: Re: Parallel Bank Monitor
Post by: boB on October 17, 2023, 01:47:07 PM

All of these lithium battery banks are expensive but usually have communications for when stacking them in parallel for larger systems.

kW-hours can be done easily through software.   Most of the lithium battery banks also have communications that show either current and voltage and maybe even kW-Hours as well so that should be easy to connect up to an external computer of raspberry pi or something like that.

boB
Title: Re: Parallel Bank Monitor
Post by: ClassicCrazy on October 17, 2023, 08:11:48 PM
Quote from: Barry Fields on October 17, 2023, 10:51:16 AMSomething else I do not know:

Do any of the existing Lithium battery management systems do this kind of Inter-Bank monitoring?
If so, what price bracket are they in?

Also, no insult intended but I prefer to deal in KWH as opposed to Amp Hours. All my loads are rated in and use watts, not Amp Hours. Just saying.

I guess you could get Peacefair PZEM-017 monitors for each battery bank. They send data out on rs485  but what I did was use a Tasmota ESP32 ( or esp8266 works too I think) and that will make the data to Mqtt data . Either way if you get the data into something running Node Red like on a raspberry pi you can have it do whatever you would like.
https://www.aliexpress.us/item/2251832727645285.html?pdp_npi=3%40dis%21USD%21US%20%2412.80%21US%20%2410.11%21%21%21%21%21%402101ddb816975873218516645d00e2%2165948002171%21sh07%21US%21721645136&spm=a2g0o.store_pc_promotion.promotePruductList_2006910302101.10&gatewayAdapt=glo2usa
You can get them with whatever size shunt you want.
I made a video on how I hooked it up to esp running Tasmota and I also have two more videos getting the data to a raspberry pi and grafana .
https://youtu.be/TbLLrlZ3deI?si=e2_rljoi_hEgME_t
The PZEM-017 has been a bit flakey now and then on me but that might be because I have it on direct dc water heater so it cuts the power off to zero every night. The PZEM-016 ac version and PZEM-004t have been very stable using them for over a year.

Larry


Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 18, 2023, 01:23:07 PM
Do you believe that a product like I described is worthy of MidNite development?

I can continue with questions and suggestions but understand I have only a year or two left on this planet. I would like to leave something behind but I do not want to write memos to someone else's wastebasket.

Just trying to be realistic.

Quote from: ClassicCrazy on October 17, 2023, 08:11:48 PMLarry

Thanks for your input. I learn something new from most of your posts. Would a rasberryPI take inputs directly from multiple shunts and process them for display?
Title: Re: Parallel Bank Monitor
Post by: ClassicCrazy on October 18, 2023, 02:08:42 PM
Quote from: Barry Fields on October 18, 2023, 01:23:07 PMDo you believe that a product like I described is worthy of MidNite development?

I can continue with questions and suggestions but understand I have only a year or two left on this planet. I would like to leave something behind but I do not want to write memos to someone else's wastebasket.

Just trying to be realistic.

Quote from: ClassicCrazy on October 17, 2023, 08:11:48 PMLarry

Thanks for your input. I learn something new from most of your posts. Would a rasberryPI take inputs directly from multiple shunts and process them for display?


I thought you were trying to develop something for yourself Barry. No I don't think what I suggested would work for Midnite stuff. Most people can already get or have the Whizbang which does about all anyone would need to do for lead acid batteries. With the price of lithium batteries as low as they are now I doubt too many people these days are buying lead acid. Most every new lithium comes with a bms that provides all the data on it's cells, charging, discharging, soc, etc and many you can change the setpoints.  Most of those batteries can also communicate with inverters/charge controllers to provide info or control.
Larry
Title: Re: Parallel Bank Monitor
Post by: boB on October 18, 2023, 04:14:04 PM

Next part of software that should be included when using the WB Jr. for ending-amps is a schedule for doing a timed Absorb once in a while.  Once a week or once every 2 weeks or whatever is wanted for that particular lead acid battery.

That, along with the Float/Re-Float scheme that Steve Higgins likes so much.  BTW, we used to work with Steve at Trace and at OutBack Power.  He's a good man !

But with  LiFePo4 batteries becoming so popular, most of this float charging will not be so common.

boB

Title: Re: Parallel Bank Monitor
Post by: ClassicCrazy on October 18, 2023, 09:17:44 PM
Quote from: boB on October 18, 2023, 04:14:04 PMNext part of software that should be included when using the WB Jr. for ending-amps is a schedule for doing a timed Absorb once in a while.  Once a week or once every 2 weeks or whatever is wanted for that particular lead acid battery.

That, along with the Float/Re-Float scheme that Steve Higgins likes so much.  BTW, we used to work with Steve at Trace and at OutBack Power.  He's a good man !

But with  LiFePo4 batteries becoming so popular, most of this float charging will not be so common.

boB


What would be helpful with lithiums is if you could  set a small current for a certain amount of time. The bms in most of the present bms  have very small bypass current resistors so giving them the full charge. doesn't do much for balancing. But maybe pretty soon all the new batteries will have active balancers that can balance with 4 or 5 amps and that will solve that problem.
Larry
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 19, 2023, 06:32:42 PM
Am I correct that a raspberry does not have ADC capabilities?
Title: Re: Parallel Bank Monitor
Post by: boB on October 19, 2023, 06:59:05 PM
Quote from: Barry Fields on October 19, 2023, 06:32:42 PMAm I correct that a raspberry does not have ADC capabilities?

raspberry Pi ?

I don't think so.  But you can add one to them easily enough.

boB
Title: Re: Parallel Bank Monitor
Post by: ClassicCrazy on October 19, 2023, 07:31:23 PM
Quote from: Barry Fields on October 19, 2023, 06:32:42 PMAm I correct that a raspberry does not have ADC capabilities?
Here is example of how to add adc chip to raspberry pi.
https://youtu.be/tn8sEqq0sJc?si=ImedxrQsiC3Z7yLd
https://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi?view=all

Larry
Title: Re: Parallel Bank Monitor
Post by: Wizbandit on October 20, 2023, 06:29:01 AM
I designed a circuit board that adds 16 ADC channels to a Raspberry Pi model3. It has 16 ADC channels, I have 14 here in use on some AC current transformers and 4 monitor AC line voltages using a 12VAC transformer (wall wart) through a resistor divider network. I have 2 spare I might use for some DC inputs.

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 20, 2023, 04:17:15 PM
I'll say it for ya. Bless his heart, he just don't know no better.


Does the Raspberry pi run the OS and program directly from the SD card as opposed to downloading to the processor?

The ADC additions I have viewed seem to convert an analog signal to parallel and then transmits that info to the PI in a serial format. The PI then converts that serial info back to parallel for computation.  If that is correct, it seems like that is the long way around Robin Hood's barn.

Would not an MCU with ADCs onboard make more sense?

If so, any recommendations or basic requirements for that MCU?
Title: Re: Parallel Bank Monitor
Post by: boB on October 20, 2023, 04:50:11 PM

Barry, the Pi SBCs run off of their micro-SD cards pretty much.

SOME have this EMCC (right term ?)  memory that aren't so failure prone as the micro SD card on the Pi board itself.  That is better.

These Pi boards run a form of Linux and so they are nice to work with and update.

They already have a MCU that works well but with that speed and power just don't have the peripherals we would all like, as well.

boB
Title: Re: Parallel Bank Monitor
Post by: ClassicCrazy on October 20, 2023, 06:04:14 PM
Quote from: boB on October 20, 2023, 04:50:11 PMBarry, the Pi SBCs run off of their micro-SD cards pretty much.

SOME have this EMCC (right term ?)  memory that aren't so failure prone as the micro SD card on the Pi board itself.  That is better.

These Pi boards run a form of Linux and so they are nice to work with and update.

They already have a MCU that works well but with that speed and power just don't have the peripherals we would all like, as well.

boB


The Pi4 and the newly announced and soon available Pi5 can boot and run from an attached hard drive.
Here are some details on the new Raspberry Pi 5
https://youtu.be/nBtOEmUqASQ?si=BcJjlBaYszekWaVV

Larry
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 21, 2023, 11:53:56 AM
Good video. Hope there is not a test later.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 21, 2023, 03:02:08 PM
Does the 150 receive charge/discharge  as positive/negative values or are they biased positive?

Does the 150 MCU have spare input ports SPI or UART?
Title: Re: Parallel Bank Monitor
Post by: boB on October 21, 2023, 04:03:01 PM
Quote from: Barry Fields on October 21, 2023, 03:02:08 PMDoes the 150 receive charge/discharge  as positive/negative values or are they biased positive?

Does the 150 MCU have spare input ports SPI or UART?

Classic microprocessor pins are all used up I think.

There are 4 UART connections but all used for RS-232 and Arc fault communications.

It's kind of an older ARM processor.  LPC2366

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 21, 2023, 04:32:39 PM
Does the 150 receive charge/discharge  as positive/negative values or are they biased positive?

purple wire on aux2 always a positive voltage?
I'm missing something here. Does the circuitry on the WizBang receive it's power thru the purple wire?
It's obviously more complicated than I first thought.
Title: Re: Parallel Bank Monitor
Post by: boB on October 21, 2023, 08:54:16 PM
Here in the US, we tend to call discharging "negative" and charging as "positive"...

I think that SMA, for instance, is backwards of that.

The WB Jr. purple wire is power (~ +15V) for around 90 milliseconds, then data and then back to power again until the next 1/10 of a second.

Negative for that of course is battery negative itself. 

That line can actually do A/D and D/A over a very limited range but we don't use that at the moment.
Pretty cool, huh ?

Oh, so I guess that data does use a 5th UART but just for receiving one the Classic.
That part just happened to work out.   

 :)

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 22, 2023, 10:54:35 AM
Nice. I love creative solutions to problem solving.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 22, 2023, 11:27:45 AM
Quote from: boB on October 21, 2023, 08:54:16 PMHere in the US, we tend to call discharging "negative" and charging as "positive"..

We here in Tennessee actually consider ourselves part of the US. Maybe you should have said "Here in the present". Just an old timer's thought.

Quote from: boB on October 21, 2023, 08:54:16 PMThe WB Jr. purple wire is power (~ +15V) for around 90 milliseconds, then data and then back to power again until the next 1/10 of a second.

Tell me where I am going wrong.
This implies a sampling  rate of 10 times a second. How much accuracy would be lost if the sampling rate was 5 times a second. The battery currents probably do not change rapidly.

Would a lower sampling rate free up enough data time for a "Whiz bang Sr" to monitor 4 separate battery bank shunts?
Title: Re: Parallel Bank Monitor
Post by: boB on October 22, 2023, 07:23:23 PM
"How much accuracy would be lost if the sampling rate was 5 times a second."

A/D is 16 bits maximum.  Five per second won't make it any better.

10 times per second is better for more accurate Amp-Hour calculation.

Now, we could go much faster and get less accuracy but 16 bits is the max resolution which we use.

Offset is re-calibrated between every sample, too.


"We here in Tennessee actually consider ourselves part of the US"

Yes, Tennessee is included in the US.  I should have said US and north America.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 22, 2023, 08:24:27 PM
Quote from: boB on October 22, 2023, 07:23:23 PMA/D is 16 bits maximum.  Five per second won't make it any better.

10 times per second is better for more accurate Amp-Hour calculation.

I guess I'm asking how much does battery current change from 1/5th of a second to the next.

Quote from: boB on October 22, 2023, 07:23:23 PMYes, Tennessee is included in the US.  I should have said US and north America.

Except for that time in the 1860's
Title: Re: Parallel Bank Monitor
Post by: boB on October 22, 2023, 09:06:52 PM
I guess I'm asking how much does battery current change from 1/5th of a second to the next.


Battery current can change 120 times per second in north America.  8.33 milliseconds due to full wave rectified 60 Hz ripple.

That is why these A/D inputs have some R-C averaging but not real slow.

Faster is more accurate.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 23, 2023, 03:16:07 PM
Quote from: boB on October 22, 2023, 09:06:52 PMI guess I'm asking how much does battery current change from 1/5th of a second to the next.


Battery current can change 120 times per second in north America.  8.33 milliseconds due to full wave rectified 60 Hz ripple.

That is why these A/D inputs have some R-C averaging but not real slow.

Faster is more accurate.

boB

I am going for the dumb questions of the day.

Where is the ripple coming from?

Why not improve RC filtering rather than ADCing the ups and downs of the ripple. should be minimal effect on accuracy.

How absolutely accurate bank current is required compared to added functionality?

Barry
Title: Re: Parallel Bank Monitor
Post by: boB on October 23, 2023, 11:13:05 PM

Ripple comes from the inverter AC current.  There is always some 120Hz ripple reflected to the battery side due to limited energy storage in the inverter itself and the fact that AC current drops to zero at zero crossings.

The RC has been done for years and we aren't thinking about fixing what isn't broken at the moment.

Maybe some day we will look at this again though.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 24, 2023, 10:00:41 PM
Every system is different. I have attached the schematic (reverse engineered by me) for the power board of the AIMS inverters (48v 6000w 220v split phase) I use. One on continuously and the other for opportunity loads.

On the left you will note 9.9 Kilofarads per unit attached across the battery buss. I'm thinking I do not have much AC ripple.
Just an FYI
Title: Re: Parallel Bank Monitor
Post by: boB on October 24, 2023, 10:36:46 PM

Would love to see a picture of the actual capacitors !

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 25, 2023, 09:05:11 AM
Difficult to photo, but it is possible that I read them in error. Would 3.3k uf each make more sense. they are approx 4inch high and 1.25 inch diameter.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 25, 2023, 10:59:16 AM
I know you have many things to contemplate and I do not want to consume too much of your time.
Final comments.

Would your sampling issues improve if the WhizBang had it's own power supply. See attached.

Could the AUX2 negative port be configured as either UART TX or PWM out in the present or future version of the Classic 150?
Title: Re: Parallel Bank Monitor
Post by: boB on October 25, 2023, 11:54:22 AM
Quote from: Barry Fields on October 25, 2023, 10:59:16 AMI know you have many things to contemplate and I do not want to consume too much of your time.
Final comments.

Would your sampling issues improve if the WhizBang had it's own power supply. See attached.

Could the AUX2 negative port be configured as either UART TX or PWM out in the present or future version of the Classic 150?

We use a similar MPS buck converter chip in another product now.  A bit lower input voltage and higher output current though.  Nice parts !

The AUX2 output already has PWM for different functions.

No, another power supply wouldn't help the sample rate and what we use could actually sample 1/3 faster than it already is sampling but that's not going to help much. 

Higher than 16 bit resolution would be nice but it would have to be biased to read greater than +/-15 bits for charge and discharge as well as self zero-offset correction between samples.  And low power.

boB

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 25, 2023, 12:31:16 PM
Quote from: boB on October 25, 2023, 11:54:22 AMThe AUX2 output already has PWM for different functions.

I know PWM is available on the AUX2 positive. Is the AUX2 negative port merely a ground or is it configurable ?
Title: Re: Parallel Bank Monitor
Post by: boB on October 25, 2023, 01:29:29 PM
Quote from: Barry Fields on October 25, 2023, 12:31:16 PM
Quote from: boB on October 25, 2023, 11:54:22 AMThe AUX2 output already has PWM for different functions.

I know PWM is available on the AUX2 positive. Is the AUX2 negative port merely a ground or is it configurable ?

Oh, I see.  Negative is same as battery negative.

AUX 1 can be isolated by the small relay if jumpered correctly.

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 28, 2023, 07:09:56 PM
I have to admit I have learned much since engaging on this forum. I feel I have left the 1980's and have arrived in the 2000's (maybe).
I am trying to learn more about ADCs.
Does the shunt mv input to the ADC need amplification first?
I believe it was stated that 1bit of the serial out put of the ADC is  used to indicate charge or discharge.
In a 4 analog input ADC, does the identity of the input require additional hand shaking or could 2bits of the serial output be used for that purpose?
If 3bits are used above would that leave 21 bits of signal resolution on a 24 bit ADC?
I have tried to read the data sheet on the LPC2366 MCU and am unsure whether the UART input you are using can handle a 32bit input. It looks like it but I have been wrong before.
Can I ask what ADC you are using?
Title: Re: Parallel Bank Monitor
Post by: boB on October 28, 2023, 07:55:46 PM
The ADS122U04  looks like a very nice part but kind of expensive. It might be OK when bought for production though...   The ADS122U04  is only good for 20 bits of resolution the data sheet says.  This is the case for many 24 bit ADCs except maybe for the best audio ADCs which might be good for 21 bits ?  I haven't looked lately.

No amplification used.

The UART is good for 7,8 or 9 bits.  This is typically the case for UARTs.  If you need 24 or 32 bits, then maybe an SPI port could be used ?

You would have to look up 16 bit ADCs in a SOT23-5  pin configuration.  Microchip and TI make them.

Oh, the most significant bit, bit 15  would be a sign bit so basically 1 for negative current.

boB


Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 30, 2023, 09:00:14 AM
Maybe another dumb question. Am I correct that the Classic's USB port is only used for firmware updates?

Could it also be used the rest of the time as a WhizBang input?
Title: Re: Parallel Bank Monitor
Post by: boB on October 30, 2023, 02:42:14 PM

USB is mainly for updates but it also spits out data.

Not good for a WB Jr. though as the WB Jr. isn't a USB device

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 30, 2023, 05:26:30 PM
Does the USB TX data only during update or is it also connected elsewhere?

Could a WB Sr be a USB device?
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 30, 2023, 05:48:46 PM
WB Sr ?
32bit 4channel to SPI    AD7177-2
SPI to USB               FT232H
Title: Re: Parallel Bank Monitor
Post by: boB on October 30, 2023, 07:02:55 PM
Quote from: Barry Fields on October 30, 2023, 05:48:46 PMWB Sr ?
32bit 4channel to SPI    AD7177-2
SPI to USB               FT232H

Performance specifications :

19.1 noise free bits at 10 kSPS
20.2 noise free bits at 2.5 kSPS
24.6 noise free bits at 5 SPS



It might be good for 22 to 23 bits at at our 10 SPS speed.

$20+ dollars each at high quantities.

I could work but won't be replacing anything soon.

Thanks !

boB


Title: Re: Parallel Bank Monitor
Post by: Barry Fields on October 30, 2023, 07:36:41 PM
Just trying to think outside the box. Thanks for your time.
Title: Re: Parallel Bank Monitor
Post by: boB on October 30, 2023, 07:53:41 PM
Quote from: Barry Fields on October 30, 2023, 07:36:41 PMJust trying to think outside the box. Thanks for your time.

No problem !    This part would actually work very nicely.  Like, 26 bits of resolution at 15 samples per second.

Now, the question is, can it run biased in the middle so it could work at +/- 24  bits per sample ?  That would be nice.

There may be other A/Ds too.  If you find others, lettuce know.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 01, 2023, 08:22:20 PM
Well you guys have not had a good laugh in a while.

Attached are my attempt at a BANK COMPARE CIRCUIT (the old fashion way).

Any comments or suggestions would be appreciated.

Title: Re: Parallel Bank Monitor
Post by: boB on November 01, 2023, 09:47:10 PM
WhoA !   A lot going on there.

Top schematic, I would swap the inputs to the diff amps or reverse the input polarity so that you can then use OA5 as a true summing amplifier on its negative input.

Of course the LED circuit's top blinky LED enable amp will need to be one that can pull up the LED anodes.

Are you using Qspice simulator ?  Or, which one ?

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 01, 2023, 09:58:29 PM
I did this all on "circuit lab" https://www.circuitlab.com

Quote from: boB on November 01, 2023, 09:47:10 PMTop schematic, I would swap the inputs to the diff amps or reverse the input polarity so that you can then use OA5 as a true summing amplifier on its negative input.

I would then have to rearrange the compare circuitry for negative inputs.

I did not realize what I did was not a "true summing amp". I'll have to learn the difference.

Thanks for the input.

I did try to make it WB compatible.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 01, 2023, 10:03:21 PM
Found it, point well taken.

So what's the advantage of the non-inverting configuration compared to the inverting summing amplifier configuration. Besides the most obvious fact that the op-amps output voltage VOUT is in phase with its input, and the output voltage is the weighted sum of all its inputs which themselves are determined by their resistance ratios, the biggest advantage of the non-inverting summing amplifier is that because there is no virtual earth condition across the input terminals, its input impedance is much higher than that of the standard inverting amplifier configuration.
Title: Re: Parallel Bank Monitor
Post by: boB on November 02, 2023, 01:50:58 PM

The advantage of a true summing amplifier (mixer) is that the summing junction, (the negative input) is at ground level and keeps those inputs from interfering with each other.

You will see no voltage at the negative input when doing that.   What you will see with the passive summing amplifier is that the negative input will follow the positive input node.

In a summing amplifier, you will see whatever reference you apply to the positive input node.
i.e.  If you ground the positive input node and use the negative summing input, you will see ground voltage at the negative summing input.

This is how they make audio mix-buses

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 03, 2023, 12:43:57 PM
A little off topic but on my way to the end here.

Are there any advantages or disadvantages to the two different gain circuits attached?
They both simulate the same (within a couple mv).
Title: Re: Parallel Bank Monitor
Post by: boB on November 03, 2023, 06:02:04 PM
The circuit with 27K feedback and 202 Ohms input "should" be lower noise than the 135K Ohm and 1K input is about all.  Just because of the lower resistance making less noise.

You may not find any difference though as long as the op-amps don't mind having that amount of gain at the frequencies you want to amplify is my guess.


From some web page...

erms = √4kTRB

" 4*k*T*R*(BW). In this expression "k" is Boltzman's constant, "T" is temperature in degrees Kelvin, "R" is resistance in ohms, and "BW" is bandwidth, in Hz "

boB

Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 05, 2023, 11:41:09 AM
Quote from: boB on November 01, 2023, 09:47:10 PMOf course the LED circuit's top blinky LED enable amp will need to be one that can pull up the LED anodes.

You are correct. I have done an improper job transitioning from analog to digital.

Still working on it, think I've got it now. I'll get back to you once I am more edumacated.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 10, 2023, 11:31:15 AM
oh I am getting closer.

A couple of questions on comparators because I do not have ultimate trust in Circuit Lab's simulator.

Is there any differences in the input configurations in the red boxes on the attached schematic.

If the power rails of the lm339 comparator are +12v and -12v (because it is available) should the output be close to +/- 12v.

Would +/- 5v or +5v/ground or +12v/ground be viable options?  ( Vin = +10v to -10v )
Title: Re: Parallel Bank Monitor
Post by: boB on November 10, 2023, 01:46:30 PM
Barry, 10K pullup is fine to 12V if your LEDs can be seen OK with 700 microamps of current.

I would possibly add MegOhms or 100s of K-Ohms of positive feedback to give some hysteresis to keep the output edges square and not bouncing around.  That is, if your sinewave source is LOW impedance. 

The hysteresis might want to be several milli-volts at the sinewave inputs to the comparators.

Comparators, typically, but definitely LM339 and LM393 types are open-collector so they do not pull up to Vcc.

If this is for just 60 Hz, you could get away with a semi-decent op-amp which will have output pull-up and pull-down.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 10, 2023, 03:17:33 PM
 The actual input is an amplified input from a Battery bank shunt (slow mover). The sine wave is for simulation only.

A 100a shunt 75mv to -75mv signal is way too small to window +/- 10% of a float current of 500ma.
75mv / 100A = .75mv /amp
500ma(bat current)  = .375mv  +/- 10% window would be +/- .0375mv

I have amplified the 75mv shunt signal to 10 volts/100a.
10volts / 100a = 100mv /amp
500ma(bat current) = 50mv     +/- 10% window is now  500ma = +/- 5mv

 
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on November 14, 2023, 04:51:47 PM
This Circuit Lab is nice but it doe not know how to properly simulate a Comparator.

The simulator seems not to handle a dual rail comparator or positive feedback.

Pretty sure if my input signals go from -10v to +10v the bottom rail has to be 2v below -10v.

Before I go further I have attached the way I am handling the LM393.

Thanks in advance for any comments/corrections/suggestions
Title: Re: Parallel Bank Monitor
Post by: boB on November 14, 2023, 05:19:07 PM

I would use LTspice for the simulator.

Will take a bit of learning curve but it is free and works great !

It can also use standard spice models.   LTspice is from Analog Devices now but they bought Linear Technology a few years ago and although they have parts that will work for your simulation, it is sometimes best to just download a real LM393  .ASC file and .LIB file from the wonderful LTspice group.

Try this link...

https://groups.io/g/LTspice/

There is a HUGE repository of circuits and I am sure they also have LM393 ones if you search for it.

boB
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on December 06, 2023, 11:13:05 AM
Just to let ya know, I am still alive.
Busy actually building a prototype PCB to prove concept. So far so good. Will update soon.
Title: Re: Parallel Bank Monitor
Post by: Barry Fields on December 24, 2023, 11:57:39 AM
LTspice is nice. Thanks.

I have learned that LTspice does not have a smoke alarm to warn you of an exceptionally high base current.