[Tex/LaTex] Scaling Components in Circuitikz so it doesn’t disturb schematic

circuitikz

I have this code so far

First question: For the purose of the question, I think it would be a good thing to generate a picture, but I don't know how.

Then, the main question is on the sizing of components; I would like to understand how to scale down (or Up) a component, in this case a resistor (but it could also be useful to scale an Op-Amp). I have seen in another post that i could use /tikz/circuitikz/bipoles/length=.5cm with some scaling factor, but as you can see (from the image), I get issues with the wire and the node(the wire goes left, and the $$V_in$$ is far away to the right. So how do I scale the resistor so it doesn't mix everything else.

\documentclass[letterpaper, 12pt]{article}

\usepackage{fullpage} % changes the margin

\usepackage[utf8]{inputenc} %
\usepackage[T1]{fontenc}    %  Load a font with all the characters
\usepackage{lmodern}        % 

\usepackage{enumerate}

\usepackage[french]{babel}

\usepackage{amssymb,amsmath,amsthm,amsfonts}
\usepackage{mathtools}

\usepackage[siunitx,american]{circuitikz}
\usetikzlibrary{circuits}
%\usepackage[retainorgcmds]{IEEEtrantools}
\usetikzlibrary{positioning}  

\usepackage{graphicx}

%==================================%

\begin{circuitikz}
    \draw
    (0, 0) node[op amp] (opamp) {}
    (opamp.-) 
            to ++(-.8,0)  
    (-2,0.5)    to [R,*-,l_=364.1<\ohm>](-2,-1)             node[ground]{}
    (-2,0.5)    to [R,l=988<\ohm>](-2,2) -- (-4,2)
                to [battery, l_=15<\volt>](-4,-.5)          node[ground]{}
    (opamp.-) to[R,*-,l_=9.87<\kilo\ohm>]++(0,2)            node[ground,yscale=-1]{}  
    (opamp.+) to ++(0,-1) coordinate (leftR)
    -- (leftR -| opamp.out)
    to[short,-*] (opamp.out)
    (opamp.out)  to[/tikz/circuitikz/bipoles/length=.5cm,R,l=10<\ohm>,xscale=0.5](5,0)          node[anchor=west]  {$V_{out}$}
    ;
\end{circuitikz} 

Best Answer

Is this what you were trying to do?

BTW, the \pgfextra{...} is only needed to call \ctikzset in the middle of a \draw (\path, \fill etc.) command. \ctikzset{\bipoles\length=5cm} will change the size of every component. (The widths and heights are multiplied by the length.)

\documentclass[border=1pt]{standalone}
\usepackage[siunitx,american]{circuitikz}
\begin{document}
\begin{circuitikz}
    \draw
    (0, 0) node[op amp] (opamp) {}
    (opamp.-) 
            to ++(-.8,0)  
    (-2,0.5)    to [R,*-,l_=364.1<\ohm>](-2,-1)             node[ground]{}
    (-2,0.5)    to [R,l=988<\ohm>](-2,2) -- (-4,2)
                to [battery, l_=15<\volt>](-4,-.5)          node[ground]{}
    (opamp.-) to[R,*-,l_=9.87<\kilo\ohm>]++(0,2)            node[ground,yscale=-1]{}  
    (opamp.+) to ++(0,-1) coordinate (leftR)
    -- (leftR -| opamp.out)
    to[short,-*] (opamp.out)
    \pgfextra{\ctikzset{bipoles/resistor/width=.4,
                        bipoles/resistor/height=.15}}
    (opamp.out)  to[R,l=10<\ohm>](5,0)          node[anchor=west]  {$V_{out}$};
\end{circuitikz}
\end{document}

scaled resistor

Related Question