You are on page 1of 17

DESCRIPTION

DIY UPS

The title says it all ^^ In this project, I try to


make an UPS with a car "12V to 230V"
converter, some relays, battery(ies), pixie dust
and rainbows.
DETAILS

Right now, the project is more at the beginning


than at the end.. But I'm working on it, and I
learn new things every day ^^
I try to explain as clearly as possible how to
recreate it (as dangerous as it can or will be),
and I also explain some theory an the maths
behind (or at least, I do my best ^^).
This UPS will work by using a car's 12V-to230VAC-converter-thingy, and I will try to make
it as simple as possible.
these are my "must" goals :

Fast enough triggering so that my


computer (or other peripheral) doesn't notice
anything.
At least 2h of battery life
Mains in OR 12V in (for usage in a car or
similar moving things)

Safe enough, so it won't fry me :p

And these are my "stretch" goals :

Portable
6h battery life

Computer interface (via USB connection)

Small info display

Why not WiFi with an Arduino MKR1000

Project logs :
1.
And so it begins..
2.
Converting battery voltage to 230V (Or
110V)
3.

Finding the right battery

4.

Charging the battery

DIY UPS
A simple UPS you can make at home !
Frdric Druppel

About

Files (0)

Components (0)

Logs (4)

Instructions (0)

Discussion (1)

Back to project details Sort by:


Oldest

And so it begins..
08/01/2016 at 20:18 0 comments

First project log, yay !!


So, In order to make an UPS, you have to be able to
determine quickly when the mains network of your
house goes out; And there are several ways to do so.
An easy way would be with a transformer and some
circuitry behind that finally connects to a
microcontroller. It's also safe enough. But, the
components can take some space, weight and
money.

Another way would be with an optocoupler and a


capacitive dropper, and that's how my UPS is going to
detect mains' failures.
BUT SAFETY FIRST !!! Mains AC IS dangerous, and
could toast you in a matter of seconds if you don't
take the right precautions. Be careful with it ! And
remember, if you treat electricity with respect, it won't
sting you (or is that for wasps ?)
Okay, now that the disclaimer is behind us, let's
begin !
First of all, what is a capacitive dropper ? It's simply a
capacitor used as a resistor in an AC circuit. When AC
goes through a capacitor, it acts like a resistor, and
thus "drops" the current. It's much more efficient than
a resistor in some cases as it doesn't generate much
heat. The value of that resistance is called the
"Reactance of a capacitor", and can be calculated
with this formula :
Where "f" is the frequency of the AC signal in Hz
and "C" is the capacity of the capacitor in Farads.

The optocoupler that I will use has a diode with a


forward voltage of 1.17V (when the forward current is
10mA). So with a simple calculation, if the input
voltage is 230Vrms, I need a resistor (or a capacitor
with a reactance of) approximately 30kOhms. Using
the reactance formula, I determined that I need a
100nF capacitor, which has a reactance of 31'830
Ohms.
It's also safe to put a high value resistor in parallel
with the capacitor in order to discharge it when no
voltage is applied. I used a 560kOhms resistor (as I
found out that it's a commonly used value in some
circuits I took appart).
For surge protection, I put a 470Ohms resistor after
the capacitive dropper, just to have some kind of
safety.
Here's a schematic of the AC Detect circuit :

With this circuit, I will get a 50Hz signal on the AC


DETECT line.
R is just a pullup resistor (from 1k to 10kOhms).
And here's a little test I did with a green LED :

As you can see, it woOH MY GOD HE USED A


BREADBOARD WITH MAINS AC !!!!!!!! Yes I know, I
know...
Breadboards are rated for max. 50V, so using 230VAC
can be dangerous, but I didn't have any other option..
So, as I was saying, you can see that it's working
pretty good !! I also tested it with an optocoupler, and
it also works. After leaving it for approx. 1h, none of
the parts where hot, so I think it's an acceptable circuit
!!
And that's pretty much it for this project log ^^
If you have any suggestions or questions, don't
hesitate !!

Converting battery voltage to 230V (Or 110V)


08/03/2016 at 18:32 0 comments

Well, how does one convert 12 Volts DC to 230 Volts


AC you might ask, and you also might think with a
transformer. Well guess what, you're right !!

There are 2 main types of transformers : "Inductive"


and "electronic".
Inductive transformers work with 2 coils, the primary
and the secondary coil. If you divide the number of
turns of the primary coil by the numbers of turns of the
secondary, you get the so called "Transformer turn
ratio", and it is also proportional to the input and
output voltage and thus can also be called the
"Transformer voltage ratio". Here's a formula to make
things clear :
Where "n" is the turn/voltage ratio, Np and
Ns the number of windings in the primary and
secondary coils, and Vp and Vs the voltage across
the primary and secondary coils (respectively).
This type of transformer work at mains frequency
(50/60Hz), and don't require circuitry at the coils (only
a rectifier if you want DC at the output). While these
transformers are cheap, they can be a bit bulky and
are not used so much in household electronics
anymore.

The second type of transformer, electronic


transformers, rely on the same principle than the
inductive transformer, but the maths are not as simple
as a classic "transformer turn/voltage ratio".
These transformers work at much higher frequencies
(from 10kHz to 50kHz in household electronics). They
also rely on another principle called "Resonant
inductive coupling" (this principle is also used in Tesla
coils). I'm not going to explain how that works as
Wikipedia already has a nice article about it.
Electronic transformers do have to have circuitry
behind them in order to make them work, and thus are
a bit more expensive. But because of their efficiency
and space they take, they are now used a bit
everywhere (Phone/laptop chargers, small power
bricks,...).

BUT WAIT !!
The explanation I gave is in really, REALLY big lines.
there's much more theory and more precise examples
that exist. It is perfectly possible that the explanations
above are false in some ways, but it's simplified for

"beginners". If you want to learn things in detail and


more importantly, that are more correct, you can
always read books and Wikipedia articles about
electronics.
In the project description, I said that I will be using a
car 12V-to-230V adapter. This thing is basically an
electronic transformer. The transformer I will be using
is a generic 150W unit a friend gave me.
After some tests, I saw that when there is no load, the
output voltage is around 160VAC, and when I plug a
60W load, the voltage drops to 130VAC to then raise
to 230VAC. This process takes time to finish, around 3
seconds. You might think that's fast, but not fast
enough for a desktop computer. So I need to find a
way to keep the transformer active and at 230VAC.
I thought of using a constant 10 Watt load, and when
the UPS is activated, I disconnect this load with relays
and I pipe the transformer's output to my output plugs.
Here's a little block diagram of what I mean :

The two switches are relays that work at the same


time. In this diagram, they are displayed in "normal"
mode (when mains AC is working).
I think that's about it for this one.
If you think of a better solution, your suggestions are
always welcome !!

Finding the right battery


08/20/2016 at 22:18 0 comments

So, in order to work, a UPS needs a battery.


As you may know, there are multiple types of battery.
For example, Li-Ion/Li-Poly, Alcaline, Lead-Acid an
others. In this log I'm going to focus on Li-Poly/Li-Ion
and Lead-Acid batteries.
Let's begin with li-Ion/Li-Poly. Li-Ion stands for
"Lithium Ion" and Li-Poly for "Lithium Polymer". Their
chemistry and charging processes are roughly the
same, so from now on I will just ay "Lithium batteries".
Lithium batteries are some pro's and con's. Here's a
little list :

Pro's :

Lightweight for the capacity


can deliver a good current peak

become more and more widely available

Con's :
o
o

Can be expensive for higher capacities


Dangerous because of their Current
capabilities
Require a sophisticated circuitry for charging.

Lithium batteries can be suitable for this project, but


due to their complexity and price point, I will try to find
something else..
*
Lead-acid batteries ! So, these batteries are often
used in vehicles to start the motor, as they can deliver
a good current peak too. Here's a list of the pro's and
con's of a lead-acid battery :
Pro's

o
o

Cheap
Can be found in car accessories
stores/garages

Can deliver a good Current peak

Pretty simple to charge


Con's :

o
o

Heavy (because of the lead)


Take a lot of space for their capacity
So I think these are the batteries I'm looking for ^^ As
I want my UPS to be transportable -not portable,
transportable :p -, weight won't be a big issue as long
as I'm able to lift the UPS by myself ^^
Now the capacity. As I want my UPS to work for at
least two hours at full power (150W), I need to do
some maths.
So, if you have 150W for 230V, it means that it's also
150W for 12V at the transformer, and thus it means
that you're eating 12.5A (150W/12V). As there are
some power losses, let's assume we're eating 14A. If I
want my UPS to work for 2 hours, I need to have a

battery of at least 28Ah (So 30Ah should be easy


enough to find)
Now I know what to buy next ^^
*
N.B.: While I'm waiting to go and boy a new battery, I'll
go at the car garage in my neighborhood to ask if I
can have an old car battery that is laying around.
Garages usually give them to students for their
projects. (Special thanks to Manoel (@M.daSilva) for
giving me this tip !!)

Charging the battery


08/21/2016 at 19:47 0 comments

In my last log, I talked about battery types and which


battery I am going to use in my UPS.
The thing is, if you want to use a (chargeable) battery,
you need to charge it !! For a lead-acid battery, it can
be as simple as connecting the battery to 13.8VDC
and let it charge. But it's not so great for the lifetime of
the battery. In order to charge Lead-Acid batteries,
you need a relatively simple circuit to charge it.

In the beginning, I'm going to use a circuit with the


PB137 IC (here's a simple example :
http://bit.ly/2bW2IpX), and while I'm using this one, I'll
search for a faster, more sophisticated circuit.
The battery has to be charged completely all the time
to be sure that the UPS has its full working time. So I
think that it will be OK if I leave the battery connected
to the charging circuit all the time; but I will do some
tests to be sure ^^
Well, I think that's it for this project log. If you have any
suggestions or ideas, make sure to leave them in the
comments !!

You might also like