How to embed a 5V-range Arduino-based controller in a 12V-range DC circuit? We have an installation that provides:


a common line (C), which divides into two wires;
an input line (I), which carries the signal from a button (between I and C there's normally 0V, and 12V when the button is pressed);
an output line (O), which carries a signal to a bell (between O and C there's always 12V).








simulate this circuit &ndash; Schematic created using CircuitLab

A controller is to close the OC circuit every time a given temporal pattern shows in I (say, a concrete Morse-like -short/long- sequence of pulses), so the bell will ring if the concrete word is recognized at the input. Such a controller has been implemented in C++ and uploaded to an Arduino Nano, and it works fine on a protoboard, with a button as input and led as output, all in the same electrical range.

Since both the IC and the OC are 12V circuits, and the controller is in the 5V range, what is the minimal circuit to embed the controller between the IC and the OC circuits?
Just use a transistor that can handle 12V with the base connected to the Arduino and that's it... 

Maybe I didn't get what you were trying to say, but anyway, I think that's what you are looking for.