Integrating a BCL-AMP capacitive sensor to LinuxCNC

More
2 years 6 months ago - 2 years 6 months ago #297557 by Uthayne
Thanks Scott, this was my one predicted hurdle when I started research months ago. Glad to be alongside another on this project.

At idle, counts remains unchanged unless I physically touch the nozzle, and then it will increase. I’ll have to check halcmd outputs tomorrow and I’ll post.

Yeah, I’ve wondered about the counter rate. I have a 7i76e with a 7i85s. This was originally plugged into the 7i85s but I read in the manual the encoders are muxed to save pins which limits count rate to 2-3 MHz. I’ve since plugged it into the 7i76e encoder spot.

Great to hear you having success. Are you finding any limitations with the low sensor range with things such as tip ups? A lot of the Chinese systems I’ve seen can track 6mm and more sense distance. Perhaps it’s not using this amplifier.

I have a Raycus 1000w with a Raytools BM110 auto focus head.

@PCW encoder filter is set to 0. Will try increasing sample rate and report back. 
Last edit: 2 years 6 months ago by Uthayne.
The following user(s) said Thank You: Masi

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

More
2 years 6 months ago #297590 by Uthayne
I've figured out that the issue was due to the muxed encoders limiting my sampling frequency since I am using firmware that adds a 7i85s to the 7i76e P1 expansion port. I knew that the 7i85s encoders were set this way, but it wasn't until I checked the firmware pin file that I saw the 7i76e encoders are also set as muxed encoders.

I first tried updating the sample frequency:
Code:
setp hm2_7i76e.0.encoder.muxed-sample-frequency 25000000

It was at 8333333 previously (8.333 MHz?), but this higher sample rate didn't solve the issue. I went back and flashed my 7i76e with the stock firmware, changing the 7i76e encoder back to a quad encoder instead of muxed. With all other things remaining the same as before, my signal is now being read, and looks very close to yours. Although the value is inverted, I can just scale it negatively.

Would you mind sharing your hal/ini files? I'm interested in how you scaled it to a reasonable value while maintaining resolution. It is a very small window based on the cut height required to keep it on target.

Here's some data, 0.100" Z move. capacitance.txt is csv scope output data


PCW: Can the 7i76e+7i85s firmware be changed to just "A" input encoders and bypass the need to have muxed encoders that are sample limited? Would this work? My setup requires 3 different single ended encoder "A" inputs, 7 stepgens, and 2 pwmgens.

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

More
2 years 6 months ago - 2 years 6 months ago #297595 by PCW
Unfortunately you can either have muxed encoders or
normal encoders but not both. In order to get along with
the 7I85S you would need to stay with  muxed encoders.

Another option would be to use a different module to read
frequency. The Period module can measure frequency as well as
period but does require using LinuxCNC master (2.10)

A hardware fix would be to use a flip-flop (74HC74 say) 
to get a ~1 MHz or 500 KHz  square wave rather than
the narrow (120 ns?) pulse that's hard to capture.
 
Last edit: 2 years 6 months ago by PCW.

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

More
2 years 6 months ago #297598 by Uthayne
Ok, I'll have to deal with muxed encoders then.

I am open to using the Period module as I am on 2.10. I could not find a section on it in the documentation. Do you have anything to point me to how to use it?

A hardware solution would be nice as well, thanks!

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

More
2 years 6 months ago #297599 by PCW
Its in the hostmot2 manual page (though you need LinuxCNC 2.10
to have the periodm module in the manual)

I can make firmware for the 7I76E with a periodm. Do you want it to use
a pin on the 7I76e encoder input? (I think the 7I96S version replaces the
7I76E encoder index with the periodm input)
The following user(s) said Thank You: Masi

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

More
2 years 6 months ago #297600 by Uthayne
That firmware would be great.

While you're at it, can I get a firmware that uses 7i76e and 7i85s x1 on P1 please? Or perhaps duplicate for 7i85s on both P1 and P2 for future proofing.

The periodm pin can be on 7i76e encoder index is fine. 7i85s needs at least 2 encoder A inputs, and convert two of the stepgens to pwmgens so it will have 2 stepgens and 2 pwmgens.

Thanks!

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

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