Integrating a BCL-AMP capacitive sensor to LinuxCNC

More
07 Apr 2024 00:15 - 07 Apr 2024 00:16 #297727 by Uthayne
I added a 74HC74 flip flop IC and divided the frequency signal by 1/2, which now works perfectly with a muxed A encoder. I couldn't get periodm to read the signal cleanly, it only updated the frequency if I touched the nozzle, but that's probably user error.

The good news about the 74HC74 chip is that by reducing the frequency sent to the encoder, it is a cleaner signal and the detection distance from the sensor increased from 0.1" to approximately 0.75". I am able to detect way further now with great response which should help immensely.

I'll have to grab some data to see how linear the response is now. One weird thing though, when the surface approaches the nozzle, the frequency increases until contact, and then it goes back to 0 (approximately) Hz. It has the opposite effect as before.
Last edit: 07 Apr 2024 00:16 by Uthayne.

Please Log in or Create an account to join the conversation.

More
07 Apr 2024 13:25 #297749 by PCW
Glad that the flip-flop worked. A bit surprising that a frequency
output sensor didn't output a square wave to begin with.

On the periodM, did you set the input filter fast enough to catch
the narrow input pulse? (say 0.1 usec or shorter)

Please Log in or Create an account to join the conversation.

More
13 Apr 2024 16:25 - 13 Apr 2024 17:25 #298177 by Uthayne
Setting the input filter to 0.1 usec did the trick. The sensor does output a square wave, but it's not very clean or stable. For some reason, I can't get the periodm frequency value to show any change in sensor output no matter how close or far I am from the sensor. With the sensor at a static range, there is a considerable amount of noise causing the sensor to range from 2.38 MHz to 2.42 MHz, with some blips above and below that even. For now I'm going to revert back to the flip/flop as that was working, although the sensor still has oddities at the extremes. Perhaps I need to buy a new BCL-Amp.

I am powering the sensor from the +5v from the encoder rail on the 7i76e. Is this power clean enough? Or should I add decoupling caps/use an external power supply?

 

Edit: I've added the current frequency response I get from the sensor once it's gone through a 74HC14 Schmitt Trigger and then a 74HC74 Flip Flop. The Z move is 0.500", and the peak BCL-Amp-freq is at about 0.060" above material. Perhaps I don't need the first Schmitt Trigger because the 74HC74 has a Schmitt Trigger as well. I'm having issues figuring out how to deal with the response after ~0.100" Z, it causes my "voltage" to go back up. I only care about the first 0.050" or so for THC purposes, but if the metal buckles or there is a drastic change in height, it will cause issues with the THC.

Note that I wasn't seeing this inversion when I plugged the signal straight into a non-muxed encoder without the flip flop. The signal started high and decreased to zero, my current frequency reading is starting low and increasing and then decreasing the further it gets away.
Attachments:
Last edit: 13 Apr 2024 17:25 by Uthayne.

Please Log in or Create an account to join the conversation.

More
14 Apr 2024 05:06 #298218 by shasse
That frequency response is odd and not like anything I've gotten. It has certainly not been a linear response (far from it), but the frequency has always increased with lower capacitance. One thought: is your workpiece well grounded? I added a wire off the star ground in my machine that has a clamp on the end, and I clamped that to the metal standoffs that the workpiece sits directly on.

Please Log in or Create an account to join the conversation.

More
14 Apr 2024 15:07 - 14 Apr 2024 15:08 #298231 by Uthayne
Just verified that I have continuity (<5 Ohms) between workpiece and the laser head locking ring and other screws attaching the BCL-amp. The nozzle seems to be insulated (I know there's a ceramic ring, but this picture below (not mine) shows there should be some connectivity)

  

 
Attachments:
Last edit: 14 Apr 2024 15:08 by Uthayne.

Please Log in or Create an account to join the conversation.

More
14 Apr 2024 15:37 - 14 Apr 2024 15:38 #298233 by PCW
If the periodm frequency does not change, check the periodm valid bit
(it will be false if the input is too narrow a pulse or not higher than the
minimum frequency). The devices output is not a square wave (square wave
means 50% duty cycle) but rather a narrow pulse (~100 ns)

You might try reducing the input filter to say 70 ns (0.070). Also if you use the
periodm frequency, you should set the number of averages to 500 or 1000
(periodm measures frequency as the inverse of the period so accuracy improves
with the number of period averages)
Last edit: 14 Apr 2024 15:38 by PCW.
The following user(s) said Thank You: akb1212, Uthayne

Please Log in or Create an account to join the conversation.

More
14 Apr 2024 21:46 #298259 by Uthayne
Thanks @PCW, those settings got me on the right path. I have decided to ditch the flip flop IC and just go back to the periodm solution with the full scale sensor reading as the signal does something more logical (maybe one day I'll sit down and try to figure out what is going on...)

I've done all of the frequency to voltage scaling inside a custom component, which I hope to add other functionality to like dynamic probing. I'm kicking around the idea of not probing down to the work surface, but instead to a set capacitance level (voltage). This should in theory be quicker and not have to worry about material bouncing after probing. I did several repeatability tests with the "probe-test" button in qtplasmac and found that the probe speed greatly affects accuracy (no kidding). But the sweet spot with cut quality is quite small, so I'm considering an alternative approach to probing. The dynamic part of this is that while say 50 volts (or whatever it is scaled to) is an appropriate cut height, I want to probe down to this height and start cutting right away. I would still want to catch nozzle tips, which would show as 0 volts, so the ohmic-probe input value would need to adjust dynamically based upon which state plasmac is in.

I realize that this may not be a great approach for thicker materials which require an additional pierce height, or materials with two stage piercing. I'm also new to this, so I'm learning as I go.

Please Log in or Create an account to join the conversation.

More
03 May 2024 12:57 #299624 by LGeurts
Hello,
Nice work figuring out the BCL-AMP!
Does anyone know how much the frequency response varies when you vary the distance of  the nozzle to the material in a range from 4mm to 6mm? I want to use this amp as the capacitive sensor is already built in to the cutting head, but then with a PLC so I need to know what frequencies I can expect. 
Thanks in advance!

Please Log in or Create an account to join the conversation.

More
03 May 2024 20:10 #299670 by Uthayne
Every BCL-AMP seems to be just a little different, which is why calibration is required. Here's how mine looks
>5" : 2346000 Hz
1" : 2342000 Hz
0.5" : 2337500 Hz
0.25" : 2330500 Hz
0.125" : 2322000 Hz
0.062" : 2313000 Hz
0.030" : 2303000 Hz

I run the frequency through a custom component which scales the "voltage" range from 0 (touching) to 95 (Z height @ max). Typical cutting "volts" are around 35, which equates to a cut height of 0.040"

Hope this helps!

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.370 seconds
Powered by Kunena Forum