Automatic Voltage Selector

Thread Starter

RodneyB

Joined Apr 28, 2012
697
I am wanting to make a voltage selector, to select either 12 Volts or 24 Volts. So basically if the incoming supply is above 16 volts it switches out a relay.

I have seen circuits using a 741 as a voltage comparator. I am not sure how it measures the input voltage.
 

Reloadron

Joined Jan 15, 2015
7,523
I would use a voltage comparator circuit as can be seen here. I would also include hysteresis which is covered in the link. The 741 op amp could be used but I would use a chip more designed as a comparator than an op amp. Let the comparator out drive a small switching transistor which can drive a relay. You do not mention the currents?

Ron
 

AnalogKid

Joined Aug 1, 2013
11,055
If 16 V is not a precise decision level but just an approximate threshold, consider using a relay with a 24 V coil and just let the low voltage not pull it in? Some relay datasheets list a guaranteed minimum operate voltage. If that is 20 V or 18 V, the odds are low that it will actually pull in with only 12 V. With the right relay coil characteristics, no electronic decision circuit.

ak
 

Thread Starter

RodneyB

Joined Apr 28, 2012
697
I would use a voltage comparator circuit as can be seen here. I would also include hysteresis which is covered in the link. The 741 op amp could be used but I would use a chip more designed as a comparator than an op amp. Let the comparator out drive a small switching transistor which can drive a relay. You do not mention the currents?

Ron
Thank you very much for this advice. As I will read the information on the link and then either ask a whole lot of questions or give you positive feedback.
 

MikeML

Joined Oct 2, 2009
5,444
Think of R1 as being 62K, which is a standard 5% value.

Or use 10K for R2, and then a 100K pot for R1.

Adjust R4 so that the voltage across the relay is ~12V right after the circuit switches...
 

Thread Starter

RodneyB

Joined Apr 28, 2012
697
Think of R1 as being 62K, which is a standard 5% value.

Or use 10K for R2, and then a 100K pot for R1.

Adjust R4 so that the voltage across the relay is ~12V right after the circuit switches...
Hi Mike

I am not sure if I was clear in my explanation but I just cant seem to get this to work like I need.

I have 2 supply input options 12 or 24 volt.

They are to charge a 12 Volt 7Amp Hour battery

when the supply is 24 Volt I don't have a problem with my circuit everything works fine. Its when I have a 12 Volt supply that the problems arrive. I was using the PB137 and you explained to me yesterday why that is not working.

What I was wanting to achieve was that at 24 volt supply voltage this is the normal input it charges the battery no problem, cuts out at 10.6Volts if necessary and starts charging when the supply returns no problem, however when connected to a 12 Volt source I want it to basically be in Parallel with the 12 Volt Source voltage. I would have to put some current regulation to protect the battery.

Any advice? Direction?


Rod
 

MikeML

Joined Oct 2, 2009
5,444
@RodneyB,

As I remember it, you wanted the relay to cut-in when the voltage dropped through about 18V. Is this still the case?

If so, your R1, RV1, R2 voltage divider is totally wrong. With the values R1=590, RV1 centered (7500 above and below the tap), and R2=3200, the cut-in voltage will be about 4.6V. No wonder it isn't doing what you want...

The trip point happens (ignoring R6 for the moment) when the gate voltage of the TL431 = 2.495V. The voltage-divider equation is:

Vout/Vin = R2+0.5*RV1/(R1 + RV1 +R2). Lets use it to find R1 to make Vin=18 at the trip point:

Vout=2.495. Vin=18V. Using the same VR1 and R2, substituting gives:

2.495/18 = (3200+7500)/(R1 + 15000 + 3200)
2.495*(R1 + 18200) = 18*10700
R1 + 18200 = 77194
R1 = 58994

Here are the results: Note the cut-in and cut-out voltage. 59K is the nearest std. value close to 58994. If you had something else in mind, I will let you recalculate R1 using the procedure above.

I also added back the snubber diode D1 you seem to have forgotten. Finally, the gate of the FET is overdriven, violating its max. Vgs rating, so I added R4 to make a voltage divider to keep the gate voltage within ratings.

CI.gif
 

MikeML

Joined Oct 2, 2009
5,444
I had another thought. If the source of the 24V is a Lead-Acid battery bank, you should not be discharging it below about 1.9V per cell to prevent damaging the batteries. That would make the trip point voltage for discharging a 12 cell bank 12*1.9 = 22.8V. That would make R1 even higher than what I calculated above. (try about 80K)

Notice that I found the value of R1 with the 15K pot centered. This is the starting value of the needed R1. The pot should have enough adjustment range to allow for R1 being the calculated value +- 10% or so...
 

Thread Starter

RodneyB

Joined Apr 28, 2012
697
I had another thought. If the source of the 24V is a Lead-Acid battery bank, you should not be discharging it below about 1.9V per cell to prevent damaging the batteries. That would make the trip point voltage for discharging a 12 cell bank 12*1.9 = 22.8V. That would make R1 even higher than what I calculated above. (try about 80K)

Notice that I found the value of R1 with the 15K pot centered. This is the starting value of the needed R1. The pot should have enough adjustment range to allow for R1 being the calculated value +- 10% or so...

Hi Mike

The components arrive tomorrow so I will build it and get back to you.
 

Thread Starter

RodneyB

Joined Apr 28, 2012
697
I had another thought. If the source of the 24V is a Lead-Acid battery bank, you should not be discharging it below about 1.9V per cell to prevent damaging the batteries. That would make the trip point voltage for discharging a 12 cell bank 12*1.9 = 22.8V. That would make R1 even higher than what I calculated above. (try about 80K)

Notice that I found the value of R1 with the 15K pot centered. This is the starting value of the needed R1. The pot should have enough adjustment range to allow for R1 being the calculated value +- 10% or so...
Hi Mike

The components arrived at last.

The relay coil resistance is 28.8R Should I add a resistor in series with the coil so that I can get the 300R.

The IRF74343P is a Dual N and P channel mosfet that my supplier did not have so I got a P channel which I hope is correct.

I have a 20K multi turn trim pot as 15K was not available.

Thanks for all the help
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
...The relay coil resistance is 28.8R Should I add a resistor in series with the coil so that I can get the 300R.
Yes, but not to get a total of 300Ω.

If your relay is 12Vdc, and has a resistance of 28.8Ω, the current required to operate it will be
I = E/R = 12/28.8 = 0.417A = 417mA. Your cut-in voltage should be ~20V, so ~8V must be dropped across a series resistor. That resistor needs to be R=E/I = 8/0.417 = 19.2Ω, call it either 18 or 20Ω. The power dissipated in the resistor would be P=IE = 0.417*8 = 3.4W, so use a 5W resistor.

Are you sure that the relay resistance is that low? A 24Vdc relay should have a coil resistance of >200Ω???? Even a 12V automotive "sugar-cube" relay has a coil resistance of 85Ω. You must have a very large relay? The IRFD9110 is good for 0.6A, so you can drive that huge relay.

I have a 20K multi turn trim pot as 15K was not available...
That should work...
 
Last edited:

Thread Starter

RodneyB

Joined Apr 28, 2012
697
Yes, but not to get a total of 300Ω.

If your relay is 12Vdc, and has a resistance of 28.8Ω, the current required to operate it will be
I = E/R = 12/28.8 = 0.417A = 417mA. Your cut-in voltage should be ~20V, so ~8V must be dropped across a series resistor. That resistor needs to be R=E/I = 8/0.417 = 19.2Ω, call it either 18 or 20Ω. The power dissipated in the resistor would be P=IE = 0.417*8 = 3.4W, so use a 5W resistor.

Are you sure that the relay resistance is that low? A 24Vdc relay should have a coil resistance of >200Ω???? Even a 12V automotive "sugar-cube" relay has a coil resistance of 85Ω. You must have a very large relay? The IRFD9110 is good for 0.6A, so you can drive that huge relay.
I have a 20K multi turn trim pot as 15K was not available...[/QUOTE]
That should work...[/QUOTE]

I seem to have made quite a big mistake on the Relay.

I have attached the DATA sheet I don't know where I got the coil resistance of 28.8R I have measured it and seen on the datasheet it is 2880R I measured with my multimeter and its 2k9.

I bought a 24 volt relay as When the coil I energised then the voltage would be 24 Volts. When it Drops below the 20 volt mark then the coil would de energise and switch off.

Now I am not sure what to do as I have bought a relay with such a high resistance coil.
 

Attachments

MikeML

Joined Oct 2, 2009
5,444
I have a 20K multi turn trim pot as 15K was not available...
...
I seem to have made quite a big mistake on the Relay.

I have attached the DATA sheet I don't know where I got the coil resistance of 28.8R I have measured it and seen on the datasheet it is 2880R I measured with my multimeter and its 2k9.

I bought a 24 volt relay as When the coil I energised then the voltage would be 24 Volts. When it Drops below the 20 volt mark then the coil would de energise and switch off.

Now I am not sure what to do as I have bought a relay with such a high resistance coil.
Not to worry: Here is a circuit that will work with your new relay and your 20K trimpot:

LowDet.gif

Things you should note. With the values of R1, R2, and U1 shown, it's CutOut voltage is adjustable from ~30V to ~14V. Its CutIn voltage is about 1V higher. With the pot centered, the CutOut is ~20.3V, and the CutIn is ~21.3V, as shown on the green trace on the plot.

The 1V of hysteresis is very important. As the load discharges the battery bank, the voltage is dropping slowly (red trace). If it were not for the hysteresis, the relay would disconnect the load, the battery voltage would rise due the load going away, and the relay would pullin again immediately, and the relay would cycle on/off rapidly. With 1V of hysteresis (as controlled by R3), the battery voltage would have to rise by more than 1V for the relay to be pulled in.

You might want more hysteresis than the 1V I show here. If so drop R3 to ~1Meg.
 

dannyf

Joined Sep 13, 2015
2,197
I bought a 24 volt relay as When the coil I energised then the voltage would be 24 Volts. When it Drops below the 20 volt mark then the coil would de energise and switch off.
Sounds like you have bought the perfect relay: when it is powered by a 24v source, it cuts in the 24v source. As the source is depleted to 20v, the relay cuts out to the 12v source.

Nothing else is needed.

Unless you insist on sticking to the 16v cut-out vs. 20v cut-out.
 
Top