## Back from Hiatus

I have returned from the dead and am back from hiatus. This brief intermission was due to moving and real-life delays. Please enjoy this entertaining image of my cat carrying his favorite toy as a gesture, re-welcoming you to this blog now that I am back from hiatus.

## LaTeX: Drawing MOSFET in TikZ – Labels and Animation

Continuing from last week’s post, this week we will be adding labels to our MOSFET in TikZ and adding slide animations with Beamer.

As a reminder, last week we drew our image of a MOSFET in Tikz before adding colors. The colors we added were based on the materials used in each part of the n-type MOSFET. Now let’s add some labels to make sure that anyone we present this image to can understand what is going in.

## Centered Labels

Now we take the code from last week and add “nodes” to certain of our shapes. We tell these nodes to have certain text and compile.

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{patterns}

\title{\LaTeX~Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}

\begin{document}

\frame{\titlepage}

\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25) node {p-type};
\draw \metalthree (0,0) rectangle (11,.25) node {Si Substrate};
\draw \oxide (4,3) rectangle (7,4) node {oxide};
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) node {n-type};
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) node {n-type};
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\end{tikzpicture}
}

\end{document}


This gives us the following image with ill-placed text:

The text looks odd because the node location in TikZ defaults to the last point in the drawing. We can tell it to place the node in a certain location with respect to this anchor point. Additionally, I might want to change some other properties such as text color for my labels. This can all be done in brackets after declaring the node. Now my code becomes:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{patterns}

\title{\LaTeX~Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}

\begin{document}

\frame{\titlepage}

\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25) node [midway,above] {p doped Si};
\draw \metalthree (0,0) rectangle (11,.25) node [midway, color=white]
{Si Substrate};
\draw \oxide (4,3) rectangle (7,4) node [pos=.5,font=\bf\Large] {oxide};
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) node at (2.625,2.5) [align=center] {n-type};
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) node at (8.375,2.5) [align=center] {n-type};
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\end{tikzpicture}
}

\end{document}


In this case, I have added some alignment options for different locations.

• For the silicon substrate, I have told the node [midway, color=white] so the text appears in the middle of the rectangle and white to show up against the color of metalthree
• For the p doped region, I have told the node [midway,above] so that the text is in the middle of the picture and at the bottom. Notice how midway does not place the text at the true center of custom shapes. It only knows to place it relative to the previous line.
• For the n doped regions, I did not want the text to sit relative to the line, I wanted it to be in the center of the shape. Thus, I told the node to be at a certain set of coordinates which I calculated to be the center of that shape, and set [align=center].
• For the oxide layer, I wanted the text to show up against the oddly colored bricks. Therefore, I used [pos=.5,font=\bf\Large]. The “pos=.5” argument is functionally the same as “midway”, but offers greater freedom to customize. The font arguments tell the node to use text in boldface with a Large size.

The image ends up looking like this:

## Labels on Arrows

I’ve decided that I want to label the metal connections on our MOSFET, but I don’t want to place the text directly over the shape. Instead, I want to tell TikZ to draw little arrows pointing to what is labeled. This is easy. We just draw a line, which we tell to have an arrowhead, from a point to another point. At the first point, we tell it to have a label. I have used:

\draw [->] (1,5) node [above] {Source} -- (2.125,3.5);
\draw [->] (10,5) node [above] {Drain} -- (8.975,3.5);
\draw [->] (5.5,5) node [above] {Gate} -- (5.5,4.5);


Which when implemented, looks like this:

## Animation with Beamer

Did you know that the same person that wrote TikZ wrote Beamer, the LaTeX slideshow creator? It’s true. This makes things quite convenient, as the author has designed it such that it is easy to integrate slide animations into your TikZ code.

For the final part of our MOSFET in TikZ, I’m going to add some animation. I want to make it obvious to the viewer how my MOSFET works going from the off state to saturation mode. I will do this by adding nodes to present the voltage relationship of each state on the screen, then pop up an image of the electron rich areas of the MOSFET. This is very easy to do with \only. Check out the final code below:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{patterns}

\title{\LaTeX~Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}

\begin{document}

\frame{\titlepage}

\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25) node [midway,above] {p doped Si};
\draw \metalthree (0,0) rectangle (11,.25) node [midway, color=white]
{Si Substrate};
\draw \oxide (4,3) rectangle (7,4) node [pos=.5,font=\bf\Large] {oxide};
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) node at (2.625,2.5) [align=center] {n-type};
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) node at (8.375,2.5) [align=center] {n-type};
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\draw [->] (1,5) node [above] {Source} -- (2.125,3.5);
\draw [->] (10,5) node [above] {Drain} -- (8.975,3.5);
\draw [->] (5.5,5) node [above] {Gate} -- (5.5,4.5);
\only<1> {\node at (5.5,-.5) [align=center] {$V_{GS} < V_{threshold}$};}
\only<2-3> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} < V_{GS} - V_{threshold}$};
}
\only<3> {\draw [fill=white] (4.25,3) rectangle (6.75,2.5);
\draw \ndiff (4.25,3) rectangle (6.75,2.5);
}
\only<4-5> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} = V_{GS} - V_{threshold}$};
}
\only<5> {\draw [fill=orange,orange] (4.25,3) rectangle (6.75,2.5);
\draw [fill=white] (4.25,3) -- (4.25,2.65) -- (6.75,3) -- (4.75,3);
\draw \ndiff (4.25,3) -- (4.25,2.65) -- (6.75,3) -- (4.75,3);
}
\only<6-7> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} > V_{GS} - V_{threshold}$};
}
\only<7> {\draw [fill=orange,orange] (4.25,3) rectangle (6.75,2.5);
\draw [fill=white] (4.25,3) -- (4.25,2.85) -- (6.75,3) -- (4.75,3);
\draw \ndiff (4.25,3) -- (4.25,2.85) -- (6.75,3) -- (4.75,3);
}
\end{tikzpicture}
}

\end{document}


Each time I add an \only, I put slide numbers in pointed braces. The code between the curly braces will “only” show up on the slides listed in the pointed braces. The result of this code is shown in the following gif:

## Wrap Up

I know that creating a MOSFET in TikZ is a bit specific. Still, I hope that this little tutorial gives everyone a feel for how to take make nice scale-able images in LaTeX using TikZ.

## LaTeX: Drawing MOSFET in TikZ

I’m a big fan of using LaTeX for my scientific writing.  (What is LaTeX? It is a typesetting programming language that gives you much more flexibility than other writing environments.  wikipedia)  Since I have some time on my hands, I wanted to prepare for future presentations by writing up some notes and slides using in LaTeX for future use.  This includes drawing diagrams using TikZ.  This post describes how to draw a simple, generalized MOSFET in TikZ while standardizing some of the layer notation.

## Setting up the Beamer environment

Before we get started with our drawing, let’s first set up a simple LaTeX environment.  Let’s say we want to make some slides for a lecture.  We can use the Beamer class in LaTeX to make these slides.  We tell LaTeX what we what to do.

\documentclass{beamer}

\begin{document}

\end{document}


Now, we add some title information into the preamble of the code, and we tell the document to produce a title slide.

\documentclass{beamer}

\title{Dr. Honeycutt's \LaTeX Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\begin{document}

\frame{\titlepage}

\end{document}


The “\frame” command tells the LaTeX compiler to produce a single slide with the content in the curly braces. For our title slide, we want the content to be the information title information we included in the preamble. After compiling, it should look like this:

If you want to make your slides look fancy, there are plenty of things you can do. For this demonstration, we are only need a simple framework for the TikZ drawing, so we will just leave it at the default.

## Drawing the MOSFET in TikZ

Now we are going to make a new slide with our drawing. We tell LaTeX that we will be using TikZ in the preamble. Then, we start a new slide (“\frame”) and begin our drawing. If you don’t know what a MOSFET is, or you just need a bit of a refresher, check out this for reference. Here is what my code looks like:

\documentclass{beamer}

\usepackage{tikz}

\title{\LaTeX~Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\begin{document}

\frame{\titlepage}

\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{tikzpicture}
\draw (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25);
\draw (0,0) rectangle (11,.25);
\draw (4,3) rectangle (7,4);
\draw (4,4) rectangle (7,4.5);
\draw (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3);
\draw (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3);
\draw (1.25,3) rectangle (3,3.5);
\draw (8,3) rectangle (9.75,3.5);
\end{tikzpicture}
}

\end{document}


In the preamble, I have told LaTeX I will be using the TikZ package. After the title slide, I added a new “\frame” and gave it a “\frametitle”. Note how the curly brace of the “\frame” does not close until line 25. In this “\frame” I have started a tikzpicture environment. This tells LaTeX that it should start using the TikZ code in this section. I have two types of drawings here. The first are simple rectangles. These rectangles are bounded by the opposing corners in (x,y) coordinates. The default units here are cm. The second type of drawing is a complex line shape. The code tells TikZ that I want a line “–” drawn from one (x,y) coordinate to a second coordinate. Multiples of these lines can be drawn in a single line. I have drawn curved lines with a different notation. I tell TikZ to draw from the first (x,y) coordinate “to [out=a,in=b]” where “a” and “b” are angles. This creates a curved line which connects to the previous and next segment at the defined angles. There are many ways to draw curves in TikZ, but for simple figures such as depicted here, this approach is sufficient. Finally, note how each line of the “tikzpicture” code is ended by a semicolon. This line ending is not something that you normally see in LaTeX, so be sure you don’t forget it.

When I compile my code, the slide with the drawing of the MOSFET in TikZ looks like this:

Now let’s add some color to our image. Using TikZ, adding a color is as easy as mentioning a fill color. But this is a special case. When drawing electronic components at the surface level, there are standard colors used for certain things. The standardized colors make it easy for Engineers to understand how a circuit works at a glance. These colors, from the classic VLSI design program “Magic”, are show in the picture (from Prof. Stine’s guide to Magic) below:

I want to use these colors for all of the drawings in my slides and notes. Therefore, I am going to make a new command for the colors in LaTeX. Additionally, since I expect my drawings to overlap at times, I want to give the colors patterns as well. I add the following code to my preamble:

\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}


In this section, I am defining a new custom command for LaTeX with the command name in the first set of curly braces, and the action to be performed in the second set of curly braces. The actions include a pattern and a pattern color in a format acceptable to TikZ notation. All I have to do is include the command in my drawing for the color and pattern to apply. If I decide to change a color later on (maybe metalthree needs to be pink instead of teal), all I have to do is change the command in one location and every instance of the command in the code is changed.

Additionally, since we decided to use patterns with the color fill commands, we need to add a line in the preamble declaring that we are going to use patterns. This is the case for all optional TikZ libraries we use in the future.

When we take a look at the complete code for the MOSFET in TikZ slide, it should look like this:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{patterns}

\title{\LaTeX~Surface Science and Electronics}
\author{Wesley T. Honeycutt}
\date{\today}

\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}

\begin{document}

\frame{\titlepage}

\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25);
\draw \metalthree (0,0) rectangle (11,.25);
\draw \oxide (4,3) rectangle (7,4);
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3);
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3);
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\end{tikzpicture}
}

\end{document}


Compiling this code will give us this as our second slide:

## Witch3

Continued from the last two weeks, here is the final installment of The Witch Mask.

## Internals

With the witch mask exterior painted and sealed, the internals were applied.  The interior was painted black with acrylic paint and sealed with Mod Podge.  I wanted to avoid using a strap around the back, as I have found that is unreliable for keeping things on without slipping.  Instead, I opted to use a hat.  Cutting the bill off of a baseball cap, the fabric was glued in place with hot glue.  Sheer black fabric was placed over the mouth and eye holes, as pictured below.  When pulled taut, this allows the wearer to see through the fabric while not allowing others to see the eyes.  The fabric was glued in place with PVA.  To keep the fabric taut, masking tape was used while the glue was drying, and it was removed upon completion.

A hood was sewn to fit around the mask.  Made from black cotton quilting fabric, the forward opening of the hood fit directly to the mask edge.  This was secured with hot glue.  Remaining black cotton fabric was sewn into an impromptu robe.

## Hair

A nest of hair was made for the witch mask.  The material I chose to use was raffia.  This fiber is produced from the frond of the raffia palm.  While you might have seen this material used in twine or hats, it is also used in traditional African tribal masks.  The raffia fibers were combed parallel to each other and folded in half.  Along the fold, a double stitched seam was sewn to hold the fibers together.  The stitch distance was short enough to penetrate most of the individual fibers so they would be retained during use.  The hairpiece was secured with staples to the paper mache portion of the mask and sewn onto the black hood with some quick stitches.

## The Completed Witch Mask with Costume

Pictures of the completed mask can be seen below.  The lighting isn’t great, and the photos don’t capture dark, unnerving quality this has.  I blame my old phone for the poor picture quality.

## Tales of Terror

As you can tell from the previous photo, I made the mask into a complete Halloween costume.  Since I’m an adult, I naturally decided that I would wear the costume around town.  On my walk to work, I received plenty of stares.  The best part was when I took the elevator to my office.  I got on the elevator, let the doors close, and squatted in the corner near the buttons.  I did not speak.  The next few times someone would come on the elevator, I would slowly arise from my squatting position to my full standing height.  Eventually, someone went to my floor, and I got off to get some work done, but not before I scared one of my colleagues so badly, he refused to take the elevator.

On my way home from work, took the same path back.  Possibly my favorite reaction occurred when I passed by the library and two guys started shouting at me about how scary/awesome I was.  I ignored them for a beat, stopped, and turned my mask toward them while keeping my body rigid.  They screamed like little girls and ran off, the perfect reaction.

I noticed two people running towards me at one point.  One held a camera, the other a microphone.  They were interviewing people on campus for a Halloween special.  I was very excited to be interviewed.  Yet, my commitment to staying in character is very strong.  I remained silent.  All the microphone would pick up from the witch mask’d man was a deep rasping of breath.  The only motion I made to the camera was a slight tilt of my head, staring directly forward.  The interviewers loved this, but I could tell they wanted more.  After about 5 minutes of footage, I just walked away.

Since Halloween fell on a Friday that year, there were loads of parties around town.  I decided that the witch mask needed to go make some friends.  I stopped at my usual bar at one point, and I just stared at the bouncer.  Later, talking to him, I found out that this actually freaked him out pretty bad.  At the time, he remained stalwart, laughing off the fear and asking for my ID.  Since I forgot my wallet at home, I decided I didn’t need a drink that night.  No, the fear sweat would sustain me.

My last stop was a fraternity/sorority party at a house near my apartment.  I stood outside on their lawn while I could see them staring at me through the blinds.  As the watching individual turned to tell her other scantily clad friends about the creepy thing in the yard, I would dash forward and freeze, mimicking schoolyard red-light-green-light games.  Eventually, I made it up to their door, and they were truly terrified.  I stood there, and I was about to leave when some guys came out and confronted me.  One pulled my mask off, which I found rude, but I suppose I can’t complain since I was being creepy.  Leaving with a “I’ve been kicked out of better parties than this”, I decided to end my night.

To this day, the Witch Mask hangs on my wall.  A solemn visage to give visitors pause when they enter my home – a real conversation starter.

## Witch2

Continuing from last week’s post, here is part 2 of The Witch Mask.

## Designing the Face

After several more layers of my special paper mache/plaster mix, the mask has been built up to a the final texture.  For this mask, I believe I have 5 more layers since the first two I showed last week.  The top layer is sanded slightly to remove most of the major surface defects.  I wanted to keep the surface slightly unfinished for this project, as I was hoping to evoke a sense that this witch mask was produced in a rough, imperfect manner.

The face design is similar to the inspiration.  The eyes and mouth are cut with a Dremel tool.  The cuts are very shallow on the mask.  Cutting into this material is not as simple as it seems.  Deep cuts can cause the cut wheel to snag due to the flexibility of the material.  Yet the high strength requires mechanical cutting to pierce the repeated PVA and gypsum layers.  The cuts end up turning brown due to burning from the friction.

After using a dremel for the shallow cuts, the final cuts are made with a thin chisel.  A razor blade is used to cut out any remaining ridges inside.  Finally, the interior of the open areas are sanded down with the Dremel, giving an even texture for working.

## Paint

The first layer for this project was a tan acrylic paint.  Darker browns and black are used to texture the first layer of paint.  Certain areas receive more attention than others for the shadowing colors.  Contours of the mask are shaded and highlighted to give depth to the relatively round surface.  Although the witch mask is not meant to look like a real human skull would, shading is applied to certain areas such as the cheekbone.  The lips are painted red, and the teeth are white.  This was done in a sloppy manner to fit with the theme of the piece.  Edges of the eyes and mouth are painted black where the cuts took place.  I wanted the final product to be a very obvious facade.

After the mask was painted, the paint surface was roughened with mid-grain sandpaper.  This roughening helps remove the obvious brush strokes from the mask and age it.

## Fire

Additional shading was added using carbon soot.  A candle was lit, and the mask was held close above the flame.  The point was not to burn the mask, but make it look burnt.  Soot from the candle would collect on the mask when done properly.  By angling the mask over the flame, the soot collected on the surface in different sorts of strokes.  A little practice is recommended first before trying this at home so you don’t burn your artwork and so you can get a feel for how to “brush” the soot.

For this mask, I sooted the eyes near the bridge of the nose, the underside of the eyes increasing near the edge, the actual edge of the mask, under the nose, and between the teeth.  The carbon was blended in certain places with my finger.

To seal in the paint and soot, several layers of Mod Podge were applied.  Since soot may run in water based environments, I elected not to brush on the Mod Podge.  Instead, I dabbed it on for the first layer.  This produced an uneven surface at first, but this effect was minimized by adding more layers.

To be continued…

## Witch1

In early 2014, I was inspired to make some mask art.  The final piece has no proper name, but I refer to it when speaking to others as “The Witch Mask”.  Work on the mask was undertaken over several months, finally completed in October 2014.  This post and the related follow up posts will detail the creation of this mask from concept to reality.

## Inspiration 1 – Israeli Stone Mask

The original inspiration for the creation of the witch mask came from two sources.  First, was an article on the world’s oldest masks going on display in Jerusalem.  An article in National Geographic goes over the exhibit.  One of the masks in particular caught my eye as something creepy and unnatural.   Among the finds recovered from Nahal Hamar is this Neolithic stone mask:

It is reported to be ~9,000 years old.

This unnamed piece was discovered in the vicinity of Horvat Duma by a farmer.  The journey from field to find is slightly unpleasant as well.  According to the story, the mask was purchased from the farmer who discovered it by Israeli general Moshe Dayan.  However, Gen. Dayan was not the nicest guy.  While he fancied himself an archaeologist, he acquired much of his collection through shady means.  An article by Raz Kletter (see § 4.3) pulls quotes from the various memoirs of Gen. Dayan relating how he did not actually purchase the mask, he just paid the driver to take him there.

The emptiness of the mask’s expression and the sordid tale to accompany it makes for some interesting inspiration.  But it took a second source to produce my idea.

## Inspiration 2 – Witch

The image below is a digital painting I found while browsing around Reddit.  The work as I saw it had no source to accompany it at the time, but it struck a chord with me.  The empty expression, the facial features, and the darkness produced a connection to the Israeli mask.  Even if they weren’t related by, there was a certain kinship to them.  At that point I was inspired to create.

With post facto research, I have discovered that the illustration is entitled “Witch”, appropriately enough.  It was published to DeviantArt around 2008 or 2009 by Maaria Laurinen.  You can view more of her work here and here.

## The First Layers

The witch mask was started with an oval ring cut from matboard.  The oval hole in the center had an opening with an approximate size to fit my face.  Using matboard gave me a flat surface to start building up the contour.

The face was produced in a layered process using a paper mache variant I enjoy using.  I create this using shreds of old printouts from the lab.  The first step is to grind the paper with water in a blender to produce a slurry.  Then I press out the water using cheesecloth.  The still wet paper mash is mixed with white glue (polyvinyl acetate) and plaster of paris (anhydrous calcium sulfate).  The glue gives helps bind the paper shreds together, and the plaster provides weight and strength.  The final texture of the material is like an old fashioned plaster cast.  It makes for a nice stone-like feel.

For the start of the witch mask, I did domed shape with a nose on the first layer.  Each layer, after drying for several days, is coated with matte surface Mod Podge or sealant to keep the things together.  In this case, drying the first layer was accelerated by placing it in an oven.  Use of the oven degrades the PVA white glue, causing the slight browning of the first layer shown above.  The matte surface is important, as it lends greater surface area for future layers or paints to bond to.  Pictures above depict the front and side view of the mask after the inital domed/nose layer, Mod Podge, and the start of the second layer.

After everything was dried and coated, I tested the fit of the mask for the first time.

To be continued…

## The Purchase and Return of a Makerbot Replicator+

Minor note: I got my PhD the other day.  No big deal.  The important part of the story is that I got a sweet graduation present from my mom.  She bought me the 3D printer of my choice.  Talk about awesome!  I decided to go with a machine I have had some experience working on/with in the past, a Makerbot.  There were a lot of options out there, and some of those alternatives had pretty great reviews.  I decided to go with the latest Makerbot model.  It wasn’t until I had gotten up and running that I became aware of some of the major Makerbot Replicator+ issues.

## The Good

Before I really hand a chance to grasp the Makerbot Replicator+ issues, I had a lot of fun with the unit.  The setup was a breeze and I was printing as soon as the extruder warmed up.  In addition to some of my own designs, which I will give individual attention later, I printed off designs that are easy to find on the Thingiverse site.  My favorite print was a fully articulated pangolin.

This cuddly little creature was produced as part of a project to raise awareness about pangolin exploitation, the most trafficked animal in the world.  There are some poorly educated people out there that believe that the pangolin scales have magical healing powers.  Additionally, they are a very popular bush meat item.  Despite being illegal to buy and sell in many parts of the world, the ever wonderful homo sapiens manages to make a buck from these little mammals.  The Save Pangolins campaign aims to eliminate this illegal trade.

The print itself turned out quite well.  This was the first big print on the Replicator+.  The details came out fine and it feels quite nice.  I did have some issues getting everything perfect.  The final tail joint and the forelegs did not articulate.  This print was made before I had started fine tuning settings like extruder pull, so some stringing between these tight joints may be the cause.

I discovered that when printing flat surfaces, I would see some bizarre defects.  The layer deposited on the surface would form melted waves.

I printed off some test swatches and observed them.  The extruder head was dragging along the edge of the recently printed strand of the current layer.  This was causing the last few printed lines to begin to curl with the direct heat transfer from the extruder.  The weirdest part was that it only happened in one direction.  As layers were stacked, the Makerbot Replicator+ issue would only propagate along the X coordinate.  If a layer was printed in another direction, no issues:

Here is a side by side comparison of what the issue was:

Something was clearly not right with the setup of the printer.  In the true spirit of Maker culture, I decided to find a solution to the problem.  I told the printer to recalibrate the z axis.  If the printer head was dragging along the side of a print, it would make sense that the printer bed height or z axis motion was out of whack, right?  That is when the real problems started.

## The Ugly

On the first print after issuing the factory supplied z axis calibration command, all hell broke loose.  During the setup for the print, the extruder dragged along the edge of the print surface.  I rushed downstairs to stop it as soon as it had started.  The scraping made some gruesome noise.  Meanwhile, the extruder continued gouging into the print bed.  The hot extruder nozzle actually melted the plastic as it scraped itself across the surface.  I did not make it downstairs in time though.  When I got downstairs, the printer had ripped the extruder out of its mount and began making panic noises.  The scene wasn’t pretty.

I sent a complaint to the manufacturer about my Makerbot Replicator+ issues.  One of my favorite snippets from that little conversation was that the end users are not supposed to level the build plate despite the fact that the option was included in the software.  The factory levels those “with lasers”.  To their credit, the customer service rep did offer to replace the unit.  This was not enough for me.  I was already soured on the unit when I couldn’t get it to interface with any of my computers, since they apparently dropped Linux support.

Now I’m awaiting the RMA results.  Besides wasting my time and getting screwed out of 10% of the unit cost for a restocking fee, I’m just plain disappointed in how far the genericized flagship of 3D printing has fallen.  I can only hope that I’ll be happier with the Ultimaker I buy when the refund goes through.

## Fountain Pen Ink pH – A Comparison of Five Commercial Inks

A while back, there was some discussion about fountain pen ink pH.  During that discussion, I offered to test inks and my friend from the Geekhack forum, CPTBadass, offered to donate some samples for my tests.  I received samples from my good CPT in the mail, and I went about running tests.  This post is the outcome of that work.

## The Samples

Four samples were procured from CPTBadass and one was supplied by the author.

Noodler’s Baystate Blue – a vibrant royal blue ink
Rohrer & Klingner Scabiosa – an iron gall ink
Noodler’s North African Violet – an intense violet ink
Diamine Soft Mint – an ink that appeared turquoise or aqua in the bulk solution
Noodler’s Polar Brown – a somewhat rust tinged brown ink

Upon receipt, the samples were transferred to 20mL plastic scintillation vials.  The original containers’ opening was too small to accomodate the probe used in the pH experiments.

## 1. Shake Tests

### Method

Samples in scintillation vials were given a quick shake and observed for fluid and surface characteristics.

Results

 Ink Observations Noodler’s Baystate Blue Ink left a thin layer coating the wall that persisted for a long time.  This thin layer did not show any detail of the plastic surface.  It produced bubbles, Rohrer & Klingner Scabiosa Ink left a very thin layer coating the wall that persisted for some time.  The layer highlighted plastic imperfections of the bottle by contrast.  It produced bubbles. Noodler’s North African Violet Ink left a very thin layer coating the wall that persisted for some time.  The layer highlighted some plastic imperfections of the bottle by contrast.  It produced bubbles. Diamine Soft Mint Ink did not coat walls.  Preferred cohesion and formed small islands of liquid on the plastic surface.  It produced NO bubbles. Noodler’s Polar Brown Ink left a very thin layer coating the wall that persisted for a long time.  The layer highlighted plastic imperfections of the bottle by contrast.  It produced many/large bubbles.  Bubbles appeared to grow over time.

Discussion

The surface coating indicates that there was interaction with the walls of the container.  Since the plastic was either polyethylene or polypropylene, we expect the walls to be hydrophobic.  The inks which wetted the surface well interacted with the plastic surface.  Since bubbles were formed, we can assume that the interaction with the wall was due to surfactant in the ink reducing the surface energy allowing this prolonged contact.  The lack of coating in the Diamine sample suggests that it is highly hydrophilic.  The lack of bubbles suggests that no surfactant was added to the ink during manufacturing.

## 2. pH Test

### Method

Samples were tested for hydrogen ion concentration using a Vernier pH probe connected to a computer running the logging software.  The probe was calibrated immediately before the experiment with a pH 4.00 buffer standard (Fisher – methyl alcohol, formaldehyde, and potassium hydrogen phthalate) and a pH 10.00 buffer standard (Fisher – disodium EDTA dihydrate, potassium carbonate, potassium borate, potassium hydroxide).  The lab temperature was 25C, and the standard pH did not need adjusted from the label value based on this temperature.

Results

 Ink pH Noodler’s Baystate Blue 3.97 Rohrer & Klingner Scabiosa 2.33* Noodler’s North African Violet 4.60 Diamine Soft Mint 4.00 Noodler’s Polar Brown 8.78

### Discussion

The majority of the inks were slightly acidic in nature, and the Polar Brown ink was slightly basic.  The iron gall based ink was quite acidic.  This ink pH is marked with an asterisk(*) since the pH was not stable.  The value continually drifted downward, trending toward acidity.  The value used here was the observed pH value after 15 minutes of attempted stabilization.  After the experiments were complete, the pH probe was observed to be slightly discolored.  To determine how this effected the results, the standards were measured with the discolored probe.  The 4.00 buffer measured 3.74, and the 10.00 buffer measured 9.88.  This indicates that the results are probably skewed downward by ~0.25 pH units.  The results were not corrected for this error, since it would be difficult to quantify the error without much experimentation.  The probe was cleaned by soaking in 2% nitric acid for 30 minutes.  After this time, the probe was deemed ‘clean’ and returned to storage.

The results of this experiment should clear up a few misconceptions.  Notably, none of the inks in this less than comprehensive test were pH neutral.  Some sources discussed previously make claims based on the acid or base nature of inks based on brand.  Clearly, this is not a wise assessment.  The brand with three different inks in the test (Noodler’s) showed a wide range of pH values.  Some outside sources suggest that acidic inks may damage pens.  Most of the inks tested were acidic.  No metal based tests were performed in this experiment, but this author believes that the correlation between metal pitting and acid content of an ink may be spurious.

## 3. Solvent Tests

### Method

In this test, a small quantity of ink was deposited onto a strip of printer paper (Staples Brand) and partially submerged in solvent.  The ink was applied to the paper by smearing one or two drops from a disposable plastic pipette on the paper.  All labels on the samples were written in pencil.  The ink was allowed to dry then tested.  Most strips were folded so they would stand and set in a petri dish with the testing solution for five minutes. These tests were broken up into aqueous, organic, and chlorinated solvent groups to prevent unwanted reactions.

The wet papers were then taped to a rail in the hood to dry.

One strip was tested under a 18.4 W long wave UV lamp for one hour.  One strip was left as a control.

Results

#### Control

The numbers represent the inks Noodler’s Baystate Blue, Rohrer & Klingner Scabiosa, Noodler’s North African Violet, Diamine Soft Mint, and Noodler’s Polar Brown respectively.  The inks were not applied evenly, and some spreading, especially in samples 3-5 was due to large drops.  The Polar Brown ink naturally feathers a great deal on this paper, and the Scabiosa and North African Violet inks showed some feathering.  The Soft Mint ink naturally spread, but did not show feathering.

#### Water

 1 2 3 4 5 minimal feathering feathering feathering spread and loss No Change (NC)

#### Ethanol

 1 2 3 4 5 upward drift some upward spread upward drift upward drift edge reddening

#### Acetone

 1 2 3 4 5 some spread NC feathering upward drift NC

#### Isopropanol

 1 2 3 4 5 upward drift some feathering some feathering/drift some drift NC

#### Toluene

 1 2 3 4 5 upward drift NC minor drift NC edge reddening

#### Nitric Acid (~4%)

 1 2 3 4 5 gone, yellow edge almost gone, blue edge almost gone, green edge gone NC

#### Hydrochloric Acid (~4%)

 1 2 3 4 5 gone, yellow edge almost gone, blue edge almost gone, green edge gone/upward drift edge reddening

#### Dichloromethane

 1 2 3 4 5 upward drift feathering upward drift/feathering minor upward drift yellow color separation

#### UV Exposure

 1 2 3 4 5 NC NC NC NC NC

Discussion

There is a great deal of information to be learned from these tests.  What we are looking at is actually a very rudimentary form of thin layer chromotography.  The paper acts as a stationary phase and the solvent as a mobile phase.  The mobile phase moves our eluent along the capillaries within the paper fiber matrix.  If we let this go for a long time, we would see the individual components separate from each other.  There are better methods to perform that experiment though, and it was not in the scope of this one.  The goal of the test was to determine the stability of the ink when in contact with the solvents.  In doing this, we can learn something about the character of the ink.

Different solvents have different polarities.  The polarity of a molecule being the concentration of electrons on one side of an atom and exposed protons on the other side.  We can relate these by a polarity index.  Since “like dissolves like” if something is moved or dissolved by more polar solvents, then the material must be polar.  So we can see that the Diamine ink is more polar than the quite nonpolar Baystate Blue based on what different solvents do to it.

The Polar Brown ink interestingly slightly drifts in both polar and nonpolar solvents.  If you look closely (probably not visible in pictures), you can see a yellow component separate out in nonpolar solvents and a red component separate out in polar solvents.  These colors moving out of the bulk drop only slightly affect a color change in the brown.

I chose the two acids to test here on purpose.  We would expect the HCl to react mostly as an acid, whereas the HNO3 would react as both an acid and a strong oxidizer.  Since both of the acids had similar effects on the inks, we can see that none of the inks oxidize easily – which speaks well for the permanence of these inks.

Future tests would include solvents with polarity index of 0.

The lack of change due to UV light is good, though this author would like to point out that this was not a very strong source.  Future tests should attempt to use more powerful sources such as a laser.

## A. Errata

All solvents were obtained from Pharmaco Aaper with purity >99.5% except the nitric acid, which was obtained from Fisher.

All water used in the experiments was reagent grade, purified by reverse osmosis to resistance of >18Mohms.

I would like to thank CPTBadass again for his donations and my advisor for being out of town this week so I could do silly experiments like this without getting yelled at.

## IBM Model M Mod

I decided that I should do my own IBM Model M mod.  In early March of 2015, I bought a Model M from a Geekhack user on the cheap.

The keyboard was bolt modded, had a wonky membrane, and no cable.  I did a few mods to it.

## The Caps

I dyed the caps aqua colored utilizing Jacquard iDye.  I boiled water and used an old metal colander to submerge the caps.  I oriented the caps in the same direction in the bath, and that gave them a nice gradient.

## The electronics

Since few new computers come with AT-DIN connectors any more, for this IBM Model M Mod, I wanted to add a USB.  The original connector of this board was a hard-wired DIN connection.  I removed the old connector and added a Teensy for USB capabilities.  Desoldering the wires was easy enough, but I actually went through a few Teensys in the process.  I had a Teensy 2.0, but while soldering it I damaged one of the resistors/capacitors and the socket.  I did some work on it with the Teensy 2.0+, but I am going to use that for another project.  I bought a Teensy LC, but the ARM processor was giving me problems.  So I finally went with another 2.0.

I’m pretty proud of the usb connector.  I took the old DIN socket and ripped it all to hell with my Dremel.  I made little slots so the teensy board would slide in and super glued it to that spot.  I filled in the open area with epoxy clay so it looks fairly clean.

I also desoldered all of the old ugly green LEDS and resistors on the breakout board.  I put in their place some bright blue LEDs and appropriate resistors for them.  Now everything looks bright and color coordinated.

## The Artisan Keys

I have a BS compatible Brobot from [Ctrl]Alt  as the escape key.  This picture is nice because it really shows off the color gradient on the other caps.

I also have a pair of glorious multi-shot Krap bonus caps on the pause and scroll lock buttons.

Now I have a very attractive IBM Model M Mod.

## SEM of Uranium Adsorption Sites

Before my dissertation project got underway, I was working on a project describing the kinetics of adsorption of uranyl ions onto a metal oxide thin film.  The thin film was impregnated onto pellets of silica and alumina, then I would submerge the pellets in a solution of uranium nitrate in water.  After being submerged for a while, the white pellets would come out with intense yellow-green coloration, as seen in the picture below:

There is a lot of interesting stuff happening with the kinetics there as you adjust things like ion concentration, pH, mixing speed, etc.  We think that there is an ion exchange happening at the surface sites, but the kinetics get complicated.  There are clearly some Langmuir adsorption effects going on. But that isn’t what I want to show you today.  During my time doing my PhD, I was fortunate enough to get into a course on microscopy which was offered by the veterinary biology school.  When we weren’t busy looking at mouse blood and sickly tree leaves (those pics will come later), we had an opportunity to bring in our own samples to explore.  I decided I wanted to take a look at one of these pellets.  We mounted a sample onto a platen, coated it with some carbon, and took a gander at it through the scanning electron microscope.

Now here is the fun part.  This wasn’t your grandma’s SEM.  This one was equipped with an optional x-ray spectrometer for elemental analysis.  To generate an SEM image, we fire electrons at a surface and analyze the backscattered electrons and secondary electrons.  Not all of the electrons that hit the target generate the backscattering we need to ‘see’ a sample. Some of them wiggle and release the energy from the absorbed electron as a photon.  This means that while we are blasting the surface in the picture above we can analyze the photons that come off.  X-ray photons from atoms have particular binding energies which allow us to identify what is present in the sample.  In the sample I’m looking at, I can run a check and make a pretty graph of what is detected:

## Elemental Analysis of the Thin Film under the SEM

The instrument we use to check the elements in the sample come up on the plot as a color.  Since the instrument also saves each pass, I can look at them as overlays on the original SEM image.  I can see what goes where:

That’s neat and all, but so what?  Well that is best part.  Did you notice how some of the colors in the animation above sort of glomp together?  I did. There is some significance to that grouping.  If we combine the overlays for the calcium and [metal X] onto one image, we see that these pair together nicely. This is because of the thin film we use: CaXOy.  The calcium starts out bonded to the XOy complex.  In the ion exchange mechanism, which is proposed as the primary mechanism for action in this system, the uranium/uranyl comes along and knocks off the calcium and takes over that spot.  When we see [metal X] and calcium together, we know that these are unreacted sites.  If we combine the overlays for both uranium peaks and the oxygen peak, these materials match up.  This suggests something important:

Uranium is adsorbing as the uranyl (UO_4) species, not the bare atom.