Microwave circuit design/sim programs on Fedora

Hello once more,

Recently I made a presentation at the TEI of Pireaus on Arduino and Fedora Electronic Lab. Hopefully, I will repeat it to give the chance to more people to come.

I intend to make some simple tutorials (we’ll see how complex they’ll get on the way actually) on using programs that assist or create designs and simulations of microwave circuits and set-ups. In this post, I will just post a simple guide to install some programs that deal with the design and simulation of microwave circuits and components. What I am trying to do is at least reach the 3D FDTD simulation using free and open source software. Currently I have found Qucs, Transcalc, emGine and MIT’s Meep that will help us reach this goal. I am trying to install Elmer-FEM (which looks extremely cool and a lot easier than Meep) but unfortunately, I couldn’t install it due to problems with a certain dependency (ftgl-devel is installed but not found 😦  see here).

You can easily install Qucs with : $ su -c “yum install qucs” (it’s also inside Fedora Electronic Lab together with other valuable packages). It’s a circuit simulation program (not only for microwave circuits) that has various microwave components to use.

Transcalc is ” an analysis and synthesis tool for calculating the electrical and physical properties of different kinds of RF and microwave transmission lines”. The idea behind this is to get the dimensions of real components and then use the results (the parameters we need) in our simulation programs!

To install Transcalc you will need to install the GTK2.0 development files (gtk2-devel on fedora). After you download the package and place it in a folder of your choice (I have a “programs” folder and place every to-be-installed program there) you can go to the terminal and write :

$ cd ./your_path_to_transcalc_folder/

$ ./configure (if something is missing search in yum or “Add/Remove applications”)

$ make

$ su -c “make install” ….and to run the program just type : $ transcalc

A few words for emGine! It’s a full-wave 3D electromagnetic field simulation environment solving Maxwell’s equations in time-domain. You create 3D models of your components, put the parameters and then simulate and get your graphs and results. Not 3D FDTD.

Let’s install it then! You are going to need to find and install (if not already installed): tkinter , python, vtk , vtk-devel, wxWidgets (I got wxBase, wxGTK, wxGTK-gl, wxGTK-media installed) , wxPython, numpy and python-matplotlib. Now go to the download page and get the package (emGine GUI platform independent of course) .

As you understand we are going to compile using python. So, go to the emGine folder (like we did in transcalc) and just type in your terminal:

$ python emGine.py

It might take a bit to run, but if nothing is missing the program shoud start. And that’s for the emGine environment.

Now, to the more serious staff. Meep is an FDTD program to model electromagnetic systems! One of my next posts will be an example running a 3D (I hope) simulation (if not a 3D then a 2D). I will try to get the dimensions of a real waveguide, get the parameters from Transcalc, use them on Meep to visualize a cool simulation and maybe see what we can do on a circuit with Qucs.

What did I need to install Meep on Fedora 14?

libctl (new version on the link, or install libctl and libctl-devel version 3.0.2 from yum etc.), hdf5 and hdf5-devel. I think that was all I needed.

Then let’s go to the terminal one last time:

$ export LDFLAGS=”$LDFLAGS -lm”    (this line is needed to avoid the DSO Linking error with libm.so)
$ make
$ make install

Now if you type: $ meep …you should get:  meep>    I tried to make a 2D example to simulate a waveguide. Not the fastest thing I have done in my life 😛

The reference is here. Start the calculations and wait for my 2nd post. (Also, just found it, check this out, there are tools like the japanese ADVENTURE and its modules)

MSP430 (ez430) on Fedora

For learning purposes I currently have on my hands a EZ430-F2013 Development Kit (We all should also use Arduino 🙂 ). This kit comes with a CD containing proprietary software (an IDE) in order to program and debug the MSP430 microcontroller. So, I took the chance to run it on Fedora using Linux tools and a few resources on the internet. In this post I will write down how you can program and debug your ez430 using Fedora 13 and your terminal.

First, I plugged in the ez430 and opened a terminal (yes we will work only this way for now). Write down lsusb and hit enter. Then you should get some lines containing this one:

Bus 005 Device 003: ID 0451:f430 Texas Instruments, Inc. MSP-FET430UIF JTAG Tool

That means that by default your system recognises the device and you can actually communicate with it.

Next, we need our tools! Go to System ->Administration-> Add/Remove Software (or use yum install etc.). The software we need is (actually not sure if everything is needed):

  • latest version of gcc, texinfo, patch, ncurses5-dev, zlib, zlib-dev, libX11-dev, libusb-dev (not only libusb1-dev), libreadline6-dev, msp430-binutils, msp430-gcc, msp430-libc

and also : mspdebug (the program that actually does the work).To install it manually (in case there is an older version on the repository) download the .tar file create a  folder named “Programs” (in case you don’t have one) on your Home Folder.Then, extract the mspdebug folder there!

With your terminal (you can auto-complete the words in the directory using Tab on your keyboard) :

$ cd /home/(your user name on Fedora)/Programs/mspdebug-0.11

(now you are in the mspdebug folder with your terminal, the version 0.11 is the current one I use, yours can differ)

$ make (this will compile the program)

$ su -c “make install” (and give your root password to install it)

(the $ symbol is just to show that you are using different commands in the terminal, don’t copy it)

now you have installed mspdebug! Great!

If you are ready to use the MSP430 you should have a program already written. In case you don’t, get this example (modified by me to get it to compile) that flashes the internal LED of the device:

/* Blink LED example */
#include <msp430x20x3.h>

/** Delay function. **/
delay(unsigned int d) {
int i;
for (i = 0; i<d; i++) {

int main(void) {
P1DIR = 0xFF;
P1OUT = 0x01;   // THE x IS NOT Copy-Pasted CORRECTLY 🙂

for (;;) {

Create a file named blink.c in a folder of your choice, copy this on the file and then cd on the folder. Now to compile it we need 3 lines (I also changed this to work):

$ msp430-gcc -Os -mmcu=msp430x2013 -o led.elf blink.c

$ msp430-objdump -DS led.elf > led.lst

$ msp430-objcopy -O ihex led.elf  led.hex

In order not to do this every single time, you need to run the program, you can create a Makefile based on the one in this site (it’s inside this zip file).

Next, to run mspdebug in order to flash the program into the MSP430, type :

$ mspdebug -d /dev/ttyUSB0 uif

(“/dev/ttyUSB0” is of course the ez430 if you don’t have any other device and “uif” the parameter to run it with mspdebug, check the manual for more)

To flash the program you need to type : prog led.hex . Notice that it is a command to control mspdebug and not the terminal). If you push Control+D mspdebug will close, the ez430 will reset, start the program and also blinking the LED! 🙂

My resources were 3 posts in this site : http://bit.ly/deonNa I should also mention that I have installed all the Fedora Electronic Lab packages with: $ su -c “yum groupinstall “electronic-lab”

GFOSS Conference 2010

Yesterday ended the GFOSS Conference 2010 that took place in Athens at NTUA (National Technical University of Athens). It was an event that started on Friday, but yesterday was special because of the workshop I was organising this week together with Anastasis (anast)! The subject was (in translation) “Fedora Project : Remix and Spin it! The Fedora operating system you own (and not only that)”. Furthermore, we also had booth presence on both days with the usual swag 🙂

The workshop lasted 1 hour ( the schedule said 2 hours) but I think something more than that would be boring. Some setbacks occurred previously that day and affected the workshop a little bit. First, I tried to create an iso image using a kicksart file I made that unfortunately needed a bit of time to be created due to yesterday’s bad signal of the wifi where the booth of Fedora was (damn near fields), so I didn’t make it in time for the “Takis OS” Live CD I wanted to create. Second, I didn’t expect my laptop to fail me when I tried to plug in the dvi cable. I count it as a setback but, ok I overcame it thanks to the laptop of Anastasis 🙂

I think it was around 15 people that joined the workshop (thanks to everybody). I tried to pass the knowledge of what is a remix, a spin, their differences (and similarities), guidelines, processes, kickstart files, livecd-tools, cobbler…but not to the extent of getting down with too much coding, configurations and setting many arameters. In a few words I tried to show the way for a simple creation of a Remix from the kickstart file until the creation of a LiveCD and told a few words about the magic things cobbler can do. Anastasis talked about Geo Spin and Security Lab spin. I couldn’t miss the chance to talk about Fedora Electronic Lab too. Also, I am happy that Nikos (comzeradd) and Pantelis (pant) joined us as well!

click for more photos

Παρουσίαση του Fedora Electronic Lab στο ΕΜΠ

Το Fedora Electronic Lab αποτελεί μία από τις μεγάλες προσπάθειες ένταξης της free & open source ιδεολογίας στον χώρο του hardware.

To FEL είναι ένα Fedora Spin, μια συλλογή foss ΕDA εργαλείων που έχει ως στόχο την βελτιστοποίηση της ροής του σχεδιασμού των hardware projects. Ενώνει τον κόσμο του free & open source software με τον κόσμο του hardware.

Αφορά τους τομείς :

  • της μικροηλεκτρονικής (VLSI)
  • του σχεδιασμού και της εξομοίωσης αναλογικών/ψηφιακών/mixed κυκλωμάτων (spice, pcb και άλλα εργαλεία CAD)
  • τον προγραμματισμό ICs (PICs, FPGAs, προγραμματισμός με VHDL/Verilog)
  • τον σχεδιασμό ενσωματωμένων συστημάτων
  • της διαχείρισης projects.

Η Κοινότητα Ελεύθερου Λογισμικού του ΕΜΠ σε συνεργασία με τον Fedora-el διοργανώνει μια παρουσίαση του Fedora Electronic Lab. Στην παρουσίαση θα γίνει περιγραφή των στόχων και των χαρακτηριστικών του FEL καθώς και παρουσίαση ορισμένων προγραμμάτων του. Η παρουσίαση θα γίνει την Πέμπτη 4 Ιουνίου στις 3 το μεσημέρι στο MOΠ (cc.ece.ntua) Γενικές Έδρες Κτίριο Β Δεύτερος Όροφος από τις σκάλες αριστερά.


FossComm 2009 : recap :)

Friday 8/5 was  quite a busy day. After I finished my courses  etc. and once again I headed for home through the hell that has been renamed to “national road” at mid-day (all thanks to my fellow Greeks who crash their cars every now and then).  Anyhow, when I finally arrived home I picked up my Fedora and FEL (Fedora Electronic Lab)  leaflets, my laptop and everything else I needed to go to FossComm 2009 along with Pierros and friends.

Well, the trip was fine and we had a stop at Volos for a bit greek meze and a little bit of tsipouro. Afterwards we went to Larissa , got to the Hotel and relaxed in our rooms. I also met there my friend Alexandros. Anyways, Friday was not as interesting as Saturday.

Next morning we were at the TEI of Larissa to prepare our booth for Fedora for the whole event (along with Christos Bacharakis, Thalia Papoutsaki and Pierros) ! We unpacked everything, from fliers to OLPC, plus I had my laptop to show some programs on FEL. All guys there did a great job organizing the event. The atmosphere was relaxing and also exciting.

I can’t describe how the night went. Α word that could describe most of the people that attended the feast at the tsipouradiko (tavern with lots of tsipouro and greek meze dishes) would be “kurumpelo” which means drunk, but I believe we were more or less drunk but very joyful and in a great mood for company. (But seriously, I have no idea how the guy with the bicycle ended up safe at his house…)

FossComm attendies, presenters, organizers etc all together :)
FossComm attendies, presenters, organizers etc all together 🙂

Now, let’s talk about Sunday 🙂 .  Pierros Papadeas ‘s presentation on the Fedora project went really well! He really made clear of the goals, the people that support it, explained the four foundations etc…It was cool. Dimitris Glezos presented Transifex. For those who don’t already know, it’s an open source project, a localization web platform already used by the Fedora Project (Dimitris is a member of th Fedora Board!) and Red Hat, developed by Dimitris and the rest of  Indifex ‘s (yeap, his company) engineers team.

My presentation on FEL went quite good. It happened during our Fedora 11 Hackfest. I had to point out the goals of FEL, some interesting features that has and that will have (thanks Chitlesh!). I also presented some very interesting tools for design and simulation of circuits. I also mentioned the advantages of FEL, live every other Spin of Fedora has. It was my first presentation and the audience was not very into electronics (except to 2 out of 20-25 people). I had to try not to become boring, so I had to make changes instantly to what I previously prepared to say. Not the best feeling but at the end it was fun and I gained a great experience.

On Monday the Fedora 11 Hackfest continued but I was absent due to a lab at my school I had to attend.

For even more interesting photos and videos —-> FTP Server of Linux Team

I’m glad this post is over because there’s a lot more that I have to post. Busy week, busy month, busy year…

My self at FossComm 2009 - FEL presentation
My self at FossComm 2009 - FEL presentation