Need hardware to trigger a digital I/O when trigger input varies from 0-12Vdc

Dear everybody.

This is my first contact with arduino and of course need some help.

Project is the following.

When a person presses the bell button downstairs a 4.5VDC can be abstracted from the speaker of the 12Vdc suppled door phone. Using this trigger voltage I am trying to close the switch that activates the lock inside the door phone.

So I haven't figured the hardware to trigger me a digital I/O. I know that all I need is 3.3Vdc and that I can abstract a 4.5VDC voltage while someone presses the bell button but I have no idea what happens in all other case scenario; that is while unhooking the headphone and speaking (wouldn't that or any other audio frequencies cause damage to arduino? )

Any suggestions? Does anybody know of a voltage 3.3v dc/dc regulator while input varies at any given time from say 3 to 12Vdc?

Thank you all.

If you want to be 100% sure nothing bad happens you are best to use a octocoupler. This way you use light to couple the 2 cirquits. This way you do not have to connect the ground of our Arduino to the ground of your doorbel. Best regards Jantje

Dear Jantje thank you.

There is this huge gap in my mind’s knowledge database.
Is there any optocoupler that can be triggered by a ranged voltage from 3 to 12Vdc? All there is in the web are from 4.5 to 5.5Vdc.
Is there any ready board for this you may know of with an optocoupler for arduino?

An optocoupler is driven by amps not by voltage. So applying the correct resistor would do U= R * I. I don't know where you find 4.5 to 5. Vdc optocouplers. If you look at farnell you get plenty of choice. There are many arduino boards and there may be one that fits your needs. You will have to look yourself though. Best regards Jantje

But this is an equation with 2 unknown variables. Voltage is not constant it's a variable and changes from 3 to 12v. How can you choose a resistor?

Maybe I should use another approach for the project. What if I use instead "Voltage Divider Detection Sensor Module" (5 times step down, 25v max input) and connect it to an analog input. Then when 5>v>3 trigger my digital output where i connect a 5volt driven relay.

What do you thing? Have any code for that?

http://biomedicaltechnologyconsulting.blogspot.com/2012/05/arduino-automatic-door-opener.html[/url]

I think not bad for my first arduino project.