THC using DAC & HAL

More
08 Jun 2020 21:31 #170698 by fungus
THC using DAC & HAL was created by fungus
Hi folks,

I am in the process of a plasma table retrofit, and I want to nip one thing in the bud while I'm building my PCBs.
I am using a MESA 7i93 (ethernet anything I/O) along with a 7i33TA (quad analog servo interface).

I would like to use a digital -> analog converter to bring the torch voltage values directly into HAL, and make decisions on torch height there. I do have a little experience in building custom HAL components, so I will handle that when I get to it.

The primary question here is DAC interface.
  1. I can do parallel, utilizing an 8-bit parallel out DAC into the I/O of the 7i93, then convert to float internal to HAL. Since I would be using parallel bits to encode an analog value, I would have to be careful of how delays between bits were handled, as they could lead to large switching errors. I would still have gobs of I/O left over.
  2. I could do an SPI interface, but I honestly don't know how exactly I'd go about this. The FPGA should be able to handle the SPI on any I/O lines with a custom bitfile, but this is the extent of my understanding. It looks like the MCP3301 continuously pumps out data (doesn't even have a MOSI line), so that could directly update a HAL pin possibly? Could anyone share some knowledge or experience in LinuxCNC SPI with me?
I have multi-kV isolators for both SPI and parallel interfaces that I intend to buffer through, whichever way I go.

Am I barking up the wrong tree? If I can handle this in HAL, I'd much rather do that than rig up an external THC box.

Thanks!
P.S. In my google searching, it is entirely possible I missed something obvious. Please tell me where I've gone wrong if I missed the obvious.

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

More
08 Jun 2020 21:46 #170699 by rodw
Replied by rodw on topic THC using DAC & HAL
There are probably 2 obvious things that you missed:
Plasmac
linuxcnc.org/docs/2.8/html/plasma/plasmac-user-guide.html

And Mesas's THCAD voltage to frequency converters. We read these from the encoder input and convert the frequency count back to a voltage in software and they are already optimised and hardened for the hostile plasma electrical environment.

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

More
08 Jun 2020 21:49 #170700 by PCW
Replied by PCW on topic THC using DAC & HAL
I think the easiest way is a V-F converter (Like the THCAD)
This could be as simple as a 555 or Op-amp based V-F circuit and
an optoisolator. The frequency can be read by an encoder input
The frequency should be higher than about 5 KHz so the update
rate is not affected.
The following user(s) said Thank You: thefabricator03

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

More
08 Jun 2020 21:53 #170701 by tommylight
Replied by tommylight on topic THC using DAC & HAL

P.S. In my google searching, it is entirely possible I missed something obvious. Please tell me where I've gone wrong if I missed the obvious.

Seems like you missed the Mesa THCAD, or not ?
I have made several THC's, all of them worked properly, one design worked way to fast so had to slow it down as it was trying to adjust the height at 4000 times per second, etc. So anything from 15 Euro to over 800 a piece invested on them.
All that has taught me: Buy a THCAD from Mesa.
So now i use THCAD exclusively, and combined with PlasmaC config on LinuxCNC, there is nothing even close for a much, much higher price.
In any case, i would not bother with it, Mesa costs about a weeks worth of coffee.
I have wasted so much time on building and testing them that i regret even trying.
The following user(s) said Thank You: thefabricator03

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

More
09 Jun 2020 00:11 #170729 by fungus
Replied by fungus on topic THC using DAC & HAL
I had actually run across THCAD, and the approach is very interesting; I might give that a shot. I didn't get one due to the fact that my power supply has no low voltage out, and the peak voltage is 340V. I could have hooked the 0-10V version up to my hacked-in voltage divider, but I really want to gain more experience with getting analog values into LinuxCNC. PCW's artwork is fantastic, but I can't help but tinker with this stuff. I would like to tinker with torque-mode servo control in the future, and this is a decent stepping stone.

As for PlasmaC, it seems interesting, but did not seem to gain much ground for the extra effort. I could be entirely missing the point (as I have never used a CNC plasma myself). My intention was simply to use a 4-axis configuration (I have a servo Z as well as a 4th axis for tube) and a custom component to manage the torch height. I have a router attachment for this as well, which I was planning to handle under the same config; I could split it into a plasma config and a mill config though.

Tommy, you must drink fancier coffee than I do ;)
The following user(s) said Thank You: tommylight

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

More
09 Jun 2020 00:49 #170734 by tommylight
Replied by tommylight on topic THC using DAC & HAL
linuxcnc.org/docs/html/man/man9/thc.9.html
That is the included component for THC in LinuxCNC, so it is easy to setup and use, but will need gcode routine for finding the material and retracting to pierce height.
And coffee here costs 0,7 to 1 euro in bars and restaurants, but i do have lots of friends.
I was an espresso aficionado till end of last summer, got food poisoning, dehydrated badly due to being on the sun all day, could not drink espresso after that. Now i drink Jacobs instant coffee ! What has my life come to .... :)

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

More
09 Jun 2020 02:12 #170747 by rodw
Replied by rodw on topic THC using DAC & HAL

I had actually run across THCAD, and the approach is very interesting; I might give that a shot. I didn't get one due to the fact that my power supply has no low voltage out, and the peak voltage is 340V. I could have hooked the 0-10V version up to my hacked-in voltage divider, but I really want to gain more experience with getting analog values into LinuxCNC. PCW's artwork is fantastic, but I can't help but tinker with this stuff. I would like to tinker with torque-mode servo control in the future, and this is a decent stepping stone.

As for PlasmaC, it seems interesting, but did not seem to gain much ground for the extra effort. I could be entirely missing the point (as I have never used a CNC plasma myself). My intention was simply to use a 4-axis configuration (I have a servo Z as well as a 4th axis for tube) and a custom component to manage the torch height. I have a router attachment for this as well, which I was planning to handle under the same config; I could split it into a plasma config and a mill config though.

Tommy, you must drink fancier coffee than I do ;)


The THCAD-10 can handle overvoltage to 500 volts indefinitely and can be scaled to any full scale reading you want with a handful of resistors.

I would strongly recommend you go with Plasmac. Without fail I think everybody here who was doing plasma before plasmac was released has adopted it. But along the way all of our collective learnings has been rolled into plasmac which is why it is so good.

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

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