Coarse approach


I recently motorized the coarse approach mechanism on my STM. The coarse approach is done by first fully extending the Z-piezo (reasonably slowly) to search for the surface. If it doesn’t find the surface, it fully retracts, and a stepper motor, which drives the rear fine-pitch screw on the STM, takes a few steps to move the tip close to the sample. The distance it moves is somewhat less than the Z-piezo travel. After moving the motor, the Z-piezo fully extends again to search for the sample surface. This process repeats until the piezo finds the surface. When this happens, the Z-piezo retracts one more time, and the motor adjusts the piezo height above the sample so that, when the scanner extends one last time, it will find the sample at about the center of its travel range (just to give it some room to drift in either direction). Once the sample surface is found the Z-feedback loop switches on, and scanning begins.

Here are some images zooming in on a gold surface taken after doing a motorized coarse approach. Note the lack of craters! I’ve applied some lighting effects in Gwyddion to help make the edges of the atomic terraces more apparent. No luck resolving individual atoms on metals yet though… I believe the issue is acoustic noise. Time to build a sound-proof box…

This technique is called the “woodpecker” approach, and it prevents vibrations from the motor from crashing the tip, since only the Z-piezo brings the tip and sample into contact. Since the hard part is done by the piezo, the motor step size only needs to be smaller than the piezo range, although it’s nice to have a smaller step size to be able to center the scanner in its travel range before beginning the scan.

My scanner has about 700 nm vertical travel. Creating steps much smaller than this with a stepper motor is really no problem at all, especially since we don’t care about backlash. I used the 28byj-48 stepper motor to drive the rear fine-pitch screw on the STM. I milled a slot in the end of the screw’s plastic knob that fits over the motor shaft, while allowing the screw to move up and down. The 28byj-48 motor is very cheap and is geared down to about 2048 full steps/revolution. The fine screw moves 250 um/revolution, and the STM body’s lever reduction reduces the motion by a factor of about 20. This gives a step size of 250um/2048/20 = 6 nm.


There are a few subtleties that came up here: when the Z-feedback is switched on, the integral term first must be initialized to the current Z-value. Otherwise, the feedback will cause a small jump in the Z-piezo when it’s switched on, which crashes the tip! Took me a while to figure out why I was still seeing craters in my scans! Another issue is thermal drift. The motor produces a substantial amount of heat, which can cause the scanner to drift out of range within minutes. The solution is simply to turn the motor off when it’s not moving, i.e. when the piezo is extending and when the scan starts. This means that we can’t use microstepping, which is I used a geared motor in the first place. I’m also running the motor on 3.3V rather than 5V to further reduce heating.


20 thoughts on “Coarse approach

  1. I love your project and it has inspired me to build my own to help me with my research. Thanks for all the work you have done. I hope one day I can inspire people just as you have.

    I was wondering, knowing what you know now what would you change or improve on to get better accuracy or make it easier to use? You had listed some other options for op amps and said you were using better DACs now. What are important features I should be looking out for (besides bias) when choosing an op amp or DAC or ADC for that matter. I wanted to go with 24bits since it seems in every STM project the builder lists that as a barrier. Another question is do you think it would be better to split the Analog electronics (sensing and drive) onto 2 boards or will the wiring just create unnecessary noise?

    I am sure you have seen the project on Hack a day that implements your guard ring suggestion in the pre-amp. My plan right now is to use that design for the pre-amp.

    I have found some 50-60mm piezo discs I was hoping would increase the range of movement for the tip due to their larger size. I will probably need to adjust the driving voltage too just as the voltage needs to be higher with the piezo tubes. Do I need to make sure they have a certain frequency or is that not so important? I also want to automate the coarse movement but I would like to use the sample stage for the coarse movement. I will be building the frame large enough that I can get more distance between the head and the stage to make it more accessible without knocking into things.


    • Hey Martin,

      There are plenty of things I’m currently working on to make it easier to use, mostly on the software side though. For driving the scanner, you mainly need to look for low noise. I’m currently using TL07x which are dirt cheap and perform just fine since the SNR is still adequate for atomic resolution scans on HOPG. Op-amp noise isn’t the limiting factor for me even with these. The scanner DAC should also have low noise and low glitch energy. The DAC’s voltage reference needs to be filtered to reduce noise. Some audio DACs will probably work well, I’ve experimented a bit with PCM1798 and have a design in progress using those. It’s 24-bit with very good SNR.

      The preamp performance is more important the ADC’s. You don’t as much resolution with the ADC since the tunnel current signal is so sensitive already. I don’t think there’s much benefit to separating the sensing and drive onto separate boards since the signal coming in has already been amplified by the preamp.

      I’m also using a guard ring on my preamp now, just make sure to clean all the flux off the board after soldering or you might get huge leakage currents!

      A larger piezo disc will probably give you a larger range of motion with the same drive voltages, but the resonant frequencies are lower so they might be more vulnerable to vibrations and won’t be able to scan as fast.



      • Wow thanks for the quick response. So much information. I was looking over your parts list and I was wondering what voltage caps you were using (16v?) and what %? Is there a reason for the different sizes you used for some of the Tantalums when the same specs are available or did you just have those on hand?

        Thanks again,


      • The caps should be rated for significantly higher voltage than what they’re being subjected to, so don’t use 16V caps for 15V power supplies. Use something like 25V instead. For ceramics, I usually use 50V rated caps for 15V supplies because their capacitance can vary with the applied voltage. You can avoid this effect by choosing ceramic caps with significantly higher voltage rating than what you’re applying.

        The smaller tantalum caps in the design are used on 5V and 3.3V supplies and they are rated for lower voltages (probably 10V but I can’t remember).



  2. I would like to ask how did you move the tip(or the platform) to achieve scanning for rows and columns? Did u use servos or piezoelectric? Or u just simply tilt the scanning pin? Thx!


  3. Hi Dan,
    I’ve been wondering for a while and I would like to know how did you manage to assemble the sample holder.
    Do you use a metal base with the wire soldered and attach the sample with conductive tape or you have another method?


    • First, here’s a piece of thin glass (microscope coverslip) glued to the aluminum base of the STM to insulate the sample from the grounded base. There’s a steel nut glue on top of that as a spacer and a magnet glued on top of that. The bias wire is soldered directly to the magnet. Make sure to use a nickel plated NdFeB magnet and make the solder joint quickly to avoid depoling the magnet.
      To mount a sample, I glue it to a magnetic disc or coin and use a small blob of conductive ink to make an electrical connection between the disc and the sample. Then just place it on the magnet. This way you can easily swap out samples.


  4. Nice blog, Thank you verry much to create guiline to make STM,
    I’m developer recently create software on HF STEM,
    Now I’ll to make a STEM on my own and your blog is verry useful.

    Greate day.

    Liked by 1 person

  5. hey dan! kar here, postdoc working on UHV and STM system. I and my friend are trying to construct an STM project based on your homemade STM. Hope we can do it.


    • Hi Matthias,

      Looks great, nice job on the acoustic isolation! Since the resonant frequency of the structure is so low, I don’t think there’s any need for magnetic damping (and the way I implemented mine is really not optimal), as long as the scan head is rigid.

      I’m working on several upgrades and hopefully will post some updates soon.



  6. Hi,

    Is the heat of the motor transferring to the scanner through the aluminium rods used to secure it or through the brass rotating end or it’s neither of them.
    In the first case, you could just secure the motor to some sort of frame that isn’t connected to the scanner head.



    • Hi Thomas,
      The motor couples to a plastic knob on the screw, so it’s probably mostly transferred through the aluminum standoffs. I should have used plastic.
      The motor in my case does need to be mounted to the top part of the scan head, because that part can tilt.


  7. Hi Dan,

    i`m quite impressed! It seems to work very nice and yet its very simple constructed! Are you going to use one or still three stepper motors in your upcoming design? Im kind of surprised, that the motor heating is becoming an issue, i wouldnt never expected that. I´m still planing to use three of them, so we`ll see if i can solve this problem sufficiently.
    Regarding the piezo drivers, i´m currently prefer to use some high voltage op amps in a bridge configuration (e.g. Apex PA240, Apex PA340 or Apex PA443 (dual)). This makes the whole story quite easy to handle and especially the PA443 offers very good noise characteristics.
    Due to some time demanding events at my phd thesis i wasnt able to find enough time to create a hackaday-project, but this will come.



    • Hi Matthias,

      I’ll probably stick to 3 motors in the upcoming design, because they’re so cheap, and that design eliminates manual adjustment and tilting of the head.

      The PA240/PA340 have too much noise, but the PA443 actually looks pretty good! And the price isn’t too bad either. I hadn’t seen that one before, looks like a new product. The best thing out there is probably the PA95, but the PA443 isn’t far behind in terms of noise. Doing a quick estimate, looks like this will give about ~3 pm p-p noise at 10 kHz bandwidth for the tube I have, with 1 um Z travel. I’d say that’s good enough! I’ll probably go ahead and use this amp too, just to simplify the design.

      EDIT: whoops, I meant 3 pm, not fm.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s