So I have this really old computer UPS lying around so I decided to open it and see what's inside. I believe its a standby UPS that only switches to battery power to run the inverter when the mains powers (220V) is out and this keeps whatever device running at the output to continue running without any interruption.
The thing is I was wondering how I can implement this "switching" using the Arduino in any project. What I understood from the UPS circuit is that it was using relays to switch between the mains supply and the inverter supply, I think the switching is so fast that the output is pretty much stable.
How can such a system be implemented?
For Example.. Lets say I have a 3D printer running on mains power and I have an inverter circuit (without battery charging function) lying around. Lets assume this inverter can run the printer for a good 2hrs and I have a separate battery charger with which after use I can simply unplug the battery from the inverter and charge it.
With these conditions how can I develop a circuit that'll power the printer on mains and when there is a power failure the circuit simply switches to the inverter for power without any delay so that the printing process is not interrupted. And also switch back to the mains if power comes back on so that I don't have to run from the battery unnecessarily.
How can I detect the power failure and trigger the switching?
code_red:
For Example.. Lets say I have a 3D printer running on mains power and I have an inverter circuit (without battery charging function) lying around. Lets assume this inverter can run the printer for a good 2hrs and I have a separate battery charger with which after use I can simply unplug the battery from the inverter and charge it.
To my mind the simplest solution is to power the printer from the inverter all of the time and have an always-on trickle-charger to keep the battery charged. If the mains power goes out the 3D printer won't notice.
Robin2:
To my mind the simplest solution is to power the printer from the inverter all of the time and have an always-on trickle-charger to keep the battery charged. If the mains power goes out the 3D printer won't notice.
...R
Yeah, I know this is a solution but I'm looking for something different like the one I mentioned above. I have two circuits capable of powering the printer and I need a third circuit that can switch between the powering circuit.
Im thinking of using relays/transistors/mosfets to do the switching, but I cant figure out a way to detect the power failure in the mains circuit.
An easy way to check for presence of mains voltage is to plug in an old mobile phone charger and connect the 5V signal to an input of your Arduino (and connect grounds, of course). The moment the power goes out, that 5V signal drops to zero as well.
If you start the inverter and switch over the power to your 3D printer the power supply WILL be interrupted, if only for a few milliseconds. It takes time for the Arduino to react, for the relays to switch, for the inverter to start up. All not much, if it connects to a light bulb you may just see a short flicker, but that's more than enough for a 3D printer's controller to reset.
An obvious problem here with the "old mobile phone charger" (but - why an old one?) is that by design, it keeps charge in the storage capacitor for several seconds.
Unless you are referring to the old Nokia "cube" which had no capacitor and consisted simply of a transformer and rectifier.
Paul__B:
An obvious problem here with the "old mobile phone charger" (but - why an old one?)
I don't want to suggest anyone to go and buy one for just this purpose when they most likely have a bunch of disused (aka "old") ones in the drawer already...
You are lucky in that the 3D printer will run from a low voltage - so as suggested. Charger >> battery>> printer , the the simplest route and doesn’t need an Arduino and will work .
Your UPS( actually a SPS, Stand-by-Power-Supply) is useful only if the devices connected can continue working while the relay switches and more important, can stand the the break in phase of the mains power. Then there is the problem of the square wave power vs. the sine wave power.
If the connected devices has a transformer and sufficient filtering capacitors, then all is well. Most modern electronic devices fit that image. But if you are powering a CNC device that relies on the mains for timing, then that won't work.
What if I used a ACS712 to measure the current flowing through the main supply, when the current becomes 0 the switching circuit can be triggered. Would this actually work?
I think so - just keep in mind that 100 or 120 times a second (depending on where you live) the current becomes zero as a matter of course. You have to account for this.
Plus of course the safety implications of working with mains voltages: you have to either isolate the current sensor from the rest of your project (both its signal and its power source), or put the whole thing in an isolated box.
I am confused, if you have the “mains” power circuit routed through the “Normally Open” contacts of the relay and the Battery power circuit through the “Normally Closed” contacts the loss of power will automatically switch to battery...
Slumpert:
I am confused, if you have the “mains” power circuit routed through the “Normally Open” contacts of the relay and the Battery power circuit through the “Normally Closed” contacts the loss of power will automatically switch to battery...
Yes, I have thought about the same. After all its just theory. I'll need to experiment with this setup. This could actually work.
Slumpert:
I am confused, if you have the “mains” power circuit routed through the “Normally Open” contacts of the relay and the Battery power circuit through the “Normally Closed” contacts the loss of power will automatically switch to battery...
If the battery is powering an inverter then it is likely that the inverter will take a few seconds to start - both of mine do.
So I have this really old computer UPS lying around so I decided to open it and see what's inside. I believe its a standby UPS that only switches to battery power to run the inverter when the mains powers (220V) is out and this keeps whatever device running at the output to continue running without any interruption.
Check the spec on the UPS. a lot of them are NOT REAL UPS, they are a supply designed to operate for 10 or 15minutes, to enable the computer to shut down safely.
Most of them have an RS232 or USB socket to connect to the PC to run on some proprietary software that you can configure to if you like safely auto shutoff the PC.
These are not designed to keep loads going for extended time, look at the battery capacity and google for the manual.
What size is it and what batteries does it have?
My workplace services industrial UPS designed to keep monitoring equipment running during a power failure and it is a very sophisticated UPS that is needed for 1 to 5 hour operation.
So if it is a 15minute unit, it is not capable of long period operation, and its not just because of the limited battery capacity.
Tom...
TomGeorge:
Check the spec on the UPS. a lot of them are NOT REAL UPS, they are a supply designed to operate for 10 or 15minutes, to enable the computer to shut down safely.
Most of them have an RS232 or USB socket to connect to the PC to run on some proprietary software that you can configure to if you like safely auto shutoff the PC.
These are not designed to keep loads going for extended time, look at the battery capacity and google for the manual.
What size is it and what batteries does it have?
My workplace services industrial UPS designed to keep monitoring equipment running during a power failure and it is a very sophisticated UPS that is needed for 1 to 5 hour operation.
So if it is a 15minute unit, it is not capable of long period operation, and its not just because of the limited battery capacity.
Tom...
Like I said below, Im planning to use an inverter and not an UPS.
code_red:
Like I said below, Im planning to use an inverter and not an UPS.
You need to measure two things.
{A} How long your 3D printer will continue to operate after the mains power is disconnected.
{B} How long does it take the inverter to start producing AC power after DC power is applied to it? As I mentioned earlier I have two inverters that are used regularly and both take a few seconds to start up.