NPN transistor as a switch.
Rendering
\usepackage{circuitikz}\begin{circuitikz}
\draw (0,0) to[V, v=$5\,\mathrm{V}$] (0,2)
to[R, l=$R_C$] (2,2)
to[short, i=$I_C$] (3,2) node[npn](Q){};
\draw (Q.E) node[ground]{};
\draw (Q.B) -- (1.5,1) to[R, l=$R_B$] (0,1) to[V, v=$V_{in}$] (0,0) node[ground]{};
\end{circuitikz}