Go Down

Topic: Arduino detect loss of energy (Read 342 times) previous topic - next topic

javi30seconds

hello everyone will see I have an arduino one which is connected to an ups so that when the power goes out it stays on.

What I want to do is for the Arduino to detect that drop in energy. I have thought about placing a cable to pin 3 (for example) which injects the arduino 5v of current from an external source so that when the power is cut the pin stops receiving those 5v ... does anyone know if this is possible? and how should it be done to read if on the pin I am receiving energy.

Thanks!

in summary: I need to detect a cut of energy by arduino. any concrete idea is welcome!

jremington

#1
Dec 09, 2019, 03:49 am Last Edit: Dec 09, 2019, 03:50 am by jremington
Please describe the "source of energy". Do you mean household AC (110 VAC/60 Hz, 220 VAC/50 Hz, etc.)?

Most UPS devices automatically switch to battery operation when the AC power is cut.

gilshultz

Why not take a inexpensive wall wart (charger), divide the voltage so it is safe for your arduino and connect that divided voltage to a port pin.  I do this type of thing a lot. There is one gotcha the wall wart probably has a capacitor so you will have to add a load to cause it to discharge, since you are not interested in speed a LED would work just fine. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

hammy

You can buy , relatively cheaply power supplies, with additional relay contact outputs to show if the supply is on - that would easy to use .

12Stepper

Quote
Arduino detect loss of energy
... and there's me, thinking from the title that the OP was designing an experiment to test the laws of thermo.


edugimeno

You need

1)Your system to keep working when there's no power. You probably need a battery to hold your arduino up
2)You probably need to send the signal "POWER OUT!!" somewhere, but make sure it can be sent with no power (so if your UPS powers the Wifi  router, you need al alternate way)
3)You need a pin that monitors the power supply. Yes a cheap 5V USB charger can be used and will be cheaper than other more specific solutions like an opto+resistor+capacitor. Just provide thos 5V to any digital IO pin and monitor when it goes LOW

Good luck

Go Up