Regarding AC diagnosis with Arduino using a AC/DC wall-wart adapter.

Greetings,

I am working on a project which is supposed to control 220V-AC devices by the help of relays and Arduino through web browser interface.

Anyways, the project now requires me to diagnose if controlled device's current source is working so for that I am planning to connect AC/DC wall-wart to the circuit and use the DC it generates to check the presence of AC in the circuit by connecting the DC output to the Arduino pins.

So I have two unused phone chargers: Nokia AC-8E which produces 5V/890mA DC, Samsung ETA3S31EBE which outputs 4.75V/550mA DC.

As I am not an electronics savvy, I am come here with a simple yes/no question:

Do I need to add resistors or any other stuff to the circuit so that the wall-wart can be used together with Arduino safely on it's analog/digital inputs to check the presence of AC in the circuit?

By having this question answered I will know for sure that whether it needs more research on my part to make it work. Of course, it would be nice if someone answered with more detail, but everyone's time is precious so 'yes/no' will be more than enough.

I take it those wall-warts are already packed with protection in case of their failure to protect the devices, so the only thing I am not sure of is how Arduino pins will handle the current. Will they draw only the amount it "needs" or is 890mA/550mA too much? Because all I know is that Arduino pins can provide 20-30mA and draw 50mA at most, but I found nothing regarding how much current it can handle when the pins are used as inputs.

Excuse my ignorance. :)

Thank you very much.

yogintas: ... Will they draw only the amount it "needs" ...?

Yes. You are safe using a regulated power adapter as input to the Arduino

olf2012: Yes. You are safe using a regulated power adapter as input to the Arduino

(~˘▾˘)~ Thank you very much.

Using those 5V AC/DC adapters for powering an Arduino must be handled with caution. Reason: Normally (without load / device connected) they run up to 7..8V and only go down to 5V..6V when they power (= deliver current) to a connected device.

If you want to power your Arduino directly (and the only pin you can use for that is +5V Pin of the Arduino), make sure that your wall adapter is a well and stable regulated 5V type which doesn't exceed the voltage by more than a few percent.

Powering an Arduino that way is bypassing all built-in protection mechanisms! If you want to load up a new sketch and forget to unplug the direct feeding of +5V while plugging in the USB cable you will most likely kill your Arduino!

That said, I would rather buy a wall adapter with 7.5..9V/500mA and use this to power the Arduino via the Japan Jack socket to be on the safe side. This adapter costs way less than a new Arduino Uno.

Here is a link to some useful information about powering Arduino: http://www.open-electronics.org/the-power-of-arduino-this-unknown/

A question ref. to your project: How do want to detect that AC / mains power is working when your Arduino is dead (=w/o power) at the same time? Or is it sufficient to notice that the website isn't working anymore (due to the mains power outage)? The website could be offline due to other reasons (stability of web shield, communication error etc.).

How many power sources is your device going to have ? One to provide evidence of the availability of a mains power source and a second ( battery? ) so the device can take some action if the mains power source is unavailable ? If that is so, is it foreseen that first power source is used to charge the battery?

rpt007: Using those 5V AC/DC adapters for powering an Arduino must be handled with caution. Reason: Normally (without load / device connected) they run up to 7..8V and only go down to 5V..6V when they power (= deliver current) to a connected device. ...

6v6gt: How many power sources is your device going to have ? One to provide evidence of the availability of a mains power source and a second ( battery? ) so the device can take some action if the mains power source is unavailable ? If that is so, is it foreseen that first power source is used to charge the battery?

I am sorry for not providing this information.

As I am checking out how things are working, right now the Arduino is going to be powered by USB from my laptop and HTTP server is on my computer with all control is happening through HTTP requests through LAN port connected from my computer to Arduino. In real life scenario, I suppose I would use the power jack that is 'supposed' to be used and have the HTTP server standing somewhere on the cloud. So the idea here is that I have an Arduino that is already with a power source and I am just using the AC/DC adapter to check whether the AC is there by having the AC/DC adapter output connected to Arduino pins and checking the DC voltage in those pins to see whether the AC is present and then send the information to HTTP server.

I hope I was clear.

And how do you power your Arduino when mains power is OFF?

You will need a power source for the Arduino which is not dependent on mains power - so @6v6gt pointed you to use a battery which is being loaded when mains are available and power the Arduino when mains is gone.