Graphics, Figures & TablesMake own components for circuitikz for lab-report

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ZeV
Posts: 7
Joined: Sat Feb 26, 2011 12:06 pm

Make own components for circuitikz for lab-report

Post by ZeV »

Greetings!
I'm writing a lab report for a series of experiments on GaAs wafers related to dopants and dopant quantities. For the lab report it is expected to include a few diagrams and figures. I've been wanting to put a hall-bar into a set of circuit diagrams for this purpose. I want said component to be repeatable, that is I want to be able to call it in tikz or circuitikz figures by use of - for example - the command \Hallbar. I discovered circuitikz yesterday (I'm not an electronics student, more along the lines of materials technology) and so am very new to it, but this is what I have concocted so far:

Code: Select all

\documentclass{minimal}
\usepackage[european]{circuitikz}
\begin{document}
\newcommand{\incHB}[0]{10}%Constant to define the size of the hall-bar 

\def\Hallbar{%
+(0mm,0mm)-- +(1.0mm*\incHB,0mm*\incHB) -- +(1.0mm*\incHB,1mm*\incHB) -- +(1.5mm*\incHB,1.0mm*\incHB) -- +(1.5mm*\incHB,0mm*\incHB) -- +(3mm*\incHB,0mm*\incHB) -- +(3.0mm*\incHB,1.0mm*\incHB) -- +(3.5mm*\incHB,1mm*\incHB) -- +(3.5mm*\incHB,0mm*\incHB) -- +(4.5mm*\incHB,0mm*\incHB) -- +(4.5mm*\incHB,-0.8mm*\incHB)
+(0.0mm*\incHB,0mm*\incHB) -- +(0.0mm*\incHB,-0.8mm*\incHB) -- +(1.0mm*\incHB,-0.8mm*\incHB) -- +(1.0mm*\incHB,-1.8mm*\incHB) -- +(1.5mm*\incHB,-1.8mm*\incHB) -- +(1.5mm*\incHB,-0.8mm*\incHB) -- +(3mm*\incHB,-0.8mm*\incHB) -- +(3.0mm*\incHB,-1.8mm*\incHB) -- +(3.5mm*\incHB,-1.8mm*\incHB) -- +(3.5mm*\incHB,-0.8mm*\incHB) -- +(4.5mm*\incHB,-0.8mm*\incHB)
}
\begin{circuitikz}
\draw (0,0) \Hallbar;
\end{circuitikz}

\end{document}
I might make more decorations to the component eventually, for now I wanted a working principle.

Yet I wonder, how do I define contact points on the hall-bar so that I can use them in relations to other components/circuitry with a minimal amount of fuzz? It has, as you may surmise, 6 contact points for measurement and application of E-field. As it is I'd have to define coordinates manually for all the contact points. Which is going to be a pain if and when the circuitry needs changing once first drawn.

Thank you for any help you can give!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply