Circuit which compares

Thread Starter

hhsting

Joined Apr 25, 2024
395
Hi all:

i am looking for circuit using transistors, capacitors, diodes, inductors, resistors, no ics, no other parts then mentioned above that does the following:

I have solar powered solar panels that charge the battery to 1.5vdc and 1500maAH. I also have utility power source from 120vac to transformer 30watt and output 1.5vdc.

i like the circuit to use the utility power source 1.5vdc if the battery voltage is less than 1vdc to power load. If the battery voltage is above 1vdc then I like to use the battery to power the load. Load is led lights of course at 200mA. The resistance when I measured is around 500kilo ohms.

sorry if i missed some details
 

MisterBill2

Joined Jan 23, 2018
27,513
Simple series diodes will always have the source with the higher voltage supply the current. BUT that is not efficient because of all the voltage wasted as the forward drop of the diodes. So it is simple, cheap, and reliable, but not very efficient.
 

wayneh

Joined Sep 9, 2010
18,104
Why the avoidance of an IC? A compartor such as LM393B could be used to make a sharp cut at precisely whatever voltage you want without wasting hardly any power. You might consider the 555 timer because it has a comparator and can directly source or sink a 200mA load, although I'm not so sure about that at only 1.5V.

One thing you'll need to resolve is the hysteresis in the set point voltage. Once the load is removed from the battery, its voltage will recover back above the set point but you'll want it to remain offline. Without hysteresis, your circuit will oscillate at the set point. You probably don't want the battery to cut back in until its voltage is >1.3V or so.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
Why the avoidance of an IC? A compartor such as LM393B could be used to make a sharp cut at precisely whatever voltage you want without wasting hardly any power. You might consider the 555 timer because it has a comparator and can directly source or sink a 200mA load, although I'm not so sure about that at only 1.5V.

One thing you'll need to resolve is the hysteresis in the set point voltage. Once the load is removed from the battery, its voltage will recover back above the set point but you'll want it to remain offline. Without hysteresis, your circuit will oscillate at the set point. You probably don't want the battery to cut back in until its voltage is >1.3V or so.
I dont follow about hysteresis and how it can affect? Can you go in detail?
 

Papabravo

Joined Feb 24, 2006
22,082
Hysteresis means changing the trip point of the comparator circuits to prevent oscillations. For example, suppose you can establish two trip points between 0 VDC and +5 VDC as follows:
  1. Lower trip point is at 1.5 VDC
  2. Upper trip point is at 3.5 VDC
Assume the comparator starts in the low state with an output of 0 VDC. To go high the input must pass through the upper trip point of 3.5 VDC. Once the output goes high to +5VDC it will stay there until the input drops below the lower trip point of 1.5 VDC. Then the output will go back to 0VDC and stay there until the input goes above 3.5 VDC once more.

The difference between the trip points and the value of the trip points can be set with resistors.

In a career spanning half a century I never bothered figuring out how to do a comparator with discrete components. To me it represented a complete waste of time in an era when time to market for a product was our primary concern. Had we wasted time in that fashion we would have been out on the street.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
Its actually a selector not comparator. I want to select battery if its charge is > or equal to 1.3vdc to power load. I want to select utility if the voltage of batter is <1.3vdc.
 

k1ng 1337

Joined Sep 11, 2020
1,038
This circuit changes the power source once the trip point of ~1.5V is reached. Here's how it works:

1) R1, R2, R3, R4, Q1 and Q2 form a primitive Schmitt trigger comparator set to trip at ~1.5V. This comparator has no hysteresis so the output turns ON and OFF at the exact same voltage which is generally not good but fine for this example.

2) The output of the comparator is directly connected to the first bjt driver so as long as Vin < 1.5V, Vbat sources the load (Q5 is ON and Q4 is OFF).

3) The output of the comparator is inverted prior to the second bjt driver so as long as Vin > 1.5V, Vdc sources the load (Q5 is OFF and Q4 is ON). Q4 and Q5 are in parallel but operate in complement of each other so the load always sinks around 200mA.

And there you have it. The circuit has some big problems but is operational. Changing any one component value is likely to make the circuit not work. It is a basic example not a practical circuit. This is why op-amps and other ICs are considered to be core components even though they are highly complex circuits themselves. It's just not practical to try and implement my circuit when an IC costing $1 does the job almost perfectly.

a1.png

a2.png
 

MisterBill2

Joined Jan 23, 2018
27,513
The reason that some hysteresis (difference in trip points) is needed is because most real world power sources have some effective internal resistance. (That includes most regulated power supplies, even.)
AND most real world loads draw some current.
So the result is that if a comparator of any sort triggers in both directions at exactly the same voltage, that voltage will change a bit when the current changes, and that would cause the comparator to trip in the opposite direction, which will cause the voltage to change in the opposite direction. This, then, is an oscillator, and most comparators will oscillate very well, often ate severl megahertz, which is usually not the intention.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
This circuit changes the power source once the trip point of ~1.5V is reached. Here's how it works:

1) R1, R2, R3, R4, Q1 and Q2 form a primitive Schmitt trigger comparator set to trip at ~1.5V. This comparator has no hysteresis so the output turns ON and OFF at the exact same voltage which is generally not good but fine for this example.

2) The output of the comparator is directly connected to the first bjt driver so as long as Vin < 1.5V, Vbat sources the load (Q5 is ON and Q4 is OFF).

3) The output of the comparator is inverted prior to the second bjt driver so as long as Vin > 1.5V, Vdc sources the load (Q5 is OFF and Q4 is ON). Q4 and Q5 are in parallel but operate in complement of each other so the load always sinks around 200mA.

And there you have it. The circuit has some big problems but is operational. Changing any one component value is likely to make the circuit not work. It is a basic example not a practical circuit. This is why op-amps and other ICs are considered to be core components even though they are highly complex circuits themselves. It's just not practical to try and implement my circuit when an IC costing $1 does the job almost perfectly.

View attachment 324828

View attachment 324829
My vin from utility is constant 1.5vdc. It does not change. My batter vin can drop below 1.5vdc but that gets charged by solar panels.

You indicated when vin is less than 1.5vdc I am not sure how this would work with regard to my requirements?
 

k1ng 1337

Joined Sep 11, 2020
1,038
My vin from utility is constant 1.5vdc. It does not change. My batter vin can drop below 1.5vdc but that gets charged by solar panels.

You indicated when vin is less than 1.5vdc I am not sure how this would work with regard to my requirements?
I should have made the labels more clear. There is no "vin" in my schematic. V+ powers the circuit so this can be from any source. V1 (node labelled "IN") is to be replaced by the battery you want to monitor. V1's purpose is to simulate a voltage that goes from 0V -> 2V -> 0V (R3 biases the input to Q1 so it remains in place).

In other words, the output of the comparator switches whenever V1 goes past ~1.5V. Simply connect Vbat to R3 instead and it should work. Also, you didn't specify what V+ should be so I made it 1.5V. It would be better if it was 5V or more to give the transistors some "headroom". When you force a circuit to operate with minimal voltage, the "safe operating area" is reduced increasing instability.

If you want to change V+, you'll have to adjust R3 as well because it sets the trip point relative to V+. The reason for this is the BJTs in this configuration are very sensitive to small changes to their input voltages. For basic circuits this isn't a big deal but this becomes a major problem when you start considering things like transmission lines.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,513
What King is explaining is that the circuit will need to be adjusted to perform as you requested. AND, from what I see it will vary a bit as it's temperature changes. Not a lot of variation, but some. It does not have any temperature compensation built in.
 
Top