3

How can I draw a wattmeter using LaTeX and circuitikz? I want to use the one with a circle and a cross inside.

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Ruben Dec 20 '14 at 13:44
  • Did you read the documentation? ctan.org/pkg/circuitikz – Sigur Dec 20 '14 at 13:54
  • There's no mention of 'wattmeter'. – Attila Dec 20 '14 at 14:48
4

Since there is no wattmeter in the circuitikz, you need to draw one. Here the solution modifies the DC voltage source and create a wattmeter via newcommand that takes one argument for label

enter image description here

Code

\documentclass[border=10pt]{standalone}  
\usepackage{tikz}
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{calc,positioning}

\newcommand{\wattmeter}[1] 
{  % #1 = name
\draw[thick] (#1) circle (12pt);
\draw[rotate=45,line width=1pt]   (#1) +(0,-12pt) -- +(0,12pt);
\draw[rotate=-45,line width=1pt]  (#1) +(0,-12pt) -- +(0,12pt);
}

\begin{document}  
\begin{circuitikz}
\draw (-1,0) node[ground] {} to[V,l=$10V$] (-1,2) to[R=$4\Omega$] (2,2) to[R=$2\Omega$,] (4,2);
\draw (4,2) to[L, l=$\frac{1}{5}F$] (4,0);
\draw (2,2) to[V,color=white,name=M1] (2,0);
\wattmeter{M1}
\draw (-1,0) to[short](4,0);
\end{circuitikz}

\end{document}
  • Great idea. How would I draw the name of the wattmeter? – Attila Dec 20 '14 at 15:14
  • 1
    Use label as l=M1, right after the name=M1. If you need it on the left hand side, use l_=M1. Same as the skill in circuitikz. – Jesse Dec 20 '14 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.