Need help making a UPS schematics work as it should.

Thread Starter

Marus780

Joined Jan 11, 2023
81
Hi, guys !

I made this beautiful schematics (see the attached pdf) for a 12V UPS control board that I will use to power a Raspberry Pi server. And I have a problem which I don't know how to solve.

Let me describe a little the circuit. Starting from the top, from left to right... is the circuit for the power LED, made in such a way that it has constant brightness and only lights up from a certain voltage level up (it shows that we have valid voltage ). Then the 13.7V stabilizer circuit for charging the battery. Then, above, the mosfet switch for the battery status display, and below it, a level detector that gives the Warning signal when the battery voltage drops below a certain level. In the lower right is the flip-flop that controls the ON/OFF mosfet switch for the main output voltage. Then to the left, M4/M5 transforms 3.3V into 12V so that the Raspberry can reset the flip-flop and cut its own supply voltage. The 2 comparators on the left switch to logic 1 if the battery voltage drops below the minimum allowed threshold, in this way U3b signals to the Raspberry that it is time to shut down, through the lower circuit, with M2 pulling a pin to ground. and U3a, cuts the supply voltage of the battery status display... and in this way there is no consumer to draw from the battery if it is already empty. I put 2 comparators because one has lower hysteresis and immediately turns on the display when the mains voltage returns, and the other one turns on the Raspberry again after the battery has been half charged. On the far left is the 5V reference and after it is the battery voltage divider, which has a circuit with Q2 that quickly charges the capacitor C8 at start-up so that those comparators do not think that the battery is empty and go to logic 1, signaling shutdown.

Now, the damn problem I can't get rid of, is the circuit with M3 from the output of U3b. This circuit, when U3b goes from 1 to 0, gives a short positive pulse to the flip-flop and switches it to logic 1, turning on the power supply to the devices connected to the UPS. The problem is that, if the voltage battery or the line voltage is swiched off, the voltage on the divider drops and the comparator switches to 1, and then, when we switch on the supply voltage, it immediately switches to zero, which causes the circuit with M3 to give an unwanted starting impulse.

I could make a kind of "Enable" to the circuit with M3, which would inhibit the start pulse... but I don't have any signal to control it. Because, I could put a resistance to charge a capacitor gradually and make a circuit like the Warning circuit that gives 1 or 0 when the voltage exceeds a certain threshold, but the problem is that on the second start, the capacitor is already loaded and the circuit becomes useless...

Do you have any idea how I can solve it, because it drove me crazy...?
I don't want solutions that will significantly change my scheme, with a microcontroller or something else, nor make the control circuit consume more than 500uA.

Foto_01.jpg

Foto_06.jpg
 

Attachments

crutschow

Joined Mar 14, 2008
34,697
Truly an impressively complex circuit but way too much of a Rube Goldberg design for my preferences. :rolleyes:
I try to follow Einstein's dictum, "Make it as simple as possible, but no simpler".

Be that as it may, could you better describe your problem?
Under exactly what conditions do you want U3b to give a pulse, and what conditions don't you, as that's not clear to me.
 

Thread Starter

Marus780

Joined Jan 11, 2023
81
Thank you !

Simpler or not, this is the only way I knew to make it...

Under normal operating conditions, U3b must stay low and go high when the battery voltage drops under 11.7V. Then, after the battery charges to 12.7V, it must go low again. And this transition, from high to low, makes a high pulse through M3 that swich ON the devices connected to this supply. In other words, when the battery drops to much it must shut down automatically, and when rise again to an acceptable level, start again.

The problem is that this ON pulse is generated when I swich on the main power line or the battery (see the lower right (bat) and left (line) black buttons in the photo), from the second time on (when some capacitor are already charged)... And I don't want that. The output must be enabled only from the Red (Start) and Blue (Stop) buttons, or when the battery is low and then charges to a certain level (green button enables that).
 

Thread Starter

Marus780

Joined Jan 11, 2023
81
I come back with a clarification...

When I first read Crutschow's comment, I didn't know who Rube Goldberg was. I searched the web now to see what it is about. Rube was one who made complicated machines for simple tasks. Comparing my schematic to Rube's design I find it offensive. I don't understand the purpose of your comment. I didn't ask you what your preferences are (we are not discussing that here), I just asked for help in solving a problem. So why do you come and give me philosophies about Einstein and Rube if you don't have anything useful to say ? This is the only way I knew how to do it, it was not intended to be complicated. If you think you're better, then tell me how I can make it better than I did.
 

LowQCab

Joined Nov 6, 2012
4,217
I come back with a clarification...

When I first read Crutschow's comment, I didn't know who Rube Goldberg was. I searched the web now to see what it is about. Rube was one who made complicated machines for simple tasks. Comparing my schematic to Rube's design I find it offensive. I don't understand the purpose of your comment. I didn't ask you what your preferences are (we are not discussing that here), I just asked for help in solving a problem. So why do you come and give me philosophies about Einstein and Rube if you don't have anything useful to say ? This is the only way I knew how to do it, it was not intended to be complicated. If you think you're better, then tell me how I can make it better than I did.
.
How much Money are You paying for help, comments, and advice, from a bunch of
willing Geniuses with a combined experience easily totaling hundreds of years ?

If I where You, I would pay very close attention to all help offered here.

The more information that You can give, the better help You will receive.

It may take several hours, with back and forth questions and answers via Posts here
before anyone can completely understand all of the features, and nuances, of your UPS.
You should have appreciation for the time freely spent by others,
at no cost to You,
for extremely valuable advice.

When I look at your work,
my mind immediately starts looking for ways to simplify the entire Circuit,
but a new Circuit is unlikely to be wanted in this case.
Some people might be willing to start-over with a new, much simpler, design,
with much less complexity,
rather than an extremely complex Circuit,
that can easily lead to a malfunction in the future.

I enjoy doing this type of thing when the opportunity is presented,
and many others in this Forum will also take the time to offer their best efforts as well.
.
.
.
 
Last edited:

Thread Starter

Marus780

Joined Jan 11, 2023
81
Is this an "ask for advice and pay" forum ? How much do you want so that your mind won't hurt anymore when you look over my schematics ? I thought that we gathered here because we share the same passion for electronics, we enjoy together, we cry together when something doesn't work out, and we help each other.

I have appreciation for everyone here, but so far you just complained that my schematic diagram is too complicated and made offensive comparisons.

Now I don't want to significantly change the scheme, but I am open to discuss any new ideas... maybe for the next UPS that I will build. But please, no microcontrollers.
 

Wendy

Joined Mar 24, 2008
23,464
I tend to agree with the no processors for such a simple job. The hard part will be to find a transformer capable of doing what you wanted to do. How many amps were you thinking of for this? Other than just doing this for fun this really is a project that you can buy off the shelf a heck of a lot cheaper than you can make (probably better too).

Just to clarify, you want DC out when the power dies and not AC as in AC power?
 

Thread Starter

Marus780

Joined Jan 11, 2023
81
Yes, It's a 12V DC UPS. I searched the internet and I couldn't find something like that to buy, so I decided to make one. It is already built, as you can see in the photos. There is no transformer, it has a SMPS.
 

crutschow

Joined Mar 14, 2008
34,697
Comparing my schematic to Rube's design I find it offensive. I don't understand the purpose of your comment.
I apologize for making what you see as an offensive comment.
It was just my curmudgeonly attempt at a comment with a little humor, but since it didn't come across that way to you, I will bow out of this tread, as I don't want to risk offending you further.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,697
The problem is that this ON pulse is generated when I swich on the main power line or the battery (see the lower right (bat) and left (line) black buttons in the photo), from the second time on (when some capacitor are already charged)...
Okay, since no one has tried to answer your question, I'm back with hopefully an inoffensive suggestion.

If those two events cause an erroneous ON pulse, then can't you use the occurrence of either of those two events to momentarily inhibit U3-B from changing and/or set U3-B to the desired initial state?
A 555 timer triggered by either event could provide a pulse to activate that inhibit/set function until the rest of the circuit has settled.

I'm sorry but I don't have the patience to understand your complete circuit to know specifically what signals (including their voltage levels) may be available to do this function.
If you have some candidate signals, then I may be able to further assist you with that (if you need).

Why the small 500µA limit for the added circuitry?
 

Thread Starter

Marus780

Joined Jan 11, 2023
81
Do you want 5V or 230VAC?
A UPS usually provides AC in the event of a power failure.
I know.. But I invented the UPS that provides 12V DC in the event of a power failure...

Why the small 500µA limit for the added circuitry?
Because this circuit will remain in stand-by after the battery is almost empty, so the consumption must be as low as possible... The NE555 consumes a lot.

Today I tried this (added the small circuit from the bottom) :
It disable the ON pulse if the supply voltage drops under 10.5V. It's not perfect but it's working. It only fails if the supply voltage (main power or battery) is swiched fast ON-OFF-ON. I don't like it, but for now I don't have anything better...

screenshot.1.png
 

Ya’akov

Joined Jan 27, 2019
9,237
Welcome to AAC.

As others have noted, your circuit is quite complex. It may be your style to design things that way but it does make it much harder for someone to spontaneously help you. It’s more of a project than it might otherwise be given the learning curve.

In any case, without fully understanding the operation of your circuit, on prinichole: since it seems you are saying that there is always a manual operation involved before the false signal, which not incorporate the solution as additional contacts on whatever switch you are using for the manual operation?
 
Top