
Graphics, Figures & Tables ⇒ Help with a circuitikz problem
Help with a circuitikz problem
Hi,I need help , but do not know how to solve that.This is my homework and need help.I need to finish it with circuitikz .Here is photo.
.Or this url it is same http://s10.postimg.org/owhodist5/zzzzzzzzz.png .Please help me.Thanks in advanced.

NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Help with a circuitikz problem
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Help with a circuitikz problem
Hi hamzan,
welcome to the forum!
Ramón Jaramillo already wrote such an example. It's with colors but you can easily remove the colors. As it's your homework, you should at least work something with it. You should be able to understand it. The teacher may ask you. If you have questions about a specific detail, just ask.
If you click on "Open in writeLaTeX" you can directly edit it online.
Stefan
welcome to the forum!
Ramón Jaramillo already wrote such an example. It's with colors but you can easily remove the colors. As it's your homework, you should at least work something with it. You should be able to understand it. The teacher may ask you. If you have questions about a specific detail, just ask.
If you click on "Open in writeLaTeX" you can directly edit it online.
Code: Select all
Code, edit and compile here:
% Block Diagram for TTL IC Multiplexer 74HC153% Author: Ramón Jaramillo.\documentclass[tikz,border=10pt,12pt,x11names]{standalone}\usepackage{tikz}\usetikzlibrary{circuits.logic.US} % TiKZ Library for US Logic Circuits.\begin{document}\begin{tikzpicture}[circuit logic US, every circuit symbol/.style={thick}]% Logic Gates in Left Side of Multiplexor\node[buffer gate, point down,inputs={i}] (buf1) at (-1,3) {}; % Input Ea\node[and gate,inputs={nnnn}, point down] (and1) at (0,-1) {};\node[and gate,inputs={nnnn}, point down] (and2) at (1.5,-1) {};\node[and gate,inputs={nnnn}, point down] (and3) at (3,-1) {};\node[and gate,inputs={nnnn}, point down] (and4) at (4.5,-1) {};\node[or gate,inputs={nnnn}, point down] (or1) at (2.25,-3) {};\node[not gate, point down] (not1) at (5.5,4) {}; % Input Sa\node[buffer gate, point down,inputs={i}] (buf2) at (5.5,2.5) {};% Left Side connections\draw [red, very thick] (buf1.output) -- ++(down:26.4mm) -| (and1.input 4);\draw (and1.output) -- ++(down:5mm) -| (or1.input 4);\draw (and2.output) -- ++(down:3mm) -| (or1.input 3);\draw (and3.output) -- ++(down:3mm) -| (or1.input 2);\draw (and4.output) -- ++(down:5mm) -| (or1.input 1);\draw (not1.output) -- (buf2.input);% Logic Gates in Right Side of Multiplexor\node[not gate, point down] (not2) at (7,4) {}; % Input Sb\node[buffer gate, point down,inputs={i}] (buf3) at (7,2.5) {};\node[buffer gate, point down,inputs={i}] (buf4) at (13.50,3) {}; % Input Eb\node[and gate,inputs={nnnn}, point down] (and5) at (8,-1) {};\node[and gate,inputs={nnnn}, point down] (and6) at (9.5,-1) {};\node[and gate,inputs={nnnn}, point down] (and7) at (11,-1) {};\node[and gate,inputs={nnnn}, point down] (and8) at (12.5,-1) {};\node[or gate,inputs={nnnn}, point down] (or2) at (10.25,-3) {};\draw (not2.output) -- (buf3.input);% Right Side connections\draw [red, very thick] (buf4.output) -- ++(down:26.4mm) -| (and8.input 1);\draw (and5.output) -- ++(down:5mm) -| (or2.input 4);\draw (and6.output) -- ++(down:3mm) -| (or2.input 3);\draw (and7.output) -- ++(down:3mm) -| (or2.input 2);\draw (and8.output) -- ++(down:5mm) -| (or2.input 1);% Inputs and Outputs of Multiplexer\draw [black,very thick] (buf1.input) -- ++(up:5mm) node [above]{$E_a$};
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Help with a circuitikz problem
Here's another electric circuit TikZ example I made, showing what I like: at first, placing all nodes worth names in a matrix like way, then connecting the nodes by elements.
If you need to know how to make a specific detail, let us know.
Stefan
Code: Select all
Code, edit and compile here:
% https://www.packtpub.com/hardware-and-creative/latex-cookbook\documentclass[border = 10pt]{standalone}\usepackage{tikz}\usetikzlibrary{circuits.ee.IEC}\begin{document}\begin{tikzpicture}[circuit ee IEC,x = 3cm, y = 2cm,every info/.style = {font = \scriptsize},set diode graphic = var diode IEC graphic,set make contact graphic = var make contact IEC graphic,]\foreach \i in {1,...,3} {\node [contact] (lower contact \i) at (\i,0) {};\node [contact] (upper contact \i) at (\i,1) {};}\draw (upper contact 1) to [diode] (lower contact 1);\draw (lower contact 2) to [capacitor] (upper contact 2);\draw (upper contact 1) to [resistor = {ohm = 6}](upper contact 2);\draw (lower contact 2) to [resistor = {adjustable}](lower contact 3);\draw (lower contact 1) to [voltage source = {near start,direction info = {volt = 12}},inductor = {near end}](lower contact 2);\draw (upper contact 2) to [make contact = {near start},battery = {near end,info = {loaded}}](upper contact 3);\draw (lower contact 3) to [bulb = {minimum height = 0.6cm}](upper contact 3);\end{tikzpicture}\end{document}
Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Help with a circuitikz problem
I saw you follow-up question to the crosspost. As I started here, I simply continue here.
What I would improve at first:
Let me know if you have a question about specific things here.
Stefan
What I would improve at first:
- Avoid having coordinate numbers everywhere. Working on it, it's hard to remember what (3.5,4) actually means. It's better to use a name such as (E2) for it, so you always know the meaning. You can even label the coordinates, so no need for extra nodes.
- Use length or macros, build coordinates on parameters, which makes changes easier, such as shifting a whole row of coordinates upwards.
- Use styles for all what has formatting or color, so later re-styling is much easier.
- Let TikZ calculate points such as midpoints, so it will adjust automatically when you change coordinates.
- Use spacing to have a better readable code.
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage[european]{circuitikz}\usetikzlibrary{arrows.meta,quotes,positioning}\def\distance{0.5}\def\leftColor{red}\def\rightColor{blue}\def\Top{4}\def\Bottom{1}\tikzset{sign1/.style={anchor=center, text=\leftColor},sign2/.style={anchor=center, text=\rightColor},}\begin{document}\begin{figure}[ht!]\begin{circuitikz}\coordinate (LeftTop) at ( -8,\Top);\coordinate (RightTop) at ( 7,\Top);\coordinate ["$B_1$"] (B1) at ( -6,\Top);\coordinate ["$B_2$"] (B2) at ( 0,\Top);\coordinate ["$E_1$"] (E1) at ( -3,\Top);\coordinate ["$E_2$"] (E2) at (3.5,\Top);\coordinate ["$C_1$"] (C1) at ( -1,\Top);\coordinate (ZT) at (5.5,\Top);\coordinate (LeftBottom) at ( -8,\Bottom);\coordinate (RightBottom) at ( 7,\Bottom);\coordinate (B2B) at ( 0,\Bottom);\coordinate (E1B) at ( -3,\Bottom);\coordinate ["below:$C_2$"] (C2) at (3.5,\Bottom);\coordinate (ZB) at (5.5,\Bottom);%\draw (LeftTop) to [open, v=$u_{ul}$,o-o] (LeftBottom);\draw (LeftTop) -- (B1);\draw (B1) to[R,l_=$h_{ie1}$,i>=$i_{b1}$,*-] (E1);\draw (B1) to [R,l=$R_{B1}$,i>=$i_{B1}$,-*] (-6,1);\draw (-0.5,4) to[european inductor,l_=$L_i$,i>=$i_{12}$,*-*] (-0.5,1);\draw (E1) to[C,l_=$C_{E1}$,i>=$i_{e1}$,*-] (-3,1);\draw (3.5,1) to[american current source,color=magenta,l=$h_{fe}i_{b2}$] (3.5,4);\draw (C1) to[american current source,color=magenta,l=$h_{fe}i_{b1}$] (-3,4);\draw (-0.5,4) to[R,l_=$h_{ie2}$,i>=$i_{b2}$,*-*] (3,4);\draw (5.5,4) to[R,l_=$Z_{E2}$] (5.5,1);\draw (RightTop) to[R,l_=$R_p$] (RightBottom);\draw (LeftBottom) -- (RightBottom);
Stefan
LaTeX.org admin
Help with a circuitikz problem
Dear Admin and folks,
I would like to know if we can inverter(three phase) switching configuration with operating switches and current flow? mean at any given instant only 2 switches operate with one connected to positive supply and other to ground. Like if UVW are phases with 6 switches , U+W- conduct. I just started to use Latex today so i am not aware of complete commands to draw a electrical circuit.Please guide me through this.
I would like to know if we can inverter(three phase) switching configuration with operating switches and current flow? mean at any given instant only 2 switches operate with one connected to positive supply and other to ground. Like if UVW are phases with 6 switches , U+W- conduct. I just started to use Latex today so i am not aware of complete commands to draw a electrical circuit.Please guide me through this.