My next project: laundromat watcher!

My 2nd project with the Arduino is going to be something that watches the washers/dryers in my laundromat, and the computer will monitor the serial port to see when a washer/dryer has started/stopped and update a website accordingly.

The Arduino Mega will have enough digital pins on it to do the job, but to start I’m going to use one of the regular USB Arduino’s I already have.

I was thinking of just trying to find something inside each washer/dryer that is < 5VDC, but it looks like most of them are entirely AC. What kind of device do I need to convert say 110VAC to 3-5V DC? A step-down transformer or something? Is there any way to have the arduino detect AC instead of DC (I presume not)?

going to be something that watches the washers/dryers in my laundromat,

I married one of those. ;)

There have been a few threads recently on detecting AC. I would favour using an opto isolator driven from the AC side into the arduino to detect it's presence.

I'm not sure I follow how to use an opto-isolator, I don't see how I'd wire each of the pins.

If it was digital, I'd just run 1 wire directly to the power source, with a resistor in between it.

See:- http://en.wikipedia.org/wiki/Opto-isolator

You wire it up so you have a resistor (largish as you only want 20mA through the LED) and the LED connected across where you expect to see the AC voltage.

Then wire the emitter to the arduino ground and the collector to the arduino input. Enable the internal pull up resistors on the input.

If it was digital, I’d just run 1 wire directly to the power source, with a resistor in between it.

And it wouldn’t work unless you connected the grounds together as well.

I married one of those.

I take it you wouldn't say that to her face G_M ? ;)

Yes I'd connect all the grounds together as well.

So would something like this work? 1 for each washer/dryer AC load that I want to monitor? http://www.sparkfun.com/commerce/product_info.php?products_id=314

If you're using High voltage AC with an arduino they must be isolated. Mains power commands respect, unless you like living dangerously . Doing it on the cheap and assuming they have an existing neon power indicator, I'd stick a phototransistor next to the neon and pull it high with something like a 500 k resistor and have the PT between the pin and ground. You can leave the grounds unconnected, thats the point of optical isolation.

Well I don't know what I'm going to try to use, I'm going to try to find something that kicks on when it starts of course :) Since I don't know what it will be I'll use a voltmeter and test for the lowest voltage thing.

For items that have an on light, I'll tap into those, they are only 6 or 12VAC. Would that opto-isolator be ok for something like that?

The whole point of optical isolation is that there is no electrical circuit between the AC device and the microcontroller. The 'circuit' between the two is entirely optical, it doesn't matter what the voltage is if you're using an existing power light and a phototransistor. When the light is on the phototransitor conducts current, when it isn't, it doesn't - its that that is connected to the arduino. You could switch it on and off with a flashlight and it will work just the same.

My 2nd project with the Arduino is going to be something that watches the washers/dryers in my laundromat, and the computer will monitor the serial port to see when a washer/dryer has started/stopped and update a website accordingly.

My wife just asked earlier today wouldn't it be possible to receive an SMS when the laundry is ready :D Let us know how your project goes on.

pluggy,

So it doesn't matter if its 1000VAC or 1VAC, 100Amps or 0.1Amp, since there is no load it won't burn out the wire or overload it?

If its just a phototransistor next to the machines own power light, it is completely irrelevent what the electrical rating of the machine is. Its a DIY opto-isolator if you wish. I have one stuck on a flashing LED electric meter measuring electrical consumption. I didn't risk life and limb and the wrath of the electric company making any connections to the meter, its just taped onto the glass with black insulation tape.

No I'm not looking to see if the light is on or not, only a few of them have "on" lights. I need to see if current is flowing to the motor or some other component, I need to hardwire this in.

Same topic was debated here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1255310768/7#7 Look at the solution I proposed (reply #7).

Ok, so in this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235146158/2#5

There is a nice schematic that he used for 120-240VAC. Could I use the same parts for any voltage up to 120VAC or will that not work?

You need an opto-isolator with a mains voltage input. The opposite to most optoisolators which have TTL input :

http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=5474030

I always keep a few MOC3010's on hand for just such an eventuality.

Those are if you wanted to control the Laundromat from the Arduino, (TTL input, AC output) not what he's after....

I guess the MOC3010's are sort of the opposite of what you were proposing huh?

Erm, so I'm lost, what do I need here? Can I use any AC input voltage with that circuit diagram? http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235146158/2#5

Or do I not use that diagram at all?