Voltage trigger

Well I am a starter in electronics and arduino...
The thing is that I have a circuit wich outputs 12 volts when I want it (has no connection with arduino), and I want that when voltage goes to 12 it sends a arduino a trigger to send sms. I've got the sms thingy working but how could I do that. Do I need any special circuit or anything ?

It would be good to give me a example code too.

Thanks for all responds,
Blaz Rezar

You don't say if the 12V is AC or DC but if it's DC then a simple voltage divider will lower the voltage to a level the Arduino can read without being damaged.

Use a resistor voltage divider to reduce the 12V to 4 to 4.5V. Measure the 12V to make sure that it is indeed 12V (not higher) and use the measured voltage in the voltage divider calculation. Connect the center of the voltage divider to a digital input. When the 12V comes on there will be 4-4.5V at the pin. If(digital_input == HIGH) send SMS.

http://www.daycounter.com/Calculators/Voltage-Divider-Calculator.phtml

Remember you need to connect the ground of your 12V system to the ground of the arduino as well.

Thanks everyone !