Anti-ACTA Demonstration Photos

Last Saturday we had another Anti-ACTA demonstration here in Dortmund, and I thought I’d post some photos. It was a lot smaller that the previous two, but I still met people who had come from Düsseldorf to attend. Though it currently seems likely that the European Parliament will reject ACTA, it’s not certain until the vote is cast and counted, so we have to keep the pressure up. Also, repelling ACTA is not enough: The same people who are responsible for ACTA are already working on new laws and agreements that would have similar consequences. We have to change the direction of policy, and it is encouraging that the Pirate Party (German) won 20 seats in the Nordrhein-Westfalen state parliament in yesterday’s elections. 🙂

Rainer Klute speaking from a stage, listeners (one with Anonymous flag) in the foreground, Pirate Party flag in the background

The Pirate Party and Anonymous were the most visible, but some other groups were there, too.

Marco Bülow speaking from a stage, listeners (one with Anonymous flag) in the foreground

Members of various parties spoke at the demonstration, but the CDU (conservatives) was notably (but not surprisingly) absent. Speakers included two members of the German national parliament (“Bundestag”) and one of the Nordrhein-Westfalen state parliament.

Protesters walking along a road with Anti-ACTA signs. Police in the background.

Simple NMOS Simulation with gEDA

I’m currently taking a micro- and nanoelectronics lecture, and the exercises include some simulations of electronic circuits. However, the software introduced in class was some Windows-based proprietary stuff, so I had to look for a free software alternative that would work on Linux and support SPICE-style component specifications. I quickly found out that gEDA (GPL Electronic Design Automation) combined with Gnucap should meet the requirements, but sadly its documentation is not exactly beginner-friendly. The most helpful source I used was “GEDA and GnuCap for Beginners“, but although I can recommend it, it didn’t cover some things I would’ve liked to know while including stuff I don’t need, so after getting things to work I decided to write my own small tutorial. As an example, I’m going to show you how to create the set of characteristic curves of an NMOS transistor. There may be better ways to do this, but here’s what worked for me. If you have an idea how to improve this tutorial, please leave a comment!

Installation

I simply installed gEDA and Gnucap from the Ubuntu packet repository. To draw graphs, you’ll also need Gwave or Gnuplot. In Ubuntu, the relevant packages are called geda, gnucap, gwave and gnuplot.

Creating a circuit layout

The first thing you need is a layout for the circuit to simulate. To measure the set of characteristic curves of an NMOS transistor, you’ll need the transistor, two voltage supplies (one for the gate, one to provide the drain-source current) and a ground connector. The gEDA component for this task is called gschem.

Gschem window showing the example layout with NMOS transistor, two voltage supplies, ground and various labels

In gschem, use the Add → Component menu entry or press i. The component dialog will open. Find the following components for transistor, voltage supplies and ground using the filter below the component list, and add them (don’t forget that you’ll need two voltage supplies):

  • asic-nmos-1.sym
  • voltage-3.sym
  • ground.sym

After you have added the components, you can move them around using the mouse, if you want. You can also rotate (Keyboard shortcut: er) or mirror (ei) components.

Use the menu entry Add → Nets or n to change to net mode to connect the components. Click left to draw a connection and right to stop. s takes you back to select mode.

Component attributes

To use this circuit for simulation, you’ll need to change and add some attributes on the components (except the ground connector, which is quite simple ;-)). In selection mode, double click a component or press ee while a component is selected to bring up the attributes dialog for this component.

Adding a value attribute in the gschem attribute editor

First of all, each component needs a unique identifier, called refdes. The first letter in the identifier depends on the type of component, with V for voltage supplies and and M for MOSFETs. After adding a component, its identifier contains a question mark after the letter. Replace the question marks with a numbers so that each refdes is unique.

The components also need a value. For the voltage supplies, this is simply the desired output voltage, so you can set value=3 on V2 if you want 3 Volt between V2‘s + and - connectors. You can choose for each attribute if name or value or both are visible in the schematic.

For the NMOS transistor, value specifies the transistor’s model. Set the NMOS’ value to test, we’ll load an example model description during the simulation. If you want to simulate a real transistor later, use the part name and load the appropriate model description.

Now your circuit should look similar to the first picture, save it to example.sch. Before Gnucap can simulate the layout, it needs to be compiled into a SPICE netlist using the gEDA component gnetlist. The command looks like this:

$ gnetlist -g spice -o example.net example.sch

Simulation in Gnucap

Gnucap is simply started by running gnucap in the shell of your choice. Gnucap has its own command line, and while I’ll briefly explain what the commands do, I recommend looking at the Gnucap manual (PDF) for details and more commands. The first thing to do is loading the netlist:

gnucap> get example.net 
* Spice netlister for gnetlist

Next, you have to load a transistor specification for the NMOS. I have to use the specification we got from the TA for exercises, so I had to figure out how to load it. If you don’t need that and want to use a generic NMOS specification included in Gnucap instead, just run

gnucap> .MODEL TEST NMOS

and skip the next section. This creates a MODEL with the name TEST of type NMOS. Just keep in mind that the generic NMOS has other characteristics that the example one, so the results will be slightly different.

Loading a transistor model file

I’m not sure if I’d be allowed to publish the NMOS model specification we use in the lecture, so for this tutorial I just took one from the Gnucap example code (nmosgen.c). It looks like the previous MODEL command, but with details for the NMOS’ properties:

.MODEL TEST NMOS (level=2 KP=28U VTO=0.7 LAMBDA=0.01 GAMMA=0.9 PHI=0.5)

Put this into a file called models/test.mod using your favorite editor, then load it into the running Gnucap session with the following command:

gnucap> include models/test.mod

You can display the currently loaded netlist with the list command.

gnucap> list
V2 ( 1 0 )  DC  3.
V1 ( 2 0 )  DC  2.
M1 ( 1 2 0 unconnected_pin-1 )  test  l=3u w=1u
.model TEST nmos2 ( level=2 kp=28U nfs=NA( 0.) delta=NA( 0.) vto=0.7 gamma=0.9 phi=0.5 lambda=0.01 tox= 100.n uo=NA( 600.) tpg=1 tnom=NA( 27.) fc=NA( 0.5) pb=NA( 0.8) cj=NA( 0.) mj=NA( 0.5) cjsw=NA( 0.) mjsw=NA( 0.33) kf=NA( 0.) af=NA( 0.) is=NA( 10.f) cgso=NA( 0.) cgdo=NA( 0.) cgbo=NA( 0.) ld=NA( 0.))

Running the simulation

Before running the simulation, you need to tell Gnucap which data you want to see. Our example circuit is small, so let’s print pretty much everything:

gnucap> print dc i(M1) v(V1) v(V2)

The print command tells Gnucap what data to print for a certain kind of simulation. The example uses DC, so that’s the type. After the simulation type list the values you want printed, in this case the current through M1 (i(M1)) and the voltages over V1 and V2 (v(V1) and v(V2)).

Use the dc command to run the simulation. The parameters here are, in order: a voltage to vary, its start and end values, and the step size. Note that this command overrides the previously set value for V2.

gnucap> dc V2 0 4 0.5
#           i(M1)      v(V1)      v(V2)
 0.         0.         2.         0.
 0.5        4.5044u    2.         0.5
 1.         5.7161u    2.         1.
 1.5        5.7969u    2.         1.5
 2.         5.8617u    2.         2.
 2.5        5.9183u    2.         2.5
 3.         5.9702u    2.         3.
 3.5        6.0191u    2.         3.5
 4.         6.0659u    2.         4.

To plot the results, you can redirect the output to a file the same way as on a shell. It’s a good idea to use a smaller step size for plotting.

gnucap> dc V2 0 4 0.01 >example.out

Now run

$ gwave example.out

on the shell. Gwave should open two windows, one listing the variables and one with black plot areas. Drag and drop variables to the black areas to plot them. If you put both voltages into the upper and the current into the lower area, the result should look like the picture below.

Gwave with two graphs, showing input voltages (top) and drain-source current (bottom)

Creating the set of characteristic curves

To draw the full set of characteristic curves, we have to vary the gate voltage as well. Gnucap’s sweep command is useful here. It creates a loop: A number of commands are executed with one or more variables changing between runs. Let’s change V1 from 1 to 5 Volt in 5 steps. After running the sweep command, the Gnucap prompt will change to >>>. On this prompt, run the command you want sweeped, in this case the dc command from before, with one small change: When > is used to redirect output, as on the shell the target file will be overwritten with each run. Here, >> is better, because the new data will be appended instead, but you should delete example.out first to avoid mixing new and old results. go ends the list of loop commands and starts the sweep.

gnucap> sweep 5 V1=1,5
>>>dc V2 0 7 0.01 >>example.out 
>>>go

I couldn’t make Gwave understand this kind of concatenated file without splitting it up, but Gnuplot can understand it with just a minor change: there must be an empty line before each new set of data. Gnucap puts a comment line starting with # at the top of each set of output data, so we can easily use sed to insert a newline before each dataset.

$ sed -e "s/#/\n#/g" example.out >example.out.split

Now start Gnuplot and run the following commands:

gnuplot> set xlabel "Voltage supplied by V2 [V]"
gnuplot> set ylabel "Current through M1 [A]"
gnuplot> plot 'example.out.split' index 0 notitle with lines

The label commands aren’t really necessary, but the diagram looks better with labels. 😉 That’s it!

Set of characteristic curves for an NMOS transistor plotted in Gnuplot

Creating Adventures

“Why do you spend so much time on this?” one of my close relatives asked. I was sitting in my family’s living room on a Saturday afternoon, with my notebook computer in front of me, and working on writing a DSA adventure.

Some of you may be wondering “What the heck is DSA and how can you write an adventure?” DSA is short for “Das Schwarze Auge“, a pen & paper role-playing game. The name literally means “The Black Eye” in German, but in German the term does not carry the meaning of injury (we call that a “blue eye”). I’m sure everyone knows examples of role-playing, be it little children playing family or computer RPGs (this is probably the most widely know example). There are many kinds of pen & paper role-playing, but it generally boils down to the players, one of them the game master, sitting around a table and describing what their characters do, with the game master describing the rest of the world (yes, that’s a lot of work). Traditionally, character profiles are written on paper, hence the name. Dice are used to decide whether difficult actions work.

An example

Let me give you an (edited) example from our last session. DSA has a medieval-fantasy setting, you can find pictures of our group at Tak’s page over here. At the beginning of the quoted scene, the characters have finally discovered the supposed headquarters of a villain spreading a dangerous disease in the city, but the house looks empty from the outside. Parts in italics are what characters do and say, normal text player actions & quotes, bold is the game master (GM).

Morio: “I’m going to check if the door is open.”
Morio’s player: “I take a look at the door.”
GM: It is locked.
Morio’s player: “I pick the lock.” He rolls three 20-sided dice and checks the results. “Ok, I did it.”
Morio: “Hey, the door is open!”
Morio and Yoläus (the warrior) enter the house, the others follow.
GM: The house looks like it hasn’t been used in a while, it’s really dusty, and the furniture is covered with cloth.
Morio’s player: “Really dusty? Like a thick dust layer everywhere?”
GM: Yes. You can see tracks leading to the basement.

Downstairs, we discover a room with a desk and a terrible smell coming from an opening in one corner, on the desk are some papers, candles and an ink jar. It’s pretty dark.

Me (playing a wizard): “I have my staff light up.”
Edorian (the wizard) raises his staff, a flame emerges from the top.
Morio’s player: “Unless the candles have weird marks on them [note: we had been dealing with some cursed artifacts transmitting the disease], I’m going to pick one up and light it on the flame.”
GM: No, they’re just regular candles. But with the light you can see that the ink jar has marks like the ones you saw before.

I suppose everyone gets the idea. Of course, someone needs to come up with something to do for the characters: people to meet, places to see and problems to solve during the game. We call this kind of scenario an adventure, and on the Saturday afternoon mentioned above I was working on such an adventure involving an expedition to the ruins of an ancient temple.

So, Why?

Simple answer: Because it’s fun! However, on that day I had also read this article criticizing modern Science Fiction for frequently shallow plots. It isn’t about role-playing in any way, but the following quote got me thinking (translation by me):

We got used to not “doing by ourselves”, but rather “have someone do” – to consume. Or watch others as they do something. This applies particularly to the very exhausting process of thinking.

Original German: Wir haben uns daran gewöhnt, nicht mehr “selbst zu machen”, sondern “machen zu lassen” – zu konsumieren. Oder anderen dabei zuzuschauen, wie sie etwas machen. Insbesondere betrifft das den überaus anstrengenden Vorgang des Denkens.

Pen & paper role-playing is exactly the opposite, and that is what I love about it: I’m actively taking part in the adventure. I’m not just observing a story, like reading a book or watching a movie, or acting out a predefined script. As a player, I become part of the story and can change it, and as the game master I can create a whole world. Obviously players can easily act outside of what the GM expected them to do, and “No scenario survives contact with the players” is a well-known quote among those playing pen & paper RPGs, but that is not a bad thing: According to my experience, improvised scenes and spontaneous non-plot action are frequently among the most memorable parts of an adventure.

Imagining the world and people in the game, experiencing adventures together with friends, interaction between characters, and (as game master) coming up with a story are all very creative things. This creativity, and the fact that it is a great way to spend time with friends, are the two biggest reasons why I enjoy pen & paper role-playing.

Do you play role-playing games? Why? Or if not, would you like to try?

One Year Ago…

…I was crouching on the floor in my laboratory at Tohoku University, feeling the ground shake violently, watching the walls shift, shelves break and things fall down. When the earthquake finally stopped, everyone asked “大丈夫?” (Japanese for “Are you OK?”) while coming out of the places where they had taken cover. Fortunately nobody in the lab had been hurt. Everyone said they never experienced a quake like that before, yet I wouldn’t begin to understand the true extend of what had happened until the next day – and seeing the area devastated by the tsunami was a entirely different thing.

Never forget, never give up!

がんばろう東北!

EU Commission thinks we’re stupid

Apparently, the EU Commission thinks all of us who demonstrated against ACTA are stupid. This article (German, Heise Online is a renowned German IT news site) cites protocols from the EU expert group for the TRIPS Council, and I’m going to comment a few excerpts (translation by me).

“Discussion protocols of the EU expert group for the TRIPS Council, available to Heise Online, consider the protests against ACTA as a result of insufficient information policy.”

So they think we just don’t know what ACTA really is about. In part that’s even true, because significant information on ACTA is still kept secret by the same people. Unfortunately for them, the public part is enough to clearly see that ACTA is bad.

The upcoming hearing in the European Parliament on March 1st is considered important to convince Members of Parliament that the protests are not justified and make sure they vote Yes in September. So the commission wants the Members of Parliament to represent its opinion, rather than the citizens’. As I said: The commission thinks we’re stupid.

“Even individual protests like the ACTA rapporteur Kader Arif’s resignation wouldn’t have anything to do with ACTA, but rather happened because of the upcoming French elections. Arif would be very busy supporting socialist candidate François Hollande’s campaign.”

This is an obviously wrong statement, and I’ll leave you to judge if it was intentional. Let me quote Mr. Arif’s own statement as proof:

“I want to denounce in the strongest possible manner the entire process that led to the signature of this agreement: no inclusion of civil society organisations, a lack of transparency from the start of the negotiations, repeated postponing of the signature of the text without an explanation being ever given, exclusion of the EU Parliament’s demands that were expressed on several occasions in our assembly.”

All this is really bad, but the following pushes completely over the top:

“It was regrettable that the discussion moved from free trade aspects to civil rights.”

So the EU commission thinks it is regrettable that we care about our civil rights? Why don’t they just go and say that civil rights were a bad idea altogether? This is outrageous, and shows again why ACTA must be stopped.

Stop ACTA! – Demonstration in Dortmund

Today, about 2500 people gathered in my hometown of Dortmund, tens of thousands in Germany and many more all across Europe to demonstrate against ACTA, the “Anti-Counterfeiting Trade Agreement”. This treaty that was negotiated in secret and massively threatens civil rights, the existence of the Internet as we know it and even human lives. The European Union hasn’t ratified ACTA yet, and we want to make sure it never will. If you don’t know why ACTA is so dangerous, look here.

Demonstration, with two people in the foreground: One holding a sign "Safe the Freedom, Stop ACTA", the other with a Minecraft head hat

As you can see, our demonstration was peaceful and humorous despite the serious matter. The demonstrations were so big and many that the “Tagesschau”, the by far most famous German TV news broadcast, opened with a story about it. 🙂

Many people gathered in a square, some signs and party flags visible

Even a funny robot was demonstrating. 😀 I hope politicians, especially the members of the European parliament, get the message: Don’t try to take our freedom, don’t mess with our Net!

Silvery robot carrying a Stop ACTA poster, people watching from the left, a few policemen in the background

Cold Winter

After most of January was fairly warm, the weather has been freezing cold with wonderful sunshine since about a week. A stream in the woods next to my university is frozen solid, the ponds nearby are at least partially frozen, but there’s no snow. Today I took the opportunity to take some photos. Enjoy!

A white, frozen stream with trees around it

I love the light in this one. 🙂

A frozen pond with reed in the foreground, forest on the other shore. While there's shadow over the pond, the trees are in full sunlight.

Can you spot the H-Bahn in the background?

A frozen pond with fallen trees in the ice, H-Bahn passing by in the background

New Rice Cooker

One thing I missed since returning from Japan to Germany was my rice cooker. A friend of mine who’ll go to Japan soon had to go to Düsseldorf (a nearby town with a large number of Japanese residents) yesterday, so we went together and I finally bought a rice cooker.

Opened rice cooker with grey pot inside, filled with rice.

Sadly the fancy rice cookers that are common in Japan are really expensive around here: The one I really liked would have cost almost 200 Euro. I chose to get a simple one instead, that only cooks the rice and then keeps it warm. At 56 Euro it cost about as much as the rice cooker I had in Japan, but that one had a timer and multiple cooking programs. I guess there just isn’t enough demand for rice cookers in Germany.

If you’re wondering why I just didn’t take my Japanese rice cooker with me when I returned to Germany, the reason is the different power system. Japanese power sockets provide 110V, in Germany it’s 230V, so I would have had to buy a transformer, and a transformer that can sustain the current required to run the rice cooker would have been about as expensive as a new rice cooker – the fancy kind. 😦

Still, I’m glad to have a rice cooker again, and as a special treat I even bought some Japanese rice. 🙂

Close look at a 3D printer

I didn’t go to 28C3, but right now I’m at the Dortmund Hackcenter with PING. Aside from watching the congress live-stream and VPN connection to the congress network they also have a Ultimaker 3D printer. This is the first time I’ve seen a 3D printer in action, so I thought I’d share a photo.

Lower half of a knot-like object in pink plastic, with the cone-shaped printer head above it adding more layers of plastic

The print head is assembling the object layer by layer from plastic, so the possible overhang is limited. You can also see there are some thin threads between the columns, these are created when the print head moves between the columns. Nonetheless 3D printing is a fascinating thing to watch. 🙂

Maybe I should learn how to create printable 3D models…

Design a site like this with WordPress.com
Get started