@ehsan66 Thank you for the detailed reply. The block diagram is appreciated, but I will have to print it out to examine it closely. Is there an on-line resource for this image? Also, are you also using an Asylum AFM or some other manufacturer? Please provide manufacturer and model number of the AFM to which you interface the ARC2 controller. BTW, that's a pretty nice "toy" you have there. I don't think I would tear into that either, while it is still in warranty!
What I "know" about AFM today is not based on personal experience with real equipment, but only what I "read in the papers" published on the subject. I did briefly follow all the excitement in the previous century, when the first scanning tunneling microscope was invented by IBM researchers Binnig and Rohrer. In the popular press of the time it was touted as being a revolutionary breakthrough, allowing scientists to see individual atoms for the first time. Yeah, riiight. But it was still quite remarkable and worth a Nobel prize in physics in 1986. AFM was demonstrated shortly after the STM, but it was based on cantilevered contact-force measurements instead of electron tunneling. AFAIK, AFM is still based on sensing the environment around a cantilevered probe by mechanical scanning of the target under the probe, whether that environmental sensing be mechanical forces, magnetic fields, electrical fields or whatever. The sensor and associated instrumentation may change, but the principle of precisely moving the target under a nearby cantilevered sensor has remained the same. There has been some improvement in the electronics since the 1980s.
I get the impression you are exciting the cantilevered beam with two frequencies in a non-contact measurement mode and somehow measuring the change in resonance as a function of sample position under the probe. Please elucidate how this is supposed to work, if that is indeed what you are doing.
No doubt I will have to do some on-line research and play catch-up to understand what you are trying to do. Are you also using an Asylum AFM? What AFM are you interfacing the ARC2 controller to?
Adding two sine waves together is not the same as mixing them, a non-linear multiplicative modulation process that yields sum and difference frequencies. For example, when two notes of different frequencies are sounded together in air, the ear will hear a "beat" frequency that is the difference in frequency between the notes. If the notes are close in frequency the beat is at a sub-audible frequency and is heard as amplitude modulation of the average frequency of the two tones. All this happens because the ear is a non-linear transducer. The original notes are still present, and with suitable instrumentation can be separated.
This appears to be what is going on with your two lock-in amplifiers separating the fourth harmonic components of the f1 /4 and f2 /4 excitation applied to the cantilever, which for some reason you haven't explained responds at the fourth harmonic of the excitation. I will have to take your word for that because I don't see two digital lock-in amplifiers implemented on the ARC2 block diagram, which is probably generic. The
literature does say two lock-in amplifiers are available in the FPGA.
As for solving your problem to create f1 /4 and f2 /4 from the summation of f1 and f2... that might be a lot easier if f1 and f2 were independently available and each was used to control two phase-locked sinusoidal signal generators operating at one fourth the reference frequencies. The outputs of the two generators would then be summed to drive the cantilever beam. Are f1 and f2 independently available, perhaps on BNC connectors?
I did half of that circuitry once in the 1970s using TTL discrete logic and a PLL integrated circuit to control a waveform generator that produced sine waves from triangle waves to generate sinusoidal audio tones for a psychology experiment that needed precise tonal values that could be digitally selected. Not high-fidelity sine waves by any stretch of the imagination, but good enough for anyone who didn't have "Golden Ears" to easily distinguish the notes. We could have improved it to lower the harmonic distortion created by the triangle-to-sine analog conversion but that wasn't necessary. Probably wouldn't be necessary to drive your cantilever either, at or near resonance.
I think two phase-locked loops generating f1 /4 and f2 /4 from f1 and f2 already summed could be made to work, but it would be difficult to separate f1 from f2 if they are "close together" in frequency. It appears they are not too close together if one is 150 kHz and the other is 160 kHz. OTOH, perhaps I misread what you wrote and one signal is at 150 Hz and it is supposed to amplitude modulate the 160 kHz signal, which appears to be what is happening with the waveform you presented as the cantilever excitation. Could you clarify that?
Just out of curiosity, what physical property causes the cantilever to respond at four times the excitation frequency? Dynamics was not my strongest physics subject.
Hop