Piezoelectric controller

A project log for Atomic Force Microscope - from ground up

The aim of this project is to make high grade all diy AFM.

100dollarhacker100dollarhacker 08/16/2023 at 04:120 Comments

This basically DAC which takes input from I2C. In my case this is Arduino nano as a master.

All other connections are the output and other configurations of the DAC chip. (Like reference,gain etc.)

The next step will be making Arduino and DAC talk over I2C and watch for change on A,B,C and D outputs.

Actually, this stage of I2C or Arduino to DAC went smoothly even beyond my expectations.

All I had to do is to disable input code (since we are not going to use same input) and change LDAC pin (since we are using nano) and vaila! 

Here is simple code 

And the output:

The next step is to connect converter from 0-5v to  (-12) - (+12)v but it's very technical and I don't expect any trouble with that.

As expected, connecting the op-amp was quite straightforward. Although I found bug in OpenAFM schematic (or my coping it), the gain of DAC should be connected to 5v so the total output should be from 0 to 2*Vref. Plus connecting the power supply we get this:

The output is not simetrical around 0v but this can be fixed by changing reference voltage for op-amp. Voltage is not fully rail-to-rail, but it can be fixed by taking bigger resistors as feedback. The problem is that I have that noise (the thick line) I believe it's due to the fact that I use bread board and not PCB with suggested layout.

I think I done with this part of the project