• Andrei Markin

My Homemade Electron Microscope With Subatomic Resolution

Updated: Jun 13, 2019

The goal: resolve individual atoms without breaking the bank!

This one is going to be slightly different from the rest of my posts. I'm not going to claim to be an expert on any of this stuff, I've never even seen an electron microscope or had much of a clue about how they work before this project. So this is going to be mainly a walk through of how I went about building one, and the traps for the home gamer.

Just as a warning: this project spanned around 6 months and ate up far too much free time. That being said, looking at individual atoms in your bedroom is pretty awesome!

The science

The type of electron microscope I want to make is called a scanning tunnelling electron microscope, usually referred to as an STM. This is the first type of electron microscope to be invented and in 1986 its discovery was awarded the Nobel Prize.

To go from Nobel Prize to constructing one on a DIY student budget in about 30 years just shows the amazing growth of electronics.

The basic principle is that if you make a needle, which at its tip is just a single atom, then bringing that close to a conductive surface will result in some electrons seamlessly moving between the surface and the tip. This is quantum tunnelling, it increases exponentially as the tip gets closer and in practice can be measured by applying a small voltage to the sample and measuring the current that flows into the tip. Moving the tip around the surface and recording the current measured at each point then gives you the topology of the surface, and if these movements are fine enough then you can even make out individual atoms!

This video explains it pretty well:

Making it

Making an electron microscope from scratch seems like a daunting challenge but if you break it down into the key components then it doesn't seem so bad. Here's the important parts:

  1. Vibration isolation

  2. STM body and course approach

  3. Shielding

  4. Power supply

  5. Piezo actuator

  6. Single atom tips

  7. Scanning electronics

  8. Signal capture and digitisation

  9. PID controller and software

  10. User interface

  11. Data processing

  12. Sample

I'll go through each one and the h̶a̶c̶k̶s̶ clever engineering that it took to get each one to work.

1. Vibration isolation

Trying to see individual atoms is quite fiddly, so any vibrations are definitely not welcome. In physics laboratories this is usually done by floating the whole lab on a separate foundation and inside having heavy steel tables floating on cushions of air to further block out nasty jitters.

This all sounds pretty unreasonable so you can see my solution in the cover photo.

Yes it's a heavy plate (a book will also work) riding on 4 party balloons and it works just fine. The cushion of air trapped by the balloons effectively blocks low frequencies, and a piece of foam under the scanning stage blocks high frequency vibrations. In fact this worked so well that I was even able the resolve single atoms on my 2nd floor bedroom desk.

2. STM body and course approach

The main body of the STM is made from two stacked 50 mm x 50 mm x 12 mm aluminium blocks. Aluminium is not the best choice here since it has a high thermal expansion coefficient. But it is easy to work with. Titanium would be a good choice if you had the tools to drill and cut it.

The two blocks sit on top of each other separated by 3 super fine adjustment screws ( which cost more than ALL of the other parts put together!) with the sample on an electrically isolated glass slide in between. The screws mate with a hole and a slot on the bottom block which locks it in place.

For reasons I'll discuss later the tip needs to get within about half a micron of the sample surface, which is why the tip is in between the front set of screws. Having the tip 1 mm from the front screws and about 20 mm from the rear screw means that a single turn of the rear screw only lowers the tip by 1/20 th of the screws pitch.

The pitch of these ridiculously expensive screws is 0.25 mm, so each revolution of the rear screw bring the tip ~ 12 um closer to the surface. This is called course approach.

3. Shielding

To measure quantum tunneling we are inevitably going to be working with very small signals. This means that we need high gain amplifiers which are very sensitive to interference. RF engineering is somewhat of a dark art but generally; the shield needs to be connected to signal ground, the thicker it is the lower the frequencies its going to block but skin effects make things complicated.

The solution I went for was a 0.1 mm copper plane underneath the scanning stage and a cardboard box covered in many layers of aluminium foil as a lid. This works pretty well in blocking out the pesky 50 Hz noise as well as the emissions from near switch mode power supplies.

4. Power supply

The electronics require 4 different power supply rails: +/- 5 V and +/- 15 V. The currents are all pretty small so the simple solution would be to power it from usb and use switch mode power supplies to step-up and/or invert the voltage. This however would need some serious filters and EMC considerations which I was not ready to do.

So I went with 2 audio transformers to get +/- 9 V and +/- 20 V. Then a capacitance multiplier filter using two BJTs in a Darlington pair to reduce the ripple. Two sets of linear regulators then drop the voltages to the required amounts and finally I added some resettable fuses on the output to stop the magic white smoke escaping.

5. Piezo actuator

This is the big one. The accuracy and stability of the tips movement basically defines the whole systems resolution and performance.

So you might be thinking; how do you even move something by a fraction of an atoms width?

Well, the answer comes from those annoying buzzers you get in some electronics:

Those buzzers are made of a crystal of sand. When you apply an electric field across the crystal (put some voltage on the two wires) the crystal bends from the middle outwards in a sort of bowing motion.

Way back in the 90's a legend called John Alexander figured out how to use these to make the actuator for an STM.

If you cut the top crystal electrode into quarters and glue the tip onto the middle, then apply an inverse electric field to opposing quarters, you can get the crystal to bend left and right, as well as up and down by applying an offset voltage to all segments:

So the first step in making one of these is to cut the top electrode into quarters. This turned out harder than expected but luckily the piezo crystals cost less than 10 p. John Alexander used a knife to scratch out the top silver electrode, but in my experience this also damaged the silicon dioxide crystal underneath.

The technique I found to work best was to etch the silver away using nitric acid;

first the whole element is painted with permanent marker to protect the brass from the acid. then a cross is lightly scratched out just the remove the permanent marker.

The element is then placed in nitric acid until the thin cross of silver dissolves (~20 seconds). This makes very even and undamaged piezo crystals, the permanent marker can then be removed with acetone.

An aluminium rod is then attached to the underside of the crystal with a screw terminal to hold the removable tips.

The tip MUST be electrically isolated from the crystal so a piece of glass is required as an insulator, I only had a sapphire disk laying around. A ceramic rod would work even better here.

The base of the crystal must then be attached to the STM body but must also be electrically isolated, therefore its glued onto a glass 'doughnut' which is glued onto the body.

Wires are then soldered to each quarter of the crystal and lead to connectors which lead to the main electronics.

To test out how much the tip actually moves in my setup I put the scanning stage into the focal plane of a confocal microscope, placed a piece of 0.6 mm wire into the tip holder and applied +/- 20 V to the x quarters and looked at the movement:

A little bit of guesstimation shows that my setup laterally moves the tip around 0.2 um / V, meaning that I should be able to resolve individual atoms by applying much smaller voltages.

This actuator is not perfect however. Piezo crystals always have some hysteresis, meaning that if you have a crystal at say 1 V, then apply 2 V and then go back to 1 V, the crystal will not be in the same place as it started. But for 10 p you can't ask for much better.

6. Single atom tips

For the scanner to work properly, only one atom of the tip can engage with the surface throughout a scan, so the tip must essentially be one atom wide. This might sound hard to make without fancy nano-engineering equipment but its actually quite simple.

The material of choice is tungsten. It's affordable, moderately resistant to oxidation and conveniently occurs in a crystalline form (or two). This means that just snapping tungsten wire results in a sharp point with usually a single atom at the tip.

This works as long as the sample surface is very flat, i.e if the tip is a single atom wide but not very pointy, then another part of the tip can catch on some other part of the surface which might be raised compared to the part interacting with the single atom tip.

Since I have access to a chemistry lab I therefore decided to etch tips with electrochemistry. Tungsten will dissolve in dilute potassium hydroxide if it is connected to the anode with a stainless steel cathode in the solution.

The analogy for this process is christmas canes. Anyone who has ever eaten one will know that they tend to make very sharp points by themselves:

Well the same thing happens to tungsten wire under electrolysis, here are some of my early attempts under a microscope:

You can see that they do get pretty sharp, the first one was left in for too long and started to round off, the second wasn't left in for long enough and the tip has not formed properly. But some reading with trial and error later I could make some pretty good tips:

Hard to see how sharp the point actually is, but it is very sharp!

That said I did also get the STM to work just by snapping tungsten wire with a pair of cutters at 45 degrees.

7. Scanning electronics

Ideally the scanner should have a spatial resolution of less than 0.05 nm, from the earlier experiments (200 nm / V) means that the scanner should be able to apply voltage in steps of at least 0.25 mV.

DC accurate digital to analogue converters (DAC) are also a bit of a dark art so I initially went with a completely over-killed design:

The idea was that I take a 8-channel 16-bit DAC with the best linearity I could find and use 2 channels for each output. The channels are fed into the summing junction of an inverting amplifier, so the first channel provides 2^16 big steps and the second another 2^16 finer (~1500 times smaller than the first channel) steps. Each combined 2-channel output is then monitored by a sigma-delta analogue to digital (ADC) converted and the whole thing can be kept dc accurate with a feedback loop.

An early prototype

This however proved to be completely unnecessary and the system was too slow. So instead I changed the reference voltage on the DAC to be 2.5 V and only used the big step output channel. this gave me 2^16 steps each with a step size of 2.5 V / 2^16 = 28 uV. More than enough for subatomic resolution, and actually means that many DAC steps will need to be used in a single step between pixels (points at which tunnelling current is measured). Combing step should drastically reduce the DAC's differential non-linearity and lower the integral non-linearity.

Another channel of the DAC was used to generate the bias for the sample, which was usually held at around -50 mV.

8. Signal capture and digitisation

This is the part of the electronics which measures to electrons that appear on the tip by quantum tunnelling.

Practically this is done by having an op-amp hold the tip at 0 V and measure the current it takes to do so. This is the circuit I initially used to do this because I already had all the part laying around:

It is a trans-impedance amplifier and it actually worked pretty well. The op-amp is trying to maintain both inputs at the same potential. The non-inverting input is grounded therefore the inverting input is kept at 0 V by the feedback, which is a 10 M resistor and a 1/11 divider.

So for every 1 nA of current that flows into the tip, the voltage on the output rises by 110 mV. This can easily be measured by an ADC and works as long as all the current flows through that 10 M resistor. But of course nothing is perfect and some current will leak into the board and flow into the input of the op-amp. Which is why low input bias current JFET op-amps are used and, in my design, all the components are mounted on top of the op-amp itself.

This circuit was later improved by providing a -5 V power rail and adding a few pF of capacitance across the feedback to stop the system oscillating. In future I plan to replace this with an LTC6268.

The signal is then sent to an ADC controlled by an STM32-F411RE microcontroller which runs the whole system. Initially I used the STM32's internal 12-bit ADC with many sample averages to filter out the noise and this was good enough.

The tunnelling current increases exponentially with distance, so to buildup an accurate surface topology, the microcontroller takes the log of the measured tunnelling current.

I later replaced the internal ADC with a 24-bit flexible resolution sigma-delta ADC but it didn't improve the images by much, and actually getting data from it was quite a code battle, but successful in the end:

24-bits of beautiful ADC data

The pre-amp is mounted right next to the tip to minimise losses but the electronics are off to the side and connected by screened cables

9. PID controller and software

Now that the microscope is more or less complete its time to start tuning the software. A major part of this is the control loop which keeps the tip at a constant height above the surface. This is done by having a set point for the desired tunnelling current (say 1 nA), then slowly turning the rear screw and having the tip approach the sample. The microcontroller is constantly checking the tunnelling current, if it gets too large (tip in too close) then it uses to piezo crystal to lift it up and tells the user to stop turning the screw in a sort of "I got this".

This feedback loop is not quite as simple as it sounds and there is a whole branch of engineering called control theory which is dedicated to problems like this.

The most common solution is a proportional–integral–derivative (PID) controller.

The simplest case of a PID loop works by measuring the difference between the current value and the set point (called the error) and increasing or decreasing the output by a multiple of that error, with the coefficient called Kp. The I and the D terms are more complex but there are many many YouTube videos out there if you want to learn more.

Here's a snippet of my code which does the PID loop, its actually pretty simple

The hard part was finding the PID constants, they have to be high enough so that the system is responsive but not too high as the system will go into oscillation and the piezo actuator will very quickly turn into a buzzer again.

The advise given to me by a professional control systems engineer was basically " crank them up until the system starts to oscillate and then back down a little bit"

So a bit of "fine tuning" later this is the result:

The red trace is the out output of the pre-amplifier (~110 mV per nA) and the blue trace is the voltage on the z electrode of the piezo (has a span of 0 -> -12V)

You can see that the tunnelling current is holding steady at the 1 nA, even with small jitters which are quickly corrected for by the PID loop. So the tip is floating just 1 nm above the surface! that is 1 millionth of a mm! already an impressive feat!

I found that in my setup, if you hold your tongue at the right angle while doing the course approach, you can get the tip to stay within the piezo actuators z range for around an hour before thermal expansion or contraction interferes.

10. User interface

Now the hardware of the STM is complete, it needs the PC side software to collect the tunnelling current and reconstruct the surface topology. To do this I chose processing which is a great IDE and has a good serial library which can talk to the STM32 inside the scanner.

This is the super simple user interface I came up with: it's got 3 buttons, Start / stop a scan, Save the acquired data into a text file and a mysterious white button which should not be pressed under any circumstances.

The way it works is that the parameters for the scan are defined at the top of the processing script; these include the size of the scan (n x n pixels), number of DAC steps to take in-between each pixel (essentially the zoom), resolution of the ADC (which determines the scan rate) and finally which mode to scan in.

The scanner can either scan by simple moving the tip all over the sample in a raster-like pattern (except at the end of a row the tip moves down and does the next row in reverse) and send back the measured tunnelling current values at each point.

Otherwise the scanner can keep the feedback loop running during the scan and send back the Z voltage needed to keep the tip at 1 nA tunnelling current at each point.

Here is a video of scanning in progress:

The data comes back in rows and is dynamically scaled; so the highest point is coloured pure red and the lowest point is pure blue, everything else is something in between.

11. Data Processing

Once the data is saved into a text file, it is ready for more advanced processing which is done in MATLAB.

The script takes in the text file, plots a surface which can be displayed (In the next section). The data however contains some artifacts from the scan. The main one being thermal drift; while scanning the whole microscope is pretty much always expanding or contracting, which leads to a slope in the data.

This can be corrected for by flattening the image to a string of ADC values, in theory this should average out to be 0 if the surface is flat, however this is how it usually looks:

A second order polynomial is then fitted to the data string and subtracted to flatten the surface while preserving the topology:

12. Sample

Another major consideration for STM is the sample to look at. You can't just put anything under like an optical microscope. The sample must be: conductive, super flat (even at the atomic level) and resistant to oxidation since I do not want to place this whole thing in a high vacuum chamber just yet.

All these considerations point to one element: carbon. Specifically graphite, and even more specifically a super flat version of graphite called highly orientated pyrolytic graphite (HOPG). HOPG can be made super flat by cleaving the surface; a block of HOPG is pressed onto some adhesive tape and pealed away. The surface of the tape is now covered with very flat overlapping graphene sheets which are prefect for STM. So perfect that this is usually the calibration sample for commercial STM's

HOPG on tape mounted on the STM scanning stage

Electrical connection is made to the sample (to apply the bias) by forcing it in between copper plates.

In hindsight the use of that PVC tape as a backing material may explain the large amount of thermal expansion I've been seeing.


Now, after months of work the STM is finally built and ready to scan. Lets turn it on and look at the first images!!!!!


Maybe that was a glitch, lets try it again!!


This is the harsh reality of trying to build something so complicated with so many parts that need to work together perfectly.

Debugging such an intricate machine takes far longer than actually building it.

The debugging process has so many steps, and even some steps that lead to negative progress so I will save it for a future post.

This post is now long enough and putting the results of all this effort at the bottom here would not do them justice.

So stay tuned for part 2, and see if all this effort was worth it!!!!

1,014 views0 comments

© Andrei Markin 2019

This site was designed with the
website builder. Create your website today.
Start Now