Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I cut this out so that there is no confusion.

I have this picture:

enter image description here

And I've managed to draw this:

enter image description here

The code is as follows:

\begin{figure}
\begin{circuitikz}[european]
\draw[o-] (0,2.2) to (0,4);
\draw (0,4) -- (1,4);
\draw (1,4) to[R,l_=\SI{1}{\kilo\ohm},-*]  (1,2) to[R,l_=\SI{500}{\ohm},-*] (1,0)
        -- (0,0);
\draw[-o] (0,0) -- (0,1.5);
\draw (1,2) -- (3,2);
\draw (3,2) -- (4,2) node[component]{A} -- (5,2);
\draw (3,0) -- (3,1) node[component]{V} -- (3,2);
\draw
 (6,2.27) node[njfet]{}
    node[anchor=east] {G}
    node[anchor=north] {D}
    node[anchor=south] {S};
\draw (6,0) -- (6,2);
\draw (6,3) -- (6,4);
\draw (1,0) -- (8,0);
\draw (2,0) to[C,l^=\SI{4.7}{\nano\farad},*-*] (2,2);
\draw (7,0) -- (7,2) node[component]{V} -- (7,4);
\draw (6,4) -- (6.5,4) node[component]{A} -- (8,4);
\draw[o-] (8,2.2) to (8,4);
\draw[-o] (8,0) to (8,1.5);
\end{circuitikz}
\end{figure}

I guess you can see where is the problem:

  1. how to add + and - on the nodes?
  2. how to make writings not overlap each other?
  3. when I tried to make the code for the jfet like the one from the manual I got errors about (njfet. G) stuff...

So any advice on how to solve this?

EDIT: Oh and can I somehow modify the elements? Because, for instance, npn BJT has arrow pointing out of emmiter and I need it to point it in...

share|improve this question
3  
Please rename the title to state the exact problem. Don't call it "Another circuit question", which is not meaningful to others. People which have the same problem should be able to find this question and a meaningful title helps a lot here. Also consider to link to you original question. –  Martin Scharrer Apr 14 '11 at 11:41
    
I would draw this e.g. in Eagle. Do you need to get the work done or are you just interested in CircuiTikZ? Apart from less complex circuits, I do not think that TikZ is the appropriate tool for this kind of objectives. –  Harold Cavendish Apr 14 '11 at 21:17
    
Oh I just didn't want to copy from the pdf file (this is a lab exercise), and I wanted it to look nicer :) I looked at pst-circ (it has nicer elements) but my MikTex refused to dl it : Oh and also it's going to be easier to implement this in my report since I'm doing everything in LaTeX :) –  dingo_d Apr 15 '11 at 16:33
add comment

2 Answers 2

up vote 1 down vote accepted

To avoid the overlap, draw the component, then draw and rotate text next to the component.

To change arrow direction change the element: njfet (out) to pjfet (in) or npn (out) to pnp (in).

It may also help to 'stretch' or 'compress' parts of the circuit. Try this re-worked sample to see if it works for you.

\documentclass{article}
\usepackage[european]{circuitikz}
\usepackage{siunitx}

\begin{document}
%----Fet circuit
\begin{circuitikz}[european]
\draw (3,3.5) node[above] {FET circuit}; 
\draw
(0,2.2) node[left] {$+$} to[short,o-] (0,4);
\draw (0,4) -- (1,4);
%\draw (1,4) to[R,l^=\SI{1}{\kilo\ohm},-*]  (1,2) 
%   to[R,l^=\SI{500}{\ohm},-*] (1,0) -- (0,0);
\draw (1,4) to[R,-*]  (1,2) 
    to[R,-*] (1,0) -- (0,0);

% place labels for resistors
\draw (0.5,1.5) node[rotate=90,left]{500 $\Omega$};
\draw (0.5,3.2) node[rotate=90,left]{1 $\Omega$};

\draw (0,1.5) node[left] {$-$} to[short,o-] (0,0);
\draw (1,2) -- (3.6,2);
\draw (3.6,2) to[ammeter] (5,2);
\draw (3.5,0) to[voltmeter] (3.5,2);
\draw  
    (6,2.27) node[njfet] (fet) {} 
    (fet.G) node[anchor=south]  {G}
    (fet.D) node[anchor=north east] {D}
    (fet.S) node[anchor=south east] {S};
\draw (6,0) -- (fet.S);
\draw (fet.D) -- (6,4);
\draw (1,0) -- (9,0);
%\draw (2,0) to[C,l_=\SI{4.7}{\nano\farad},*-*] (2,2);
\draw (2,0.6) node[right]{4.7 nF};
\draw (2,0) to[C,*-*] (2,2);
\draw (8,0) to[voltmeter] (8,4);
\draw (6,4) to[ammeter] (8,4) -- (9,4);
\draw (9,2.2) to[short,o-]  (9,4);
\draw (9,0)   to[short,-o]  (9,1.5);
\end{circuitikz}
\end{document}
share|improve this answer
    
Nice this looks really good :) Thank you, I'm sure that in the future I'll make a good use of this ^^ –  dingo_d Aug 19 '11 at 18:24
add comment
  1. for + and - : add a node at the appropriate place. For example, at the beginning of your code:

    \draw (0,2.2) node[left] {$+$} to[short,o-] to (0,4);
    

    (note that I also changed the way the circle is created)

  2. I couldn't find anything specific about it in the documentation. What I suggest doing is moving some of the commponents a little (the capacitor and the voltmeter to the right for example) and using a smaller font. Another way is to add explicit nodes. You then have complete control for the placement.

  3. For the labels on the jfet : all of your nodes are placed with respect to the point (6,2.27). You want the labels to be placed with respect to the component. For this, give the component a name and place the label node with respect to the ins and outs (G, D and S) :

    \draw  (6,2.27) node[njfet] (myname){} 
       (myname.G) node[anchor=east] {G}
       (myname.D) node[anchor=north] {D}
       (myname.S) node[anchor=south] {S};
    
share|improve this answer
    
The node worked for the previous example you gave me, but my texmakerx hangs when I need to compile this schematic :\ –  dingo_d Apr 15 '11 at 13:10
    
I figured out the mistakes - i forgot ; at the end XD Everything works out now. Thanks again for the help. If only I could make new elements. I tried looking in .sty files but found nothing that enlightened me XD –  dingo_d Apr 15 '11 at 16:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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