How to draw a DC motor in circuitikz Unicorn Meta Zoo #1: Why another podcast? ...

When speaking, how do you change your mind mid-sentence?

Why doesn't the university give past final exams' answers?

Why do people think Winterfell crypts is the safest place for women, children and old people?

Why didn't the Space Shuttle bounce back into space many times as possible so that it loose lot of kinetic energy over there?

France's Public Holidays' Puzzle

Can gravitational waves pass through a black hole?

How to keep bees out of canned beverages?

What was Apollo 13's "Little Jolt" after MECO?

Is a self contained air-bullet cartridge feasible?

Are `mathfont` and `mathspec` intended for same purpose?

TV series episode where humans nuke aliens before decrypting their message that states they come in peace

Married in secret, can marital status in passport be changed at a later date?

false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'

Where did Arya get these scars?

Errors in solving coupled pdes

Raising a bilingual kid. When should we introduce the majority language?

Protagonist's race is hidden - should I reveal it?

Why aren't road bicycle wheels tiny?

Coin Game with infinite paradox

What's the difference between using dependency injection with a container and using a service locator?

Mechanism of the formation of peracetic acid

What is ls Largest Number Formed by only moving two sticks in 508?

Are there existing rules/lore for MTG planeswalkers?

How to check if string is entirely made of same substring?



How to draw a DC motor in circuitikz



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow can I add a component to circuitikz?connections with circuitikzCircuitikz voltage source American styleHow can I include an oscilloscope in my circuitikz circuit diagram?New component in circuitikzNo drawing of ohmmeter or multimeter using circuitikzDraw MCP23017 with CircuitikzCircuitikz 'parallel' logic gate wiringHow can I draw variable springs and dampers using Circuitikz?How can I draw a nonlinear spring in the style of Circuitikz for a mechanical schematic?












3















I'm using circuitikz to create an electric circuit diagram. I'd like to draw a DC motor like this:



DC motor symbol
(source: expertsmind.com)



or this one:



IEC symbol for DC motor



It looks like there's no symbol for motors in circuitikz. I'm using begin{circuitikz}[american]. How I draw those symbols?










share|improve this question




















  • 1





    I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

    – John Kormylo
    Sep 8 '13 at 19:52


















3















I'm using circuitikz to create an electric circuit diagram. I'd like to draw a DC motor like this:



DC motor symbol
(source: expertsmind.com)



or this one:



IEC symbol for DC motor



It looks like there's no symbol for motors in circuitikz. I'm using begin{circuitikz}[american]. How I draw those symbols?










share|improve this question




















  • 1





    I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

    – John Kormylo
    Sep 8 '13 at 19:52
















3












3








3


1






I'm using circuitikz to create an electric circuit diagram. I'd like to draw a DC motor like this:



DC motor symbol
(source: expertsmind.com)



or this one:



IEC symbol for DC motor



It looks like there's no symbol for motors in circuitikz. I'm using begin{circuitikz}[american]. How I draw those symbols?










share|improve this question
















I'm using circuitikz to create an electric circuit diagram. I'd like to draw a DC motor like this:



DC motor symbol
(source: expertsmind.com)



or this one:



IEC symbol for DC motor



It looks like there's no symbol for motors in circuitikz. I'm using begin{circuitikz}[american]. How I draw those symbols?







symbols circuitikz






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 mins ago









Glorfindel

293139




293139










asked Sep 7 '13 at 17:38









GregMGregM

5318




5318








  • 1





    I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

    – John Kormylo
    Sep 8 '13 at 19:52
















  • 1





    I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

    – John Kormylo
    Sep 8 '13 at 19:52










1




1





I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

– John Kormylo
Sep 8 '13 at 19:52







I have a tutorial on the subject: elfsoft2000.com/projects/index.htm and I also am willing to help. Which of the above to you prefer?

– John Kormylo
Sep 8 '13 at 19:52












2 Answers
2






active

oldest

votes


















4














The hard part was getting the M right side up.



documentclass{article}
usepackage[screen,nopanel]{pdfscreen}
usepackage{circuitikz}

margins{0.2cm}{0.2cm}{0.2cm}{0.2cm}
screensize{3cm}{5cm}
backgroundcolor{white}

% prepare to create bipoles

makeatletter
defTikzBipolePath#1#2{pgf@circ@bipole@path{#1}{#2}}
defCircDirection{pgf@circ@direction}

pgf@circ@Rlen = pgfkeysvalueof{/tikz/circuitikz/bipoles/length}

makeatother

newlength{ResUp} newlength{ResDown}
newlength{ResLeft} newlength{ResRight}

% set default motor size

ctikzset{bipoles/motor/height/.initial=.8}
ctikzset{bipoles/motor/width/.initial=.8}

% create motor shape

pgfcircdeclarebipole{}
{ctikzvalof{bipoles/motor/height}}
{motor}
{ctikzvalof{bipoles/motor/height}}
{ctikzvalof{bipoles/motor/width}}
{
pgfsetlinewidth{ctikzvalof{bipoles/thickness}pgfstartlinewidth}
pgfextractx{ResRight}{northeast}
pgfextracty{ResUp}{northeast}
pgfextractx{ResLeft}{southwest}
pgfextracty{ResDown}{southwest}

pgfpathmoveto{pgfpoint{0.775ResLeft}{0.2ResDown}}
pgfpathlineto{pgfpoint{ResLeft}{0.2ResDown}}
pgfpathlineto{pgfpoint{ResLeft}{0.2ResUp}}
pgfpathlineto{pgfpoint{0.775ResLeft}{0.2ResUp}}
pgfpathellipse{pgfpointorigin}{pgfpoint{0.8ResRight}{0cm}}
{pgfpoint{0cm}{0.8ResUp}}
pgfpathmoveto{pgfpoint{0.775ResRight}{0.2ResDown}}
pgfpathlineto{pgfpoint{ResRight}{0.2ResDown}}
pgfpathlineto{pgfpoint{ResRight}{0.2ResUp}}
pgfpathlineto{pgfpoint{0.775ResRight}{0.2ResUp}}
pgfusepath{draw} %draw motor
pgftext[rotate=-CircDirection]{textsf{M}}
}

% create motorto-path style

defmotorpath#1{TikzBipolePath{motor}{#1}}
tikzset{motor/.style = {circuitikzbasekey, /tikz/to path=motorpath, l=#1}}

% end of setup

begin{document}

begin{center}
begin{circuitikz}
draw (0,0) to[motor, l=motor, o-*] (0,2);
end{circuitikz}
end{center}

newpage
begin{center}
begin{circuitikz}
draw (0,0) to[motor, l=motor, o-*] (2,0);
end{circuitikz}
end{center}

end{document}





share|improve this answer

































    2














    Another alternative is to modify an existing two-terminal element in the circuitikz such as sV and redefine a new command called mymotor that draws the desired shape and form. Here two shapes (mymotor, mymotorB) are defined as asked by the OP.



    newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
    {draw[thick,rotate=#2] (#1) circle (10pt)
    node[]{$mathsf M$}
    ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
    draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0)
    ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
    }


    enter image description here



    Code:



    documentclass[border=20pt]{standalone}  
    usepackage[american,siunitx]{circuitikz}
    usetikzlibrary{arrows,shapes,calc,positioning}

    newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
    {draw[thick,rotate=#2] (#1) circle (10pt)
    node[]{$mathsf M$}
    ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
    draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0) ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
    }

    newcommand{mymotorB}[2] % #1 = name
    {draw[thick] (#1) circle (12pt)
    node[above=-3pt]{$mathsf M$} ++(-8pt,-3pt)--++(15pt,0);
    draw[thick,dashed] (#1) ++(-8pt,-5pt)--++(15pt,0);
    }

    begin{document}

    begin{circuitikz}
    draw (0,2) to[L, l_=$L$, o-*] (2,2) to[sV, color=white, name=M1] (3.5,2) to[short,*-] (5,2);
    mymotor{M1}{0}
    draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
    draw (2,2) to[C=$C$] (2,0);
    draw (3.5,2) to[R=$R$] (3.5,0);
    draw (5,2) to[sV, color=white, name=M2] (5,0);
    mymotor{M2}{90}
    %
    draw (2,3) to[sV, color=white, name=M3] (3.5,3);
    mymotorB{M3}

    draw (6,2) to[sV, color=white, name=M4] (6,0);
    mymotorB{M4}

    end{circuitikz}

    end{document}





    share|improve this answer
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "85"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f132076%2fhow-to-draw-a-dc-motor-in-circuitikz%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      The hard part was getting the M right side up.



      documentclass{article}
      usepackage[screen,nopanel]{pdfscreen}
      usepackage{circuitikz}

      margins{0.2cm}{0.2cm}{0.2cm}{0.2cm}
      screensize{3cm}{5cm}
      backgroundcolor{white}

      % prepare to create bipoles

      makeatletter
      defTikzBipolePath#1#2{pgf@circ@bipole@path{#1}{#2}}
      defCircDirection{pgf@circ@direction}

      pgf@circ@Rlen = pgfkeysvalueof{/tikz/circuitikz/bipoles/length}

      makeatother

      newlength{ResUp} newlength{ResDown}
      newlength{ResLeft} newlength{ResRight}

      % set default motor size

      ctikzset{bipoles/motor/height/.initial=.8}
      ctikzset{bipoles/motor/width/.initial=.8}

      % create motor shape

      pgfcircdeclarebipole{}
      {ctikzvalof{bipoles/motor/height}}
      {motor}
      {ctikzvalof{bipoles/motor/height}}
      {ctikzvalof{bipoles/motor/width}}
      {
      pgfsetlinewidth{ctikzvalof{bipoles/thickness}pgfstartlinewidth}
      pgfextractx{ResRight}{northeast}
      pgfextracty{ResUp}{northeast}
      pgfextractx{ResLeft}{southwest}
      pgfextracty{ResDown}{southwest}

      pgfpathmoveto{pgfpoint{0.775ResLeft}{0.2ResDown}}
      pgfpathlineto{pgfpoint{ResLeft}{0.2ResDown}}
      pgfpathlineto{pgfpoint{ResLeft}{0.2ResUp}}
      pgfpathlineto{pgfpoint{0.775ResLeft}{0.2ResUp}}
      pgfpathellipse{pgfpointorigin}{pgfpoint{0.8ResRight}{0cm}}
      {pgfpoint{0cm}{0.8ResUp}}
      pgfpathmoveto{pgfpoint{0.775ResRight}{0.2ResDown}}
      pgfpathlineto{pgfpoint{ResRight}{0.2ResDown}}
      pgfpathlineto{pgfpoint{ResRight}{0.2ResUp}}
      pgfpathlineto{pgfpoint{0.775ResRight}{0.2ResUp}}
      pgfusepath{draw} %draw motor
      pgftext[rotate=-CircDirection]{textsf{M}}
      }

      % create motorto-path style

      defmotorpath#1{TikzBipolePath{motor}{#1}}
      tikzset{motor/.style = {circuitikzbasekey, /tikz/to path=motorpath, l=#1}}

      % end of setup

      begin{document}

      begin{center}
      begin{circuitikz}
      draw (0,0) to[motor, l=motor, o-*] (0,2);
      end{circuitikz}
      end{center}

      newpage
      begin{center}
      begin{circuitikz}
      draw (0,0) to[motor, l=motor, o-*] (2,0);
      end{circuitikz}
      end{center}

      end{document}





      share|improve this answer






























        4














        The hard part was getting the M right side up.



        documentclass{article}
        usepackage[screen,nopanel]{pdfscreen}
        usepackage{circuitikz}

        margins{0.2cm}{0.2cm}{0.2cm}{0.2cm}
        screensize{3cm}{5cm}
        backgroundcolor{white}

        % prepare to create bipoles

        makeatletter
        defTikzBipolePath#1#2{pgf@circ@bipole@path{#1}{#2}}
        defCircDirection{pgf@circ@direction}

        pgf@circ@Rlen = pgfkeysvalueof{/tikz/circuitikz/bipoles/length}

        makeatother

        newlength{ResUp} newlength{ResDown}
        newlength{ResLeft} newlength{ResRight}

        % set default motor size

        ctikzset{bipoles/motor/height/.initial=.8}
        ctikzset{bipoles/motor/width/.initial=.8}

        % create motor shape

        pgfcircdeclarebipole{}
        {ctikzvalof{bipoles/motor/height}}
        {motor}
        {ctikzvalof{bipoles/motor/height}}
        {ctikzvalof{bipoles/motor/width}}
        {
        pgfsetlinewidth{ctikzvalof{bipoles/thickness}pgfstartlinewidth}
        pgfextractx{ResRight}{northeast}
        pgfextracty{ResUp}{northeast}
        pgfextractx{ResLeft}{southwest}
        pgfextracty{ResDown}{southwest}

        pgfpathmoveto{pgfpoint{0.775ResLeft}{0.2ResDown}}
        pgfpathlineto{pgfpoint{ResLeft}{0.2ResDown}}
        pgfpathlineto{pgfpoint{ResLeft}{0.2ResUp}}
        pgfpathlineto{pgfpoint{0.775ResLeft}{0.2ResUp}}
        pgfpathellipse{pgfpointorigin}{pgfpoint{0.8ResRight}{0cm}}
        {pgfpoint{0cm}{0.8ResUp}}
        pgfpathmoveto{pgfpoint{0.775ResRight}{0.2ResDown}}
        pgfpathlineto{pgfpoint{ResRight}{0.2ResDown}}
        pgfpathlineto{pgfpoint{ResRight}{0.2ResUp}}
        pgfpathlineto{pgfpoint{0.775ResRight}{0.2ResUp}}
        pgfusepath{draw} %draw motor
        pgftext[rotate=-CircDirection]{textsf{M}}
        }

        % create motorto-path style

        defmotorpath#1{TikzBipolePath{motor}{#1}}
        tikzset{motor/.style = {circuitikzbasekey, /tikz/to path=motorpath, l=#1}}

        % end of setup

        begin{document}

        begin{center}
        begin{circuitikz}
        draw (0,0) to[motor, l=motor, o-*] (0,2);
        end{circuitikz}
        end{center}

        newpage
        begin{center}
        begin{circuitikz}
        draw (0,0) to[motor, l=motor, o-*] (2,0);
        end{circuitikz}
        end{center}

        end{document}





        share|improve this answer




























          4












          4








          4







          The hard part was getting the M right side up.



          documentclass{article}
          usepackage[screen,nopanel]{pdfscreen}
          usepackage{circuitikz}

          margins{0.2cm}{0.2cm}{0.2cm}{0.2cm}
          screensize{3cm}{5cm}
          backgroundcolor{white}

          % prepare to create bipoles

          makeatletter
          defTikzBipolePath#1#2{pgf@circ@bipole@path{#1}{#2}}
          defCircDirection{pgf@circ@direction}

          pgf@circ@Rlen = pgfkeysvalueof{/tikz/circuitikz/bipoles/length}

          makeatother

          newlength{ResUp} newlength{ResDown}
          newlength{ResLeft} newlength{ResRight}

          % set default motor size

          ctikzset{bipoles/motor/height/.initial=.8}
          ctikzset{bipoles/motor/width/.initial=.8}

          % create motor shape

          pgfcircdeclarebipole{}
          {ctikzvalof{bipoles/motor/height}}
          {motor}
          {ctikzvalof{bipoles/motor/height}}
          {ctikzvalof{bipoles/motor/width}}
          {
          pgfsetlinewidth{ctikzvalof{bipoles/thickness}pgfstartlinewidth}
          pgfextractx{ResRight}{northeast}
          pgfextracty{ResUp}{northeast}
          pgfextractx{ResLeft}{southwest}
          pgfextracty{ResDown}{southwest}

          pgfpathmoveto{pgfpoint{0.775ResLeft}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResLeft}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResLeft}{0.2ResUp}}
          pgfpathlineto{pgfpoint{0.775ResLeft}{0.2ResUp}}
          pgfpathellipse{pgfpointorigin}{pgfpoint{0.8ResRight}{0cm}}
          {pgfpoint{0cm}{0.8ResUp}}
          pgfpathmoveto{pgfpoint{0.775ResRight}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResRight}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResRight}{0.2ResUp}}
          pgfpathlineto{pgfpoint{0.775ResRight}{0.2ResUp}}
          pgfusepath{draw} %draw motor
          pgftext[rotate=-CircDirection]{textsf{M}}
          }

          % create motorto-path style

          defmotorpath#1{TikzBipolePath{motor}{#1}}
          tikzset{motor/.style = {circuitikzbasekey, /tikz/to path=motorpath, l=#1}}

          % end of setup

          begin{document}

          begin{center}
          begin{circuitikz}
          draw (0,0) to[motor, l=motor, o-*] (0,2);
          end{circuitikz}
          end{center}

          newpage
          begin{center}
          begin{circuitikz}
          draw (0,0) to[motor, l=motor, o-*] (2,0);
          end{circuitikz}
          end{center}

          end{document}





          share|improve this answer















          The hard part was getting the M right side up.



          documentclass{article}
          usepackage[screen,nopanel]{pdfscreen}
          usepackage{circuitikz}

          margins{0.2cm}{0.2cm}{0.2cm}{0.2cm}
          screensize{3cm}{5cm}
          backgroundcolor{white}

          % prepare to create bipoles

          makeatletter
          defTikzBipolePath#1#2{pgf@circ@bipole@path{#1}{#2}}
          defCircDirection{pgf@circ@direction}

          pgf@circ@Rlen = pgfkeysvalueof{/tikz/circuitikz/bipoles/length}

          makeatother

          newlength{ResUp} newlength{ResDown}
          newlength{ResLeft} newlength{ResRight}

          % set default motor size

          ctikzset{bipoles/motor/height/.initial=.8}
          ctikzset{bipoles/motor/width/.initial=.8}

          % create motor shape

          pgfcircdeclarebipole{}
          {ctikzvalof{bipoles/motor/height}}
          {motor}
          {ctikzvalof{bipoles/motor/height}}
          {ctikzvalof{bipoles/motor/width}}
          {
          pgfsetlinewidth{ctikzvalof{bipoles/thickness}pgfstartlinewidth}
          pgfextractx{ResRight}{northeast}
          pgfextracty{ResUp}{northeast}
          pgfextractx{ResLeft}{southwest}
          pgfextracty{ResDown}{southwest}

          pgfpathmoveto{pgfpoint{0.775ResLeft}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResLeft}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResLeft}{0.2ResUp}}
          pgfpathlineto{pgfpoint{0.775ResLeft}{0.2ResUp}}
          pgfpathellipse{pgfpointorigin}{pgfpoint{0.8ResRight}{0cm}}
          {pgfpoint{0cm}{0.8ResUp}}
          pgfpathmoveto{pgfpoint{0.775ResRight}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResRight}{0.2ResDown}}
          pgfpathlineto{pgfpoint{ResRight}{0.2ResUp}}
          pgfpathlineto{pgfpoint{0.775ResRight}{0.2ResUp}}
          pgfusepath{draw} %draw motor
          pgftext[rotate=-CircDirection]{textsf{M}}
          }

          % create motorto-path style

          defmotorpath#1{TikzBipolePath{motor}{#1}}
          tikzset{motor/.style = {circuitikzbasekey, /tikz/to path=motorpath, l=#1}}

          % end of setup

          begin{document}

          begin{center}
          begin{circuitikz}
          draw (0,0) to[motor, l=motor, o-*] (0,2);
          end{circuitikz}
          end{center}

          newpage
          begin{center}
          begin{circuitikz}
          draw (0,0) to[motor, l=motor, o-*] (2,0);
          end{circuitikz}
          end{center}

          end{document}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 9 '13 at 20:33

























          answered Sep 8 '13 at 21:38









          John KormyloJohn Kormylo

          47k22672




          47k22672























              2














              Another alternative is to modify an existing two-terminal element in the circuitikz such as sV and redefine a new command called mymotor that draws the desired shape and form. Here two shapes (mymotor, mymotorB) are defined as asked by the OP.



              newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
              {draw[thick,rotate=#2] (#1) circle (10pt)
              node[]{$mathsf M$}
              ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
              draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0)
              ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
              }


              enter image description here



              Code:



              documentclass[border=20pt]{standalone}  
              usepackage[american,siunitx]{circuitikz}
              usetikzlibrary{arrows,shapes,calc,positioning}

              newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
              {draw[thick,rotate=#2] (#1) circle (10pt)
              node[]{$mathsf M$}
              ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
              draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0) ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
              }

              newcommand{mymotorB}[2] % #1 = name
              {draw[thick] (#1) circle (12pt)
              node[above=-3pt]{$mathsf M$} ++(-8pt,-3pt)--++(15pt,0);
              draw[thick,dashed] (#1) ++(-8pt,-5pt)--++(15pt,0);
              }

              begin{document}

              begin{circuitikz}
              draw (0,2) to[L, l_=$L$, o-*] (2,2) to[sV, color=white, name=M1] (3.5,2) to[short,*-] (5,2);
              mymotor{M1}{0}
              draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
              draw (2,2) to[C=$C$] (2,0);
              draw (3.5,2) to[R=$R$] (3.5,0);
              draw (5,2) to[sV, color=white, name=M2] (5,0);
              mymotor{M2}{90}
              %
              draw (2,3) to[sV, color=white, name=M3] (3.5,3);
              mymotorB{M3}

              draw (6,2) to[sV, color=white, name=M4] (6,0);
              mymotorB{M4}

              end{circuitikz}

              end{document}





              share|improve this answer




























                2














                Another alternative is to modify an existing two-terminal element in the circuitikz such as sV and redefine a new command called mymotor that draws the desired shape and form. Here two shapes (mymotor, mymotorB) are defined as asked by the OP.



                newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                {draw[thick,rotate=#2] (#1) circle (10pt)
                node[]{$mathsf M$}
                ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0)
                ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                }


                enter image description here



                Code:



                documentclass[border=20pt]{standalone}  
                usepackage[american,siunitx]{circuitikz}
                usetikzlibrary{arrows,shapes,calc,positioning}

                newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                {draw[thick,rotate=#2] (#1) circle (10pt)
                node[]{$mathsf M$}
                ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0) ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                }

                newcommand{mymotorB}[2] % #1 = name
                {draw[thick] (#1) circle (12pt)
                node[above=-3pt]{$mathsf M$} ++(-8pt,-3pt)--++(15pt,0);
                draw[thick,dashed] (#1) ++(-8pt,-5pt)--++(15pt,0);
                }

                begin{document}

                begin{circuitikz}
                draw (0,2) to[L, l_=$L$, o-*] (2,2) to[sV, color=white, name=M1] (3.5,2) to[short,*-] (5,2);
                mymotor{M1}{0}
                draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
                draw (2,2) to[C=$C$] (2,0);
                draw (3.5,2) to[R=$R$] (3.5,0);
                draw (5,2) to[sV, color=white, name=M2] (5,0);
                mymotor{M2}{90}
                %
                draw (2,3) to[sV, color=white, name=M3] (3.5,3);
                mymotorB{M3}

                draw (6,2) to[sV, color=white, name=M4] (6,0);
                mymotorB{M4}

                end{circuitikz}

                end{document}





                share|improve this answer


























                  2












                  2








                  2







                  Another alternative is to modify an existing two-terminal element in the circuitikz such as sV and redefine a new command called mymotor that draws the desired shape and form. Here two shapes (mymotor, mymotorB) are defined as asked by the OP.



                  newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                  {draw[thick,rotate=#2] (#1) circle (10pt)
                  node[]{$mathsf M$}
                  ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                  draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0)
                  ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                  }


                  enter image description here



                  Code:



                  documentclass[border=20pt]{standalone}  
                  usepackage[american,siunitx]{circuitikz}
                  usetikzlibrary{arrows,shapes,calc,positioning}

                  newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                  {draw[thick,rotate=#2] (#1) circle (10pt)
                  node[]{$mathsf M$}
                  ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                  draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0) ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                  }

                  newcommand{mymotorB}[2] % #1 = name
                  {draw[thick] (#1) circle (12pt)
                  node[above=-3pt]{$mathsf M$} ++(-8pt,-3pt)--++(15pt,0);
                  draw[thick,dashed] (#1) ++(-8pt,-5pt)--++(15pt,0);
                  }

                  begin{document}

                  begin{circuitikz}
                  draw (0,2) to[L, l_=$L$, o-*] (2,2) to[sV, color=white, name=M1] (3.5,2) to[short,*-] (5,2);
                  mymotor{M1}{0}
                  draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
                  draw (2,2) to[C=$C$] (2,0);
                  draw (3.5,2) to[R=$R$] (3.5,0);
                  draw (5,2) to[sV, color=white, name=M2] (5,0);
                  mymotor{M2}{90}
                  %
                  draw (2,3) to[sV, color=white, name=M3] (3.5,3);
                  mymotorB{M3}

                  draw (6,2) to[sV, color=white, name=M4] (6,0);
                  mymotorB{M4}

                  end{circuitikz}

                  end{document}





                  share|improve this answer













                  Another alternative is to modify an existing two-terminal element in the circuitikz such as sV and redefine a new command called mymotor that draws the desired shape and form. Here two shapes (mymotor, mymotorB) are defined as asked by the OP.



                  newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                  {draw[thick,rotate=#2] (#1) circle (10pt)
                  node[]{$mathsf M$}
                  ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                  draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0)
                  ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                  }


                  enter image description here



                  Code:



                  documentclass[border=20pt]{standalone}  
                  usepackage[american,siunitx]{circuitikz}
                  usetikzlibrary{arrows,shapes,calc,positioning}

                  newcommand{mymotor}[2] % #1 = name , #2 = rotation angle
                  {draw[thick,rotate=#2] (#1) circle (10pt)
                  node[]{$mathsf M$}
                  ++(-12pt,3pt)--++(0,-6pt) --++(2.5pt,0) ++(-2.8pt,6pt)-- ++(2.5pt,0pt);
                  draw[thick,rotate=#2] (#1) ++(12pt,3pt)--++(0,-6pt) --++(-2.5pt,0) ++(2.8pt,6pt)-- ++(-2.5pt,0pt);
                  }

                  newcommand{mymotorB}[2] % #1 = name
                  {draw[thick] (#1) circle (12pt)
                  node[above=-3pt]{$mathsf M$} ++(-8pt,-3pt)--++(15pt,0);
                  draw[thick,dashed] (#1) ++(-8pt,-5pt)--++(15pt,0);
                  }

                  begin{document}

                  begin{circuitikz}
                  draw (0,2) to[L, l_=$L$, o-*] (2,2) to[sV, color=white, name=M1] (3.5,2) to[short,*-] (5,2);
                  mymotor{M1}{0}
                  draw (0,0) to[short, o-*] (2,0) to[short, -*] (3.5,0) to[short] (5,0);
                  draw (2,2) to[C=$C$] (2,0);
                  draw (3.5,2) to[R=$R$] (3.5,0);
                  draw (5,2) to[sV, color=white, name=M2] (5,0);
                  mymotor{M2}{90}
                  %
                  draw (2,3) to[sV, color=white, name=M3] (3.5,3);
                  mymotorB{M3}

                  draw (6,2) to[sV, color=white, name=M4] (6,0);
                  mymotorB{M4}

                  end{circuitikz}

                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 6 '15 at 8:06









                  JesseJesse

                  26.5k72679




                  26.5k72679






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f132076%2fhow-to-draw-a-dc-motor-in-circuitikz%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

                      Schneeberg (Smreczany) Bibliografia | Menu...

                      Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...