Close

Sharper images

A project log for Atomic Force Microscope - from ground up

The aim of this project is to make high grade DIY or turnkey AFM.

100dollarhacker100dollarhacker 09/16/2025 at 12:590 Comments

I made modifications to software and was able to produce sharp cantilevers. Now let's try to make picture hopefully they will be sharp this time.

Connected everything together and debugging 'Approach'.  (Algorithm that controls both micro and nano movement, which lets cantilever land safely on the surface)

Glued the cantilever 

Now it seems to give consistent reading for landing.

Approach seems to be working now debugging new scanning algorithm.

Fixed some issues with the scan now getting (smooth results [with 500 jumps])

5500,5500,5500,6000,6000,6000,6000,6000,6000,6000,6000,6000,6000,6000,6000,6000,6500,5500,5500,5500,7000,6000,6000,6000,6000,6000,6500,6500,6500,6500,6500,5000,6500,6500,6500,6500,5500,5500,7000,5000,7000,5500,5500,5500,5000,6500,6000,6000,5000,5000,6500,5000,6000,6000,4500,4500,5000,5000,6500,5000,5000,6500,5000,6500,5500,5500,5000,5000,5000,5000,5000,6500,5000,6000,6000,6000,6000,5000,5000,5000,5000,6000,5000,6000,6000,6500,6500,5000,6500,4500,6500,5000,5000,6000,6000,6000,6000,5000,5000,5000,DONE!

Running few test reading from left to right and from right to left gives roughly the same numbers, which is excellent! 

I've added auto stop mechanism. If 'needle' has to go up/down too much it stops the program. It happens to me twice. Now I am not sure if this bug or my surface is not straight? (This is just a 3D printed plastic nobody insures it should be smooth in any way.)

First image of new algorithm:

I still haven't found the reason why I see this slope.  Maybe I need to let it cool down after approach.

Note: This is done without sharp cantilever, as I am still learning how to use it and parameters for smooth approach. 

I've made a fix to control steps size. Until now, I've used 10 steps hops. When, changed to 100 the results become more jumpy with ups and downs reaching 10,000 steps.

6000,8500,6000,6000,5500,4000,3000,3000,5500,5500,6000,5000,3000,4500,6500,4000,4000,5000,5000,4000,4000,3000,2500,3500,3500,3500,3000,3000,2000,4500,3000,4000,3500,2000,2000,12000 

On the other hand when set hop size of 1, terrain become flat (relatively to 10 hop steps).

14000,14000,14000,15500,14000,14000,14000,15000,14000,14000,14000,14000,13000,13500,13500,13500,13500,15500,13000,12500,12500,13500,13500,13500,12500,13000,13500,13500,13500,13500,13500,13500,13500,13500,13000,13500,13500,13000,12500,13500,13500,13500,13500,13500,14000,14000,13500,14000,13500,14000,13500,13500,14000,14000,14000,14000,13500,14000,14000,14000,13500,13500,14500,14000,14000,14500,14500,14000,14500,14500,14000,14000,14500,14500,14500,14500,14000,14000,14500,14500,14500,14500,16000,14500,14500,14500,13500,13500,13000,14000,14500,14500,15500,14000,14500,14500,14000,14000,13500,14500

Now it's time for last piece of the puzzle the sharp cantilever. I have only two of those since two were sent for SEM picture. Actually the quality is not bad of about 150nm. (I think it's pretty good for quartz fork+ Tungsten wire $5 price tag.)

Important note: Loading the sample and cantilever is quite straightforward. First, I am pulling delta stage as low as possible put the sample on it.

Then, I place the cantilever tip few millimeters away from the sample (using the screws). Once it done, run approach with steps of 10. It's fast enough (takes about five minutes) while safe enough not to brake the cantilever tip. (10 Delta stage sample roughly equals 10,000 nano positioner steps.)

Then press 'start scan button'

Got those image with hop length of 1

And with hop length of 10:

It looks like x-axis is not functional. 

Just realized that this might be not electrical problem but a property of the Quartz Fork. I've observed in the past that oscillation takes time to start or fade away. To test this hypothesis I've added 500 millisecond to each X movement when scanning. And got this 

Proving that X-axis is functioning if enough time is given.

Now, it's forming clusters. Now, it looks like surface as I thought it will look like.

I am getting some surface data, not sure what should I see here but it looks working. 

Only problem is that now it takes about a minute for a row. Since there are hundred rows it takes more than an hour to finish. Extremely slow. Maybe it's the price for not using factory ones. (Which is much accurately built than mine)

Another thing I've realized is that now algorithm stops when reaching +/-32,000. This is wrong if there is 'hole' we should get as low as possible but not stop the algorithm as tips will not be broken of it. 

Run some with new code and got:

It looks like a pattern (or maybe it's me that wants to see a pattern 😄 ). 

The blue lines I think are the main pattern and the red ones same pattern with phase. I don't know what is the reason for this phase or how to get rid of it. This is 10 samples hop image. I should run with 1 step hop size and see if it gets better. 

By the way the sample is CD-ROM surface I expect to see pits (valleys) of different lengths.

Another thing is that I played so much with this cantilever, probably I smashed into surface more than once. Anyway, I will try to reduce speed even more to see if it make images sharper.

After making another picture I've realized that this is not a phase shift but wrong left-right/ right-left placement on GUI. I am trying to take the data from those images and check if this is the problem. 

Here is the output without the bug (this is x10 magnification image):

I believe those green diagonal lines ( about 30 degrees) are pits of the data. I will try to rotate the sample and see if it keeps the proportion. 

Does it looks similar?

Well making an images with this device is not easy and time consuming. It gives a line every minute and most of the time surface is not straight and images are broken in the middle so all the process must be restarted from zero. 

Here is an example of me trying to re-adjust the height of Delta-Stage in the middle of scanning   

It partially successful as it takes too much time to update it to the right height.

Discussions