The prototype autonomous motor controller is working well. Here is how it works. On boot up, the SparkFun ESP32 "Thing" looks for a specific WiFi. I use an inexpensive WiFi extender as a stand-alone access point not connected to the Internet. It reports the IP address on a 2 line LCD display. I use my cell phone to connect to the same access point. A simple web page allows me to type in the frequency and the controller automatically tunes the loop to the desired frequency.
I made a custom 3D printed hub on the variable capacitor to locate the fully meshed position. Note the IR detector. The slots in the hub are located at 0 deg and 45 deg. One slot aligns with the fully meshed position.
Once the fully meshed position is located, the frequency of that position is measured by sweeping the clock generator and following the output of the RF log amplifier. From that point on the direction of movement can be associated with the increase or decrease of resonant frequency.
During tuning, the desired frequency is approached at full speed as the resonance is detected with repeated frequency sweeps. The motor slows when the system is getting close to the desired position. The motor is stopped near the final position. It is then "jogged" in small steps (in either direction depending on the frequency reading). This can get the frequency to within about 5 KHz of the target.
Note in the picture that there are now two toroids used. One is for the clock generator and one is for the log amp. A latching relay shorts the secondary of both transformers to protect the tuning circuitry during full power operation of the loop. This shorting mechanism is as yet untested.
My next task is to power the whole system from a Lipo battery. It requires 5 v at about 30 mA when operating. I need a control for the LCD backlight, but otherwise it should be able to idle a relatively low power. I am worried that the 3.8 v to 5 v converter may inject noise at the RF frequencies of the loop.