Arun's Tech Blog


Electron Microscopy

Here is an update on the electromechanical systems wafer I made an earlier post about. We took some samples over to UIC medical district and got some scanning electron microscopy done. Unfortunately in our NCF both the reactive ion etcher and deep reactive ion etch were down but Professor Paprotny was able to gain use of the clean room at Berkley to get some etching done on a trip. Very cool images from some very cool theory.

Transmission Electron Microscope
This is the transmission electron microscope. We didn’t use this one ourselves as our devices are comparably large to the resolution this machine has. It can get down to scales of only a few nanometers even with its original build date being in the 90s!

Scanning Electron Microscope
This is the scanning electron microscope, made by Hitachi. This is what we used for all of our images.

Device joint
A T joint in our device between an actuator and needle. The resolution and detail is mind boggling.

Oh no! Dust!

Full Device
Absolutely beautiful full device

All thats left now is to test the devices themselves. Hopefully our devices won’t incinerate themselves!

USRP/GNURadio Build From Source Guide

USRP - B200

This is a build guide for GNURadio / UHD which I received from Ettus Research in a support session. It should allows anyone, even someone new to Linux to get a USRP working, regardless of the hardware revision. I in no way wrote this guide. Absolutely all credit goes to the engineers at Ettus Research who wrote this guide and sent it to me during a support session. However, I in all my highly skilled googling was not able to find this guide or something like it on the USRP/GNURadio wiki site, or really anywhere else. I know there must be some other frustrated souls out there trying to get PyBombs to work or attempting to compile on up-to-date Linux distro’s so I thought I would post this here in the hopes of saving someone going through dependency hell only to find out that it doesn’t work on their version of Linux for god knows what reason. So… here it is:

1. Start with a brand-new virgin Ubuntu 14.04.3 (64-bit) installation. Make sure that the USRP is disconnected.

2. Once Ubuntu is installed, run the Software Updater, and download and install any updates. You can do this from the command line with:
sudo apt-get update

3. Install the necessary dependencies by running:
sudo apt-get install pv
sudo apt-get install git
sudo apt-get install qgit
sudo apt-get install swig
sudo apt-get install cmake
sudo apt-get install cmake-gui
sudo apt-get install tree
sudo apt-get install htop
sudo apt-get install doxygen
sudo apt-get install graphviz
sudo apt-get install libtool
sudo apt-get install libusb-1.0-0
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libudev-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libncurses5-dev
sudo apt-get install libfftw3-bin libfftw3-dev libfftw3-doc
sudo apt-get install libcppunit-1.13-0 libcppunit-dev libcppunit-doc
sudo apt-get install ncurses-bin
sudo apt-get install cpufrequtils
sudo apt-get install build-essential
sudo apt-get install python-opengl
sudo apt-get install python-pyudev
sudo apt-get install python-docutils
sudo apt-get install python-cheetah
sudo apt-get install python-zmq
sudo apt-get install python-mako
sudo apt-get install python-numpy
sudo apt-get install python-numpy-doc
sudo apt-get install python-numpy-dbg
sudo apt-get install python-scipy
sudo apt-get install python-qt4
sudo apt-get install python-qt4-doc
sudo apt-get install qt4-doc
sudo apt-get install python-gtk2 python-gtk2-dbg python-gtk2-dev python-gtk2-doc python-gtk2-tutorial
sudo apt-get install gsl-bin gsl-ref-html gsl-ref-psdoc gsl-doc-info gsl-doc-pdf libgsl0-dbg libgsl0-dev libgsl0ldbl
sudo apt-get install python-wxgtk2.8 python-wxgtk2.8-dbg python-wxtools
sudo apt-get install python-lxml python-lxml-dbg python-lxml-doc
sudo apt-get install python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-sql python-qt4-sql-dbg
sudo apt-get install libqwt5-qt4 libqwt5-qt4-dev libqwt5-doc python-qwt5-qt4 python-qwt5-doc python-guiqwt
sudo apt-get install liblog4c3 liblog4c-doc liblog4c-dev liblog4cplus-1.0-4 liblog4cplus-dbg liblog4cplus-dev liblog4cpp5 liblog4cpp5-dev liblog4cpp-doc
sudo apt-get install libsdl1.2debian libsdl1.2-dev libsdl1.2-dbg libsdl-image1.2 libsdl-image1.2-dbg libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dbg libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dbg libsdl-net1.2-dev libsdl-sound1.2 libsdl-sound1.2-dev
sudo apt-get install libzmq3 libzmq3-dev libzmqpp3 libzmqpp-dev

4. Upgrade the kernel to version 3.16 by running:
sudo apt-get install linux-generic-lts-utopic

5. Reboot the system.

6. Download, build, and install UHD 3.9.2:
cd $HOME
mkdir workarea-uhd
cd workarea-uhd
git clone
cd uhd
git checkout release_003_009_002
cd host
mkdir build
cd build
cmake ../
make test
sudo make install
sudo ldconfig

7. Add the line below to the end of your $HOME/.bashrc file:
export LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

8. Install GNU Radio 3.7.9:
cd $HOME
mkdir workarea-gr
cd workarea-gr
git clone –recursive
cd gnuradio
git checkout v3.7.9
mkdir build
cd build
cmake ../
make test
sudo make install
sudo ldconfig

9. On Linux, udev handles USB plug and unplug events. The following commands install a udev rule so that non-root users may access the device. This step is only necessary for devices that use USB to connect to the host computer, such as the B200, B210, and B200mini.
cd $HOME/workarea-uhd/uhd/host/utils
sudo cp uhd-usrp.rules /etc/udev/rules.d/
sudo udevadm control –reload-rules
sudo udevadm trigger

10. For USRP devices that use Ethernet to connect to the host computer, such as the N200, N210, X300, X310, set the IP address of your system to, with a netmask of The default IP address of the USRP is, with a netmask of You should probably set the IP address using Network Manager. If you set the IP address from the command line, Network Manager will probably overwrite this.

11. Log out of the system, and log back in, to be sure that all changes to your environment have taken effect.

12. You should now be all set. Connect the USRP, and open a terminal window. Run “uhd_find_devices” and “uhd_usrp_probe”, and then launch GRC by running “gnuradio-companion”.

Once again all credit goes to the engineers at Ettus and I’d also like to thank them for their quick, courteous and incredibly helpful support.

My First Wafer!

Finished processing the first layer on my first microelectromechanical systems device wafer today! Took it through the entire process. Cleaning -> Chromium deposit -> Gold deposit -> L-edit design -> Masks made offsite -> Cleaning -> HMDS spin-on -> Photoresist spin-on -> Prebake -> Exposure -> Postbake -> Development -> Gold etch -> Chrome etch -> Resist strip. The devices on the images below are on at a micron scale. Lets take a look!

Wafer processing - microscope
Who would have guessed that one day I would use a microscope for something actually useful?

Wafer processing - development
Photoresist development looks spot on – disregard the dirty microscope lense

Wafer processing - low zoom
Alright! The thicker beams are definitely etched well but it looks as if the 4-micron beam may be overetched

Wafer processing - high zoom
Perfect(to nitpick there does appear to be a small section of chromium exposed)! But that beam is a little less than four microns wide!

There is something incredibly gratifying about manufacturing something at what could be a professional level of quality, especially at this size. Also, I managed to not be the guy who breaks the $200 dollar production wafer! After this, I definitely appreciate those Intel MOSFET gate lengths of 14 nanometers a lot more. This was done on a silicon on insulator wafer. The gold layer itself isn’t particularly interesting as the gold/chromium is used exclusively for contacts and reducing the resistivity in certain areas of the device. Next up is the device layer photolithography but with deep reactive ion etching instead of a wet-etch. And finally a wet release etch of the buried oxide to make the devices fully functional. Stay tuned!

New rocket build: Apogee Level 2 Rocket kit

Update: Flawless launch and recovery! Unfortunately I was too distracted during the actual launch to take a picture.

Rocket Build - after flight
Safely on the ground
Rocket Build - Ready to launch
Ready for launch

Very fun build. Still waiting for it’s maiden launch.

Rocket Build - Rocket Overall
Rocket Build - High Heat Coating/Retainer
High Heat Coating/Engine Retainer
Rocket Build - Fillets
Rocket Build - E-Bay
Electronics bay and first paint
Rocket Build - Coming together
Coming together
Rocket Build - Sanding
Endless sanding
Rocket Build - First Epoxy is set
First Epoxy is set

Old school cabling (Courtesy of the Smithsonian)

These pictures are from the Aerospace Smithsonian, the first few are of a power-distribution-unit from the Space Shuttle and show some, surprisingly, messy looking cabling. However, in their defense, it is pretty neat and I doubt visual aesthetics were any where near as important as using the shortest cable paths due to weight concerns. Also surprising, the cables exhibit minimal insulation. Once again I would think this is attributed to weight concerns yet as it is such a critical component I would have expected something sturdier so as to avoid any possible complication that could be brought about by a short or disconnect due to mechanical failure from the violent launch. Lastly there is a large soldered circuit which was a part of an exhibit labeled as a Minute Man Missile Guidance system. While there was no further information on the system this one part was particularly interesting as based on the look of the connections and the design of the original component it looks like it could be a FPGA so large that someone can solder the connections themselves.

Power Supply Pic 1

Power Supply Pic 2

Power Supply Pic 3

Minuteman FPGA

Lessons from electronics in rockets

During Battle of the Rockets the UIC AIAA team got to see some pretty serious rockets shoot off as well as fire one of our own. If only once. The team trecked down to Virginia in a couple vans to join several other universities in several competitions. For the largest competition, there was an autonomous rover to be built and deployed by our largest rocket and although I was happy with where the rover had gotten to after only a week or two of non-stop emergency construction, we never got to see it work due to a failure in the main parachute deployment system. There is not much to be learned from an electronics standpoint when your work gets slammed into a pile of rocks at 150mph but there is at least one lesson to be learned and some pretty cool pictures to look at as well.

Completed Rover
The completed rover (sorry for potato quality image)

Destroyed rover
Casing and what was left of the electronics after the crash

Support rod gore
Steel support struts after autopsy

It really amazed me what a less than 4lb rover can do to some quarter inch steel rods at those speeds.

Exploded batteries
Homemade 12-volt battery

And here we have the one and only lesson I was able to pull from this competition. As you can see this is our homemade 12-volt battery for powering the DC motors and while the individual cells do not appear to have suffered catastrophic structural damage they have spewed acid and appear to have melted the nylon-strapping tape in some areas. The force of the impact of the rocket crashing had been so violent that some of the soldered on leads for the motors and transistors had broken off and caused a short circuit. Although we can’t expect our electronics to survive such a crash and it did not cause any more damage than the rocket did, in the future we can take away that batteries should always be fused and done so as close to the battery as possible. If this had been a battery the size of a laptop or something like a hybrid car battery a fire would have almost surely started and possibly caused a serious saftey issue.

Hopefully in the future we’ll get to see some of our electronics perform their missions as designed but altogether it still was a very fun trip with some excellent launches!

A case study in C with Bubble Pop

The C language is a particularly interesting language to code in. While most, perhaps, would not prefer it as the language of choice for anything save OS application or Firmware, its abstraction level allows for coders to see quite easily what the machine that is running their program is doing at an assembly language level. Now one may argue that unless I have a specialized task that requires stringent knowledge of the low level workings of my code it is far better to use a high level, OOP language such as python where far more seasoned programmers have developed, tested, and hopefully perfected large numbers of helper functions and convenient data structures. I do agree with the previously mentioned attitude when trying to functionally produce some software within real world contraints. However, C offers another itself up for another use, as a learning tool. This is why in this blog post I will delve into my personal C learning tool, a case study in C by means of a Bubble Pop implmentation. It covers everything from abstract data types to pass by pointer semantics and even some ncurses.

First as I prefer to learn in code lets get the source and compile it so we can have something to look at other than my mediocre writing. Download the source off my github then, navigate into the folder and enter “make install” this will install gcc and the ncurses library if you do not have them already and finally compile the source code. More to follow…

Intelligence level password security

One of the most common problems in security I enounter as a security aware person is password generation and remembrance. Where can a person, especially a non tech-savy user, come up with secure randomly generated passwords; how can they remember them? If I have trouble as a tech savy professional how could the average user of a secure system, maintain private and random passcodes? Add in intelligence level activities such as sneak-n-peak warrants, or illegal searches by foreign intelligence services and what hope have we of maintaining the security of and remembering 10-20 mixed character passcodes. Furthermore, past hacking has show that the personal computers of secure users, even the most intelligent, can be compromised through a variety of methods. This adds another level of difficulty for non-tech-savy users, for example, during an investiagtion of a serious Nasdaq computer system hacking event, “Investigators also discovered that the website run by One Liberty Plaza’s building management company had been laced with a Russian-made exploit kit known as Blackhole, infecting tenants who visited the page to pay bills or do other maintenance.” (Bloomberg).

Even if users do not log into secure systems from compromised devices, there is the serious issue of multiple use passwords. Even I am guilty of using passwords across different systems for easy remembrance. What are the chances that 1 of a 100 users uses the same password for their banking account as a secure system? Quite high I would hazard. So, how could we fix this tantalizing issue, and in a manner easy enough for the lowest common denominator user. For inspiration, I will look to the genious of past cryptographers, particularly Frank Miller, and his invention of the One-Time-Pad.

At first glance their may not much use for a randomized one-time-pad in passcode security but with minimalistic brainpower it can transform into a passcode booklet and turn the standard “1234” into a truly secure passcode. I do this by using what I call a numerical pattern transformation. In essence, the process maps a numerical value to a personal positional transformation. The most simple of these in my mind is 1st digit maps to a page, 2nd digit to a row, 3rd to a collumn and 4th to a digit. PINs can be much longer and transformations complex but this serves as an easy example:

A sample transformation for an 8 digit password with PIN 1234
Pattern Transform Example
With transformations like this users can easily recall complex random symbol passwords with minimal effort and still maintain security if a passbook is stolen, lost or compromised. Furthermore, other pattern transformations can be invented on a person to person basis to complicate and differentiate simple same passwords. For an example one can easily remember the numerical transformation 1234 -> 4321. Suddenly, a simple birthyear password can be come nearly unbreakable. One can take their birth year, 1992 in my case, and reverse it and result in 2991. Or instead of a numerical transform I could map the 1st digit to a row, 2nd to a collumn, 3rd to a page, and 4th to a digit. One can even add misleading underlines and other markings to throw off a would be password thief or create new transformations such as: 1st digit -> respective page, 2nd digit -> respective underlined character, 3rd digit -> digit offset, 4th digit -> additive transform.


2222: go to second page, find second underline, move 2 characters to the right, read the password off adding 2 to each number

At first the method may seem slightly complicated. However, compared to a 6-20 digit password containing letters, number, and symbols, it is much easier and maintains system security with a physical compromise of a passcode booklet. Even if you don’t use the ideas directly, hopefully I have given you some ideas on maintaining complex password security on a scalable level, one can never be too secure or underestimate the poor password choices of a user left to their own devices.

Airfoil analysis by scripts

A common issue encountered in many fields of engineering is the inability to analyze large sets of data due to limitations of skilled man power availability. I in particular have encountered this issue during my time as aerodynamics lead for the UIC AIAA DBF 2014/2015 team. In particular one of the first decisions to be made involving true quantitative analysis was to pick an airfoil for the main wing. While on the surface this issue may seem near trivial -read to find desirable characteristics for the given mission profile and pick an airfoil exhibiting them- the reality is that there are thousands of different airfoils available from just the UIUC database. And, with only a few team members, wading through the excess of choice was quite a problem. However, I have conquered this problem, with what you ask? SCRIPTING!

Now for some quick background on the aerodynamics of airfoils. Airfoils exhibit several different properties based on their geometry, the most prevalent of which, concerning behavior, are: thickness to length, curvature, and camber. Depending on these characteristics, the airfoil will produce different forces and moments (when used in a wing) depending on the speed of the air flowing around them (as well as the wings design). So long as the airflow is fast enough, these forces and moments can be calculated with some relatively simple equations involving unitless coefficients. The most important of these are coefficients of drag, lift, and moment. Out of these the main behavioral characteristics we desired were: negative rate of change of Cm with respect to angle of attack, stall angle ( alpha [angle of attack] for the maximum Cl/Cd), low Cd (generally indicating low stall speed), low Cm (small tail means less drag), and finally a reasonable Cl so the wing area is not too large.

Once we have some well defined desirable characteristics, how do we determine them from any given airfoil? Surprisingly, the first part of the question is quite easy to solve. It is done by using an excellent program written by some MIT aerospace engineers and is known as xfoil. Basically, it is a command line program which, for some reason is in a large number of aptitude and yum repositories, allows you to enter several simulation parameters, chose a simulation method, load an airfoil and do some math I don’t understand to magically obtain the needed airfoil characteristics described above. For those interested in details on using the program, the documentation is quite good.

XFLR5/xfoil screenshot
A screenshot from XFLR5 of a xfoil analysis

Ok, now that we can do everything needed at the command prompt the task is basically done. With a little BASH scripting we don’t need to do much other than assemble our desired commands and run them in xfoil for each airfoil, then we use mat lab to load all the analyses, iterate over them and use some simple if blocks to separate out the desired airfoils and push them to an array. The array is then printed, including the desired characteristics and the team can sort out from the much smaller selection of airfoils the one to be used.

The particular scripts I used to do this have been put on my gitHub. There is a readme explaining the scripts and how to use them but they go like this: the first bash script downloads and formats the files to be used with xfoil. The second bash script writes the needed commands to a file for each airfoil and then runs xfoil with its STDIN hooked up to the file. Finally, the mat lab script loads all the analyses generated by xfoil, uses several mat lab functions to simplify the mathematics to a triviality in code and separates out the desired airfoils. Annnd thats it, a medium/big data analysis thrown together with nothing but scripting! Good luck to anyone else trying to script large tasks to simplify their work, we really are living in the future!

© Copyright 2015, All Rights Reserved