littleboot / ACRE

Absolute Capacitive Rotary Encoder (ACRE)
MIT License
26 stars 5 forks source link

Doubts #1

Open Glentronics opened 11 months ago

Glentronics commented 11 months ago

Hi littleboot,

thank you for sharing your ACRE project, it's very interesting.

I have some questions:

Many compliments again, Glen

littleboot commented 11 months ago

Hi Glen, Thank you for your interest in the project. It been a while since I did anything related to this project, I was hoping by sharing it online the unanswered questions related to the signal generation would be answered (as of writing this does not seem to be the case). I basically reversed engineered a caliper and made it work without an ASIC by trial and error. That said I may be able to answer your questions partly or point you in the right direction.

Did you have a look at the "ACRE/docs" folder it contains a the "caliper ASIC design" documents that go into more detail, it includes a equivalent circuit diagram and math equations.

"Having 16 transmitting electrodes, aka 16 SPWM signals, will it improve the resolution?" I'm not sure, I assume it does not because you introduce more error due to the non ideal gaps between the electrode plates. The resolution seems to be determined by the sample count and the physical dimensions of the structure.

So reducing the total structure size or increasing the sample size should yield an increased resolution. See ACRE/docs folder for ASIC design paper.:

minimum resolution. The above equation is in the period T, the displacement change ΔT caused by the determination of the displacement, and the variation of each cycle represents the displacement of 5.08 mm, so that the measurement is too rough, but as described above, The minimum time unit is ɸ, and each cycle T = 512 ɸ, in the periodic signal, according to each ɸ represents a phase,
The entire signal period is decomposed into 512 phases, and the displacement distance ΔS corresponding to each phase change is naturally:
ΔS = W / 512 = (5.08 / 512) mm = 0.009921875mm ≈ 0.01mm
Or ΔS = 0.2 / 512inch = 0.000390625inch. Therefore, the minimum resolution of the digital caliper designed in this paper is 0.01mm.

Also have a look at a caliper ASCIC datasheet, it contains examples on the smaller electrode structures GC7626C - datasheet chinees.pdf (see EEVBLOG forum post). Here the circle is divided into multiple parts. I created a structure so the 8 signal electrodes cover the 360 degrees making it absolute over the whole rotation angle. The phase angle is tracked so when it goes from 360 to 0 = +1 (clockwise rotation) when it goes from 0 to 360 = -1 structure size. image image image image

Which is the ideal ratio between the PWM frequency and the Sine modulator frequency? (eg. 100kHz PWM and 500Hz Sine could be ok?) I found that the frequency does not seem to matter very much. See it as a single sine wave modulated on a higher frequency carrier signal (DC is blocked by a capacitor). Changing the carrier frequency (change timer speed in code see timer_config function) seems to affect the amplitude of the received signal. This can be explained by the capacitor impedance being dependent on frequency. The capacitance itself is the result of the electrode size and spacing.

How is the fixed interval for the bias signal chosen? How to choose the sampling frequency? I reversed engineered a caliper to get the bias signal interval : I found this by applying a high impedance voltage to the receiver electrode of a caliper. (10Meg pullup or something, so the electrode was held loosely at 1.5V, connected a voltage follower to this point (high impedance so to not impact measurements) and connected it to my scope. I noticed it wad connected to ground periodically so I replicated this behavior. This is a screenshot of when I measured this: image

Not that in theory there should be no need for a bias signal if you are working with a true AC signal that goes negative, my explanation might be a bit off but I hope it helps: assume the receiving electrode (capacitor) is at 0V, when the sine is going up it is charging the capacitor. when it goes negative it is discharging the capacitor. But now we are working with a modulated digital signal this signal is only 0V or 3V, because of this the capacitor will charge up to 3V and stay there because there is no path to ground to discharge it, hence the need to discharge it.

Maybe I'm just wrong Please note that my explanations might be incorrect. The transmission signal may not be a sine modulated on top of a PWM after all. When I look at the transmission signal and low pass filter it in my head I get something like this (I should have tested this but I have not, should be easy to do though). image The phase of the sum signal directly relates to the mechanical displacement which determines what signals are summed together.

I hope this helps, feel free to ask any more questions. If you manage to figure something out please share it.

Glentronics commented 11 months ago

Hi littleboot,

thanks for the very comprehensive answers. Regarding the resolution, so if I reduce the number of gaps using only 4 electrodes and decompose the modulating signal into more steps, I theoretically will improve resolution, right? I'm using a Raspberry Pi Pico and at the moment I'm able to generate up to four 120kHz SPWM signals, where the sine function is completed in 720 steps (360°/720 = 0.5° resolution I hope). DS1Z_QuickPrint32

I'm going to create a bias signal composed by two short low-level pulses for every PWM period, similarly to what happens on the caliper.

The next step is to understand how to process the sensor signal in order to get the absolute angular position.

littleboot commented 11 months ago

"so if I reduce the number of gaps using only 4 electrodes" I do not think this will have a positively effect on the resolution. The adjacent signals will then be shifted 90 degrees compared to each other and might not result in a consistent amplitude in the summed signal, but this might not be an issue the amplitude is not important only the phase shift. It might works it should be easy to validate. Don't worry about the gaps between the electrodes, its the result of the PCB manufacturer tolerances (minimum copper spacing I thin JLCPCB is 0.015mm or something for 2 layer boards), and does not contribute much to the resolution error.

I assume your rasberry pi pico uses the RP2040 MCU? You should be able to generate all 8 SPWM signals easily. +1 bias +1timebase (handy to trigger you scope) +1 ADC external trigger (external so you can connect your scope and debug). It might be hard to do this using the integrated peripherals, I would advise to use the bitbang method I used in my code (note I started with integrated peripherals, I do not recommend this method).

also you can perform some tricks: note that signal TX1 (0 degrees) is the same as TX5 (180 degrees) but inverted, I know the ESP32 for example allows to connect a single peripheral signal to multiple IO's and set a bit to invert the signal. Or you can just add 4 inverters (single chip very cheap) in hardware this also safes IO's.

Maybe it helps if I explain my code a bit.

First I generate a lookup table for the modulated signal. its a list that hold the required IO state (high or low) at every cycle.

// TX_BUFF_SIZE = 512
const uint8_t txBuff[TX_BUFF_SIZE] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0};

to output this signal:

while(1){
    for int i = 0; i < 512; i++){
        digitalwrite(TX1, txBuff[i]);
        delayUs(10); //This delay determines the frequency of the output signal, maybe use NOP instruction
    }
}

because all signals are the same but phase shifted you can use the same lookup table for all signals but you have to keep track of the location for each signal. so TX2 starts at (512/8 = 64 - 1 = 63) i=63 ect.

so you get something like this:

while(1){
    for int i = 0; i < 512; i++){
        digitalwrite(TX1, txBuff[i]);
        digitalwrite(TX2, txBuff[i + offset2]);
        digitalwrite(TX3, txBuff[i + offset3] );
        digitalwrite(TX4, txBuff[i + offset4]);
        digitalwrite(TX5, txBuff[i + offset5]);
        digitalwrite(TX6, txBuff[i + offset6]);
        digitalwrite(TX7, txBuff[i + offset7]);
        digitalwrite(TX8, txBuff[i + offset8]);

        digitalwrite(bias, biasBuff[i];

        delayUs(10); //This delay determines the frequency of the output signal, maybe use NOP instruction
    }
}

This can be optimized future. there will be small delay between the digitalwrite of TX1 and TX2 (and TX2 to TX3 ect) because the digitalwrite function takes a few cycle to execute. This will result in some jitter on the output (not really a problem for testing). However if you look at the datasheet and how the GPIO is implemented in hardware it is possible to set multiple IO's at once when there are on the same IO bank. This only takes a single write cycle by setting the GPIO_OUT_SET Register.

All out signals (spwm, bias, timebase, adc trigger) are static the timing does not change. You can compute the GPIO_SET register values beforehand for every sample point (512 in total) and loop through this buffer to generate the signals. Doing this greatly speeds up the code because writing all outputs now only takes a single write cycle.

while(1){
    for int i = 0; i < 512; i++){
        GPIO_OUT |= gpioOutSetBuff[i];

        delayUs(10); //This delay determines the frequency of the output signal, maybe use NOP instruction
    }
}

More optimization: Now the CPU is busy in a loop all the time generating the output signals, may not be a problem I noticed the RP2040 is a dual core so you could reserve a core for this. However a better solution would be to use the DMA for this, the DMA can write from memory to memory without CPU intervention. memory source would be the gpioOutSetBuff and memory detination would be the address of the GPIO_OUT register location.

I hope this explains a bit how I got to my firmware implementation and helps you with yours. If you have more questions let me know

Glentronics commented 11 months ago

"The adjacent signals will then be shifted 90 degrees compared to each other and might not result in a consistent amplitude" We can therefore say that 8 electrodes are a fair compromise.

"I assume your Raspberry Pi Pico uses the RP2040 MCU?" Yes, and I'm able to even generate 16 SPWM signal, but I wanted to keep everything as simple as possible, that's why I was thinking about placing only 4 electrodes. However, I accept your suggestions, especially because your ACRE works perfectly, and I will go for the 8 electrodes using the inverted signals trick somehow. At the moment I'm using integrated peripherals (just for testing), but yes, the next step is to implement the DMA both for signals generation and analog reading.

"it is possible to set multiple IO's at once when there are on the same IO bank" Yep, a point that I had already taken into account for future tests. It's the first time I've used this microcontroller and I want to exploit this project to get used to it.

Your explanation of the firmware was invaluable. I took a look at all the code, and the only part that is actually less clear to me is that of the _sensorsignalProcessing() function

littleboot commented 11 months ago

"We can therefore say that 8 electrodes are a fair compromise." Yes I believe so but I can't really back this up other then a vague memory of trying out less signals using the SPICE simulation. However If you have the 8 electrodes you can easily test this by changing the code a bit so TX1=TX2=0degress TX3=TX4=90degress ect.

When I was testing in the beginning I just used the digitalwrite functions sequentially (Like the example in my previous reply) to output all the required signals (frequency of complete signal or jitter does not matter much). Try with only the output signals no complex ADC input or DMA and connect your scope (adc input) to validate if the resulting signal is changing in phase due to mechanical displacement. I added a timebase signal so I could trigger my scope at the start of the TX buffer sample 0. When you have this you should be able to validate if the displacement sensor is working. The voltage at the ADC input should look like this: https://www.youtube.com/watch?v=zR5dzq9aDFo Because the scope triggers at sample the start of TX0 you will be able to observe something resembling a sine-wave. The phase of this signal with respect to TX1[0] will change due to the mechanical displacement of the sensor.

To explain the sensor_signalProcessing you first have to take a look at what is actually in the sample buffer: See video: https://www.youtube.com/watch?v=FkHQsDzOtvA

Notice how the sampled signals do not represent a sine. But looking at it you can see the phase of the signal changing due to mechanical displacement so the displacement information is there but needs to be extracted from the sampled signal using the discrete Fourier transform (DFT). However the sampled signal does not represent a sine, I noticed a pattern that for every even sample that was positive the surrounding odd samples were close to zero. So I split the sample buffer in even and odd samples and used debugger to plot these samples in a bar graph. When I looked at this at the time I thought: if I subtract the odd from the even samples (or vise versa) I get something that really looks like a sine wave. image

So now I have a buffer with a almost perfect sine wave, DFT can be used to get the phase of the sine wave. The buffer contains a single sine wave sampled using 64 samples. (1hz sine in this buffer) Because we already know the frequency of the sampled signal we only have to calculate the DFT coefficients for this single frequency bin. Bin frequency = k*SamplerateHz/SampleSize = 1*64/64 = 1Hz

    for (uint32_t i = 0; i < 32; i++)
    {
        sumrealTemp += (double)demolLp[i] * cosAngLut[i];
        sumimagTemp += -(double)demolLp[i] * sinAngLut[i];
    }

    // dft coefficients at the frequency bin of interest (1hz) in complex form
    real = sumrealTemp; //X-axis
    imag = sumimagTemp; //Y-axis

The result is a complex number in the Rectangular form. But this form Rectangular = a + bi = Rectangular = real + imag * i complex form does not contain the phase angle directly. However we can convert this Rectangular form to the Polar form Polar = r(cos(phi) + i * sin(phi)).

    // Calculate phase
    if (real >= 0 && imag >= 0)
    {
        //1-Quadrant (top right) [+, +]
        phaseRad = atan2(imag, real);
        quadrant = 1;
    }
    else if (real < 0 && imag >= 0)
    {
        //2-Quadrant (top left) [-, +]
        phaseRad = atan2(imag, real);
        quadrant = 2;
    }
    else if (real < 0 && imag < 0)
    {
        //3-Quadrant (bottom left) [-, -]
        phaseRad = 2 * M_PI + atan2(imag, real);
        quadrant = 3;
    }
    else if (real >= 0 && imag < 0)
    {
        //4-Quadrant (bottom right) [+, -] #Optimization: do not check last quadrant just use else
        phaseRad = 2 * M_PI + atan2(imag, real);
        quadrant = 4;
    }

Not that it is also possible to calculate the magnitude of the signal:

   // Calculate magnitude
    magnitude = sqrt(fabs(real) + fabs(imag));

Although this information is not required to calculate the mechanical displacement it can be used to detect if the received signal is present (if magnitude to low = circuit error, reflector missing?)

Note that this part of the project took me a very long time to figure out, I'm no expert in signal processing or math. tutorial about complex numbers. Improvements can be made here. I just though of calculating the phase of signal in the odd buffer and even buffer separately (one looks like a sine and the other looks like a cosine) maybe this will improve the resolution.

I hope this help you with your understanding, let me know if you have more questions, and when you get it to work.

Glentronics commented 11 months ago

"If you have the 8 electrodes you can easily test this by changing the code" Yes, I also though about this solution afterwards.

For the rest, well...wow! Thanks for all the explanations and advice, I hope to be able to create an absolute capacitive encoder too. I will work on it on weekends and in my free time when I can. I don't know how long it will take, but I will update you on the progress for sure. See you soon!

littleboot commented 11 months ago

while I was writing my reply yesterday it got me thinking about my failed attempts to generate the transmit signal from scratch. So I opened up matlab, and had a go at it again, I think I may have figured it out 😄 .

Low pass filter off the transmit signal
It probably isn't perfect I asked chatgpt on how to lowpass filter a sampled signal. It suggested the Butterworth filter function. It seems this filter introduces some phase shift, maybe other filter types would be more optimal. but it doesn't really matter. I also did not calculate the required filter parameters I got these values by trial and error until the plot looked oke. image tx_lowpass_test.txt (changed .m extension to .txt so I can upload it here)

Edit: Tried combining the signals and plotting the results, this might help with understanding the bias signal and adc sample points. image tx_lowpass_test.txt

I wrote down some notes and tried to visualize the information for a better understanding:

Single 50% duty PWM clycle in the signal takes 16 buffer periods This wil fit 512/16 = 32 times into the full signal. The high dutycycle period and low duty cycle period are both 4 X 16 samples in width. image

Notice how the complete signal can be divided in 32/4=8 blocks of equal size image

image

! Note how the second part of the buffer is exactly the same as the first part but the inverse of it

PWM modulation source The source signal that was used to generate the modulated PWM signal (transmit signal caliper) should resemble the filtered signal.

Constructing the equation for the source signal: Note how parts of the signal look a lot like parts of a sine wave. Assume the signal is divided in 8 parts like the buffer

1 Positive half of a sine wave Sin(0 to pi)
2, 3, 4 50% duty 0.5
5 Negative half of sine wave Cos(0 to pi)
6, 7, 8 50% duty 0.5

This is my matlab script to try this out, the signal looks a lot like the original signal to I assume it is correct. In the script I used a different dutycycle resolution 0-100, the original signal uses 0-16 to represent 0 to 100% duty, this explains why the sample count does not match. I wanted to try it out and see if I could generate the signal from scratch. just a crude test script. image increasing the sample count does seem to increase the signal resolution. image

transmitsig_generator_scratch.txt

I can now say that changing the electrodes from 8 to 4 will most likely require you to also change the transmit signal (see table representing the signal). instead of 1/8 of the being a sin(0 to pi) you need 2/8. four 45 degrees shifted transmit signals added together should resemble a sine wave.

assuming the above is correct there is only the bias signal left. I'm not sure about this one. However the bias signal has a simple shape and it should be easy to try out different options and check if the received waveform has the correct shape using a scope. Maybe it becomes more clear when you visualize it and overlay the signals in a single plot

btw if you don't have access to matlab you could try GNU Octave, most of the time matlab scrips work in octave without having to make changes.

good luck!

Glentronics commented 11 months ago

"If you don't have access to MATLAB you could try GNU Octave" Yes, I'm familiar with it. I had already tried to run your .m files, and to make them work correctly with GNU Octave just add these 2 lines at the beginning of the file:

pkg load control pkg load signal

"So I opened up MATLAB, and had a go at it again" I admire your dedication! Exploiting these latest MATLAB files of yours and some tests I had done to transform a sinusoidal function into a PWM signal, I think I have found the way to generate perfect SPWM signals through a LUT. The idea is to have the single PWM cycle divided into 20 periods and the full signal composed by 36 PWM cycles. Below is the excel file that contains the steps of my reasoning: SignalGeneration_MY.xlsx By modifying the tx_lowpass_test.m file according to my needs, I obtained the following filtered waveforms, which are perfect sine waves: SPWM_LUTgenerated SPWM_lowpass_test.txt

What do you think? Personally I would like to try driving the 8 electrodes with this square wave appropriately shifted.

littleboot commented 10 months ago

Yes I think it is worth trying out, driving the electrodes with Sine modulated PWM signals. You may have misunderstood the main point of my previous reply. I assumed the modulation source for the caliper signal was a Sinewave. This does not seem to be the case. To get a signal that matches with the captured caliper transmit signal, you will need a modulation source represented by the table in my previous reply needs to be used. sin(0-pi), 0, 0, 0,-sin(0-pi),0,0,0.

I made a new script to visualize the data for a better understanding, what is happening. To construct a modulated PWM signal:

  1. Sample the source signal
  2. Convert the sample points to PWM dutycycle periods (Timer period)
  3. loop through PWM dutycycle periods to output the signal

image
sample cnt = 32 PWM period = 16 total clk cycles (timer pulses) = 32 * 16= 512

image sample cnt = 16 PWM period = 32 total clk cycles (timer pulses) = 32 * 16= 512

image sample cnt = 32 PWM period = 32 total clk cycles (timer pulses) = 32 * 32 = 1024

You may have noticed that the output signal created using the timer pwm simulator code is not symmetric . This is because the timer was only counting up (Edge-aligned PWM). If Center-aligned PWM is used the resulting signal will be symmetric.

My hypothesis is that using the Center aligned method could yield a cleaner signal (This might improve resolution).

However the captured caliper transmit signal is clearly a edge aligned PWM signal. Maybe the difference between the methods is very small and the simplest method was used for the ASIC implementation.

This is the script I used to generate the figures (it's not polished). PWM_modulation.txt

Glentronics commented 10 months ago

Ok, thanks for the clarification and sorry for the misunderstanding. Now I think I've got the point. I will focus on the sin(0-pi), 0, 0, 0,-sin(0-pi),0,0,0 modulation scheme.

littleboot commented 10 months ago

No problem at all, your doubts and questions reawakened my interest in solving this mystery. I still think it would be interesting to try using a full sine wave PWM and see what happens, in theory it should work, I thought it was a sinewave until a few days ago... combining sinewaves in ltspice seemed to work so its still not clear to me how the source signal came to be this way. It seems sin(0-pi), 0, 0, 0,-sin(0-pi),0,0,0 32 samples with 16 timer steps is very close to the caliper transmit signal although not identical. This part (source signal modulation) is good enough for now so I moved on to trying to simulate the rest of the displacement sensor in matlab. In fact I just managed to plot all signals in a single plot, summed four transmit signals together to simulate the displacement sensor and sampled this signal to simulate the ADC samples. It looks very similar to the measurements I took on the actual hardware. So I believe I'm on the right track here. (I'm using the ACRE firmware buffers for the signal sources for now because I know these work) image PWM_modulation.txt

littleboot commented 10 months ago

Hi Glen, Good news, I think I have figured it out!, Don't waste your time on sin(0-pi), 0, 0, 0,-sin(0-pi),0,0,0. update follows soon ;).

littleboot commented 10 months ago

The transmit signal is actually two signals interleaved. a trapezoid approximation of a sinewave interleaved with a trapezoid approximation of a cosine + 1.5 timer period phase shift between those two. image

I made an error in the demodulation function in the ARCE firmware: it seems the even and odd samples should be added together instead of subtracted. image

I'm planning on designing a new ACRE revision (I don't have any PCB's of this project anymore and I want to play with it on actual hardware now). No timeline for this though, but I will update the project page when it's finished.

Also the previous matlab scripts had errors, the PWM simulation code was not correct, I used the STmicro reference manual RM0008 to validate the PWM generation code. new script: transmit_signal_from_source.txt

Glentronics commented 9 months ago

I finally managed to complete my capacitive absolute encoder. Thanks for the investigations and guidance, they certainly helped me obtain the desired result!

darkomenz commented 8 months ago

Hello @littleboot do you happen to have a discord? I would like to do a screen share with you and ask a few questions. Some of the information I have may be useful to you and this project.

littleboot commented 8 months ago

Hello @littleboot do you happen to have a discord? I would like to do a screen share with you and ask a few questions. Some of the information I have may be useful to you and this project.

Sure no problem I'm happy to help, my discord is "littleboot_". I'm very busy the next 3 days, but have time after that, send me a message we plan a discord thingy. Talk to you soon

darkomenz commented 8 months ago

Hello @littleboot,

I wasn't able to directly send you a message due to your discord preferences. I was however able to send over a friend request so we can chat once you accept the request.

Regards

littleboot commented 8 months ago

Thank you for sending me the Discord message with the youtube video @darkomenz . I'm amazed by the guy (Dan Gelbart) in the video. I hadn't even completed watching the video and was convinced you struck gold by finding this. You can't imagine how much time I spend searching the internet for information about the working principle. Pure gold: https://www.youtube.com/watch?v=W6q_JRZCaZM @Glentronics you should also watch this!

The reason I post a reply here is that want everyone looking at this project to benefit from it. (yes I should update the repo readme) Lets build an super high resolution displacement sensor!

Glentronics commented 8 months ago

Thank you @littleboot for sharing this very interesting lesson about capacitive/inductive encoders and tellurometer! I would be curious to know if there are other notions that you have exchanged on Discord and if I can participate too if so. Continuing my research, I found these equally interesting links: https://web.archive.org/web/20130615164813/http://www.yadro.de/digital-scale/working.html https://www.mjt.me.uk/posts/digital-vernier-teardown/