How to "activate" the board with external power help?

Hi, I'm kind of new to Arduino boards, and I want to "activate"(for lack of a better word) the board when power is supplied. This may sound confusing, but essentially, I want to somehow connect the board to my doorbell, so that when the doorbell is pushed, power goes to the board, and runs the sketch I have uploaded. Is there anyway I could do this? I don't mind leaving the board on, but I want the sketch only to run when the doorbell is pushed, and then to stop after it has been run. Is there any way this can be done?

Thanks in advance.

well you could leave it on all the time and wait for a trigger (the doorbell) thats a simple matter of software and some basic hardware to convert the doorbell voltages (what 12-24 vac?) to arduino happy signals.

a more economical approach is to put the arduino to sleep while it sits there doing nothing, dropping current draw from tens of millamps to microamps for the majority of the time, but its not exactly a direct function of the arduino library so you will have to get into some more advanced programming (though there are plenty of examples around)

either way the arduino consumes such little power by itself it shouldnt be a big deal, but going from 0.0x amps to 0.00x amps for something that will mostly sit there doing nothing does have its advantages as well.

which sounds better?

Osgeld: well you could leave it on all the time and wait for a trigger (the doorbell) thats a simple matter of software and some basic hardware to convert the doorbell voltages (what 12-24 vac?) to arduino happy signals.

What kind of hardware would I need, and where would I wire the doorbell wire to on the Arduino? Thanks

that kind of depends on what your doorbell is using quick google seems to suggest anything from 6 volts to 24 volts ac and dc

it may be a couple resistors to drop the 6 volts dc down to 5, it might require a rectifier and some voltage conversion / transistor action, but nothing too serious, few bucks and a little time with solder and wire

you probally would wire it into where the switch returns to the unit, if you look inside theres usually a couple screw terminals that run out to your door and back, find the one thats only has voltage when the button is pressed, have the arduino wait for an input, run its thing and wait for another input (guess you could do it closer to the switch depending on your needs)

I guess my real question is what are you trying to do? if your interfacing with a existing doorbell system then the above holds true, if your got a button but nothing to connect it to, as long as its not too far away you could just use the doorbell switch as a normal switch and have your arduino chime in place.

Alright, I'll look into the voltage for the doorbell, but how many volts can the Arduino handle?

Also, I know what wire the doorbell is connected to,(I used it for other projects) but where would that connect to on the Arduino?

Thanks for the help.

the thing is, to me a doorbell is that box on your wall with all the chimes and whatnot in it, the doorbell switch that sits on your front door is just a dumb ole switch.

so if your just wanting to use that switch (and again its not a drastic amount of distance from there to where you want your arduino) you can just wire it up like a normal button example

if you want to tie into the actual doorbell, that requires voltage considerations and yadda yadda

Well, I originally planned to wire it from "the box on the wall." This is fairly close to where I would put the board. With that premise, where would I attach the wire from the box to the Arduino? Would it just be a digital pin? Also how many volts can the Arduino withstand. The board is a Duemilanove.

Now with your other idea, using the actual button, how would I do that? The button just completes the circuit when pushed, so where would I attach the wires for the Arduino?

Sorry for all the questions and confusion, but I really appreciate the help.

the arduino can handle a max of 5 volts dc (ok 5 + like .5 but its a 5 volt system) SO if its 5v dc yea you could hook it up to a digital pin, its not very likely that the doorbell actually runs on 5v dc (but hey you never know with modern things)

as far as just using the button and basically using the doorbell box as a enclosure you would hook it up to any digital pin just like any other button in the example

http://arduino.cc/en/Tutorial/Button

taking length and guage of wire you will loose voltage in the trip, but it still should be enough to perform its function.

Sorry for all the questions and confusion, but I really appreciate the help.

dont be, and your welcome

I imagine you want to do is use a reverse opto-isolator or relay. Normally you have the Arduino connected to the control side of the opto-isolator, so that when the Arduino applies power (through digitalWrite), it closes the circuit and enables the remote device. Instead you want to have the doorbell circuit act as the control and it connects a circuit between a digital pin and ground. I would check whether the doorbell is A/C or D/C, and buy a relay/opto-isolator that will work with the doorbell.

exactly, an optical isolator (basicly a photo-transistor and a led packed in a dip chip) would handle the signaling from high voltage to the low voltage arduino as long as you plop an appropriate resistor in line with the led side so it doesnt burn out, and if its ac just rectify it before hand

not super complicated (couple o parts), its just a matter of knowing what your dealing with, and what your planning to do

(and yes I do have a habit of making post's more complicated, but its about finding the best solution for your intended application)

The above sounds reasonable to get the power turned on but something has to latch it as the average doorbell press would not be long enough for the Arduino to boot and do it's job.

I would wire the door bell to one pole of a latching relay and have the Arduino trigger the other pole when it's finished doing whatever it does. Get a relay with a coil voltage suitable for the existing wiring and the Arduino can use a transistor to handle the other coil.


Rob

Graynomad: The above sounds reasonable to get the power turned on but something has to latch it as the average doorbell press would not be long enough for the Arduino to boot and do it's job.

Unless the Arduino is just sleeping waiting for the doorbell interrupt on an appropriate pin, and not turned off. I think my UNO and the other newer Arduinos spend some amount of time at power on looking to see if there is a new program to be installed via USB/FTDI, and it might not give you the fast response that is desired.

I think my UNO and the other newer Arduinos spend some amount of time at power on looking to see if there is a new program to be installed via USB/FTDI,

Yes the bootloader takes quite a long time, if you dispense with that the chip will start executing code within ~60mS.

Obviously using an interrupt from sleep mode has none of these issues but does draw (very small amounts of) power all the time.


Rob