Problem with the repeatability of position reading (capacitive scale)

pavyan

Registered
Registered
Joined
Aug 16, 2024
Messages
43
Hi everyone!

I want to describe a problem - very stressful for me - that I encountered while building TouchDRO, a device developed and made available to workshop enthusiasts by the irreplaceable Yuriy :)

I managed to solve it to my great joy, and I want to describe it. Although I "cured" the effect, not the cause - the effect satisfies me - maybe someone will encounter a similar problem, and then my description will help them.

Namely, after assembling the system in the full DIY version of TouchDRO (including PCB), starting it up and connecting SHAHE 5403-F capacitive scales to it, it turned out that the Z axis input does not provide a repeatable reading of the position: 1. zero point, 2. indicates random values of the reader position after it moves.

It wasn't the fault of the Z scale itself, , because I swapped the scales and the problem occurred ONLY on the Z axis input - VERY STRANGE.

I used capacitive linear scales for simple reasons: they each have their own display (if something went completely wrong, they could work autonomously), the 0.01mm measurement resolution is enough for me and my mill, and they are cheap.

Of course :) , I asked Yuriy for help, but he had never encountered such a problem - so I had to do something about it myself.

I tried almost everything: I checked the printed circuit board thoroughly, all connections, re-soldered it (for "cold" solder joints), replaced several processor boards, replaced 74HC14 buffers, replaced DuPonts, shielded the 5V power supply soldered on the board (HLK PM-01), and also powered it with an external 5VDC power supply - ALL WITHOUT EFFECT.

Finally, I came up with the - it seemed - "stupid" idea of connecting a 3.9nF ceramic capacitor at the input of the Schmitt trigger of the Z axis: between the input of the DATA and the mass of the system.

BINGO! Surprisingly, it worked, the system started reading signals from the Z-axis reader correctly.

After this experiment, I removed this capacitor, but soldered in two others: I used 47uF/6.3V capacitors (tantalum, because they are non-inductive) and connected them in parallel to the existing ceramic capacitors C11 and C12 (0.1uF), blocking the power supply right next to the 74HC14 integrated circuits.

This also gave a similarly good effect - but not as good as before. I left them soldered.

Then, I re-soldered in a 3.9nF ceramic capacitor again to the input of the Schmitt responsible for the Z-axis. Even the 10nF capacitance in this place did not have a visible negative effect on the useful signal, but despite this, I left the aforementioned 3.9nF there.

Maybe this description of the "repair" - or more broadly: counteracting interference/noises in case it appears unexpectedly - will be useful to some of you in similar cases. In addition, I believe that soldering "right away", at the start, the aforementioned tantalum capacitors blocking the 74HC14 power supply will in any case have a potentially positive effect. Yuriy does not use such electrolytic capacitors (even tantalum) in this place for some reason, but in my opinion they are very good non-inductive elements and in my case, they helped a lot.

VERY IMPORTANT: electrolytic capacitors have polarity, they must be connected correctly: "+" to the plus of the power supply, "-" to the ground/mass of the circuit.

I must add some details for the sake of fairness - unlike the original scheme, on the board I used, the IC1 is responsible for the X, Y and Z axes (in the original the X and Y axes), while the IC2 is responsible for the W axis, TACHO and PROBE (in the original the Z, W axes, TACHO and PROBE). In my opinion (and Yuriy confirmed this), this should not have any effect on the correct operation of the circuit. Additionally, I have an HLK PM-01 5VDC switching power supply soldered onto the board, but it does not "produce" noise, this has been checked - after connecting an external, "usual" transformer 5VDC power supply, the problem did not disappear, i. e. "throwing" the 5V power supply far outside enclosure did not change anything.

I think, that two important pieces of information emerge from my "experiment": 1. it is possible and worth using 22-47uF electrolytic tantalum capacitors to block the power supply of 74HC14 systems, and 2. capacitors with a value of several nanofarads between the Schmitt DATA input and the mass of the system do not negatively affect the reading of data from linear scales*, and allow you to get rid of persistent noises (if such occurs).

* Checked when using capacitive linear scales (SHAHE 5403-F) and in the case of not very fast reader movements - up to 500mm/min. I think it is possible, that for a very fast reader moving (higher data transfer frequency?) the capacitance of this capacitor should be reduced.

Please excuse any language errors - I use a translator and grammar checker :)

SHAHE 5403-F

SHAHE 5403-F.jpg
 
Last edited:
I thought I had recently read on yuriy's site that capacitive scales require a level shifter/resistor network? Perhaps already provided.
Anyhow, If the capacitor fix works that's great
 
Thanks for the kind words - I'm happy, I'll say more: no one is happier than me (in this matter :) )

As far as I know, the issue with shifting the voltage level concerns some capacitive scales powered by a 1.5V battery, they have too low a HI level (I stay away from them).
However, SHAHE 5403-F scales are powered by a 3V lithium battery and there is no problem with their power supply and data reading; used here ESP-32 has a 3.3V stabilizer on board, works with a voltage of 3.3V and also provides these scales with the appropriate supply voltage.

This capacitor worked very well - good because I've run out of all my creativity - it was a very non-standard, "stupid" idea, grasping at straws.

But: if something is stupid but works - it's not stupid :)
 
Last edited:
It's possible that a series rf choke or resistor might also have had the desired effect, but soldering in a capacitor is easier. You just want to
keep the cap small enough that it doesn't round off or attenuate the waveform too much.
3.9 nF = 0.0039 microfarad. I'm wondering if 0.001 uF would also work? (1 nF) Use the smallest value possible.
I'm thinking there is either a noise issue or unwanted oscillation. Hard to predict.
7400 series logic usually also wants a 0.1 uF cap on the power pin Vcc to ground. Any unused inputs should be tied to ground or Vcc.
 
Last edited:
Yes, it looks like some high-frequency noise - but it's very strange that in my case it occurs ONLY in the Z-axis path. I couldn't locate the source/cause of this noise - fortunately, I managed to "snuff it out".
Naturally, I thought about a capacitor, because selecting the right series inductance would be too troublesome, and capacitors are easily available and, what's more, in a wide range of values; I have maybe only a dozen or so small chokes, but a few handfuls of different ceramic capacitors :)
 
Hi everyone!

I want to describe a problem - very stressful for me - that I encountered while building TouchDRO, a device developed and made available to workshop enthusiasts by the irreplaceable Yuriy :)

I managed to solve it to my great joy, and I want to describe it. Although I "cured" the effect, not the cause - the effect satisfies me - maybe someone will encounter a similar problem, and then my description will help them.

Namely, after assembling the system in the full DIY version of TouchDRO (including PCB), starting it up and connecting SHAHE 5403-F capacitive scales to it, it turned out that the Z axis input does not provide a repeatable reading of the position: 1. zero point, 2. indicates random values of the reader position after it moves.

It wasn't the fault of the Z scale itself, , because I swapped the scales and the problem occurred ONLY on the Z axis input - VERY STRANGE.

I used capacitive linear scales for simple reasons: they each have their own display (if something went completely wrong, they could work autonomously), the 0.01mm measurement resolution is enough for me and my mill, and they are cheap.

Of course :) , I asked Yuriy for help, but he had never encountered such a problem - so I had to do something about it myself.

I tried almost everything: I checked the printed circuit board thoroughly, all connections, re-soldered it (for "cold" solder joints), replaced several processor boards, replaced 74HC14 buffers, replaced DuPonts, shielded the 5V power supply soldered on the board (HLK PM-01), and also powered it with an external 5VDC power supply - ALL WITHOUT EFFECT.

Finally, I came up with the - it seemed - "stupid" idea of connecting a 3.9nF ceramic capacitor at the input of the Schmitt trigger of the Z axis: between the input of the DATA and the mass of the system.

BINGO! Surprisingly, it worked, the system started reading signals from the Z-axis reader correctly.

After this experiment, I removed this capacitor, but soldered in two others: I used 47uF/6.3V capacitors (tantalum, because they are non-inductive) and connected them in parallel to the existing ceramic capacitors C11 and C12 (0.1uF), blocking the power supply right next to the 74HC14 integrated circuits.

This also gave a similarly good effect - but not as good as before. I left them soldered.

Then, I re-soldered in a 3.9nF ceramic capacitor again to the input of the Schmitt responsible for the Z-axis. Even the 10nF capacitance in this place did not have a visible negative effect on the useful signal, but despite this, I left the aforementioned 3.9nF there.

Maybe this description of the "repair" - or more broadly: counteracting interference/noises in case it appears unexpectedly - will be useful to some of you in similar cases. In addition, I believe that soldering "right away", at the start, the aforementioned tantalum capacitors blocking the 74HC14 power supply will in any case have a potentially positive effect. Yuriy does not use such electrolytic capacitors (even tantalum) in this place for some reason, but in my opinion they are very good non-inductive elements and in my case, they helped a lot.

VERY IMPORTANT: electrolytic capacitors have polarity, they must be connected correctly: "+" to the plus of the power supply, "-" to the ground/mass of the circuit.

I must add some details for the sake of fairness - unlike the original scheme, on the board I used, the IC1 is responsible for the X, Y and Z axes (in the original the X and Y axes), while the IC2 is responsible for the W axis, TACHO and PROBE (in the original the Z, W axes, TACHO and PROBE). In my opinion (and Yuriy confirmed this), this should not have any effect on the correct operation of the circuit. Additionally, I have an HLK PM-01 5VDC switching power supply soldered onto the board, but it does not "produce" noise, this has been checked - after connecting an external, "usual" transformer 5VDC power supply, the problem did not disappear, i. e. "throwing" the 5V power supply far outside enclosure did not change anything.

I think, that two important pieces of information emerge from my "experiment": 1. it is possible and worth using 22-47uF electrolytic tantalum capacitors to block the power supply of 74HC14 systems, and 2. capacitors with a value of several nanofarads between the Schmitt DATA input and the mass of the system do not negatively affect the reading of data from linear scales*, and allow you to get rid of persistent noises (if such occurs).

* Checked when using capacitive linear scales (SHAHE 5403-F) and in the case of not very fast reader movements - up to 500mm/min. I think it is possible, that for a very fast reader moving (higher data transfer frequency?) the capacitance of this capacitor should be reduced.

Please excuse any language errors - I use a translator and grammar checker :)

SHAHE 5403-F

View attachment 509109
Pawel,
Thank you for the detailed writeup. I'm sure this will help many people with similar problems (this is not an uncommon issue with Shahe scales).
I'm still baffled why the noise was affecting only the Z input. That is just too strange, but I'm glad you got it figured out. I know that it took you a ton of effort, so "pozostańmy więc upartymi, polskimi osłami" is indeed an excellent advice ;)

Regards
Yuriy
 
I had similar problems with a stock Igaging DRO setup on the Z axis of my mini mill. In my case I think the problem was EMI coming from the brushless motor/wires/controller, which are all close to that particular DRO. Shielding the motor wires didn't help, and putting shielding over the DRO cable didn't, either (yes I grounded one end of the shield). Adding a 1 microfarad bypass capacitor between the sensor's Vcc and Gnd improved the situation, but the thing that really solved my problem was to hardwire the scale to the sensor's Gnd. That involved drilling a hole in one end of the scale and attaching a wire+spade connector to it. I then soldered the wire to the sensor's internal ground.

It's possible to test if this approach works before taking the step of drilling a hole in the scale. I first used an alligator clip and would have continued with that but it kept popping off the scale.
 
Dear Yuriy, thanks for your kind words (English and POLISH) and... praise.
This is no small thing: it came from the keyboard of a true Master of programming and electronics, I am convinced of that.
The existence of such good and helpful people as you gives hope that this world may not perish quickly in the hellish abyss :)
I really went to the bottom, but somehow I grabbed those lifebuoys... ah, capacitors - and swam to the surface of the water, and a bit more seriously: the idea came to me one night, at 5:00 :)
I also hope that this description will be helpful to colleagues, who encounter similar problems - I would be very glad.
 
I had similar problems with a stock Igaging DRO setup on the Z axis of my mini mill. In my case I think the problem was EMI coming from the brushless motor/wires/controller, which are all close to that particular DRO. Shielding the motor wires didn't help, and putting shielding over the DRO cable didn't, either (yes I grounded one end of the shield). Adding a 1 microfarad bypass capacitor between the sensor's Vcc and Gnd improved the situation, but the thing that really solved my problem was to hardwire the scale to the sensor's Gnd. That involved drilling a hole in one end of the scale and attaching a wire+spade connector to it. I then soldered the wire to the sensor's internal ground.

It's possible to test if this approach works before taking the step of drilling a hole in the scale. I first used an alligator clip and would have continued with that but it kept popping off the scale.
Were these SS Plus scales or the older Aluminum scales? Which side of the column did you mount the Z scale?

I used the SS Plus scales on my Mini-Mill and mounted the Z scale on the left side of the column; no problems since installing 3 years ago:

IMG_8482.jpeg
 
Were these SS Plus scales or the older Aluminum scales? Which side of the column did you mount the Z scale?

I used the SS Plus scales on my Mini-Mill and mounted the Z scale on the left side of the column; no problems since installing 3 years ago:

View attachment 509178
Left side, aluminum scales. I think the aluminum scales develop contact problems and that's the main issue. Despite adding additional capacitance between Vcc and Gnd, the readout was unstable until I made a hard connection between the scale and sensor GND.

I have two stainless-steel igaging DROs attached to my mini lathe and they also exhibited some problems....until I added the bypass capacitors. After that they settled right down, no need for that external ground connection. I don't use flood or mist lubrication so I expect the contact surfaces to stay pretty clean.
 
Back
Top