Plasma Torch Height Controller via encoder input

This is the place to talk about and share things related to CNC plasma machines using UCCNC

Plasma Torch Height Controller via encoder input

Postby Robertspark » Tue Aug 29, 2017 8:36 am

Firstly, this is just something I picked up from a discussion on another forum that got me thinking (I have an expensive THC already, but was wondering if there was a cheaper solution that could be considered by some maybe)? I am not about to jump ship to linuxCNC as I've got way too many projects on the go and have not got the time to start things from scratch.
Thread discussion here (mainly a list of THC's, but got onto the inner workings of THC's) http://www.plasmaspider.com/viewtopic.php?f=3&t=23286


I came across a MESA THCAD which is available as two variants a 0-10V and a 0-300V Analog to Digital Converter (ADC).
US$69 + shipping
http://store.mesanet.com/index.php?rout ... uct_id=127
http://store.mesanet.com/index.php?rout ... uct_id=128
http://www.mesanet.com/pdf/analog/thcadman.pdf
Image

I had not considered an ADC that output the analog voltage as a frequency before (knew of them, just did not see an application for it until now).

Firstly if anyone is considering this, I would recommend the 0-10V variant as it allows for more flexibility via adding an approprate additional resistor to increase the range of the ADC.

Apparently because this ADC uses Delta-Sigma voltage to frequency converson is is more noise immune than other ADC conversion options.
Bit of a write up here: https://www.maximintegrated.com/en/app- ... vp/id/1870
__________________________________________________________________________________________________________________________________________

Background waffle now out of the way, I noticed that the THCAD was able to to be used with an encoder input from the manual, given it outputs frequency which is proportional to the measured voltage.

The default output frequency is 100kHz to 1MHz (1:1 scale), although frequncy dividers are available at 32, 64, and 128.

Hence 1Mhz full scale will become 31,250Hz with a 32:1 divider jumper setting.

Having read in another post on encoders within the Hardware section of this forum, the maximum encoder input frequency is 1/2 the kernal frequency of the UC motion controller, 1Mhz is a little high, but ~32Khz is well within the realms of the UC motion controllers for an encoder input to provide ADC input for something like Torch Height Control.

There is a catch in that I cannot see at present how the z axis could be controlled by this (fast) as the plugin / macro loop is 20Hz, hence we would need for CNCDrive to provide access to a faster loop as a comparitor to be able to track the encoder input relative to the target encoder setting via some sort of a P, PI or PID loop.

It looked an interesting THC option though for integril THC via a simple PCB with good isolation.

Thoughts anyone?
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1113
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Plasma Torch Height Controller via encoder input

Postby cncdrive » Tue Aug 29, 2017 9:23 am

Hi Rob,

You can simply make the loop faster with adding your own loop inside the macro.
I mean a macro loop is internally embedded like:

Code: Select all
while(loop)
{

//Your code goes here

Thread.Sleep(50); Waits 50msec
}


So, if you embed your own loop inside the macro loop and your own Thread.Sleep then you can make the macro faster, like:

Code: Select all
while(loop)
{

//Your code starts
while(loop)
{
//Your loop code goes here
Thread.Sleep(1); //In this case the loop freq. will be around 1/1000Hz=1kHz, the loop wait time will be 1msec.
}
//Your code ends

Thread.Sleep(50); Waits 50msec
}
cncdrive
Site Admin
 
Posts: 2374
Joined: Tue Aug 12, 2014 11:17 pm

Re: Plasma Torch Height Controller via encoder input

Postby Robertspark » Tue Aug 29, 2017 9:31 am

Balazs,

Thanks for that (something else for me to experiment with :) )
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1113
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Plasma Torch Height Controller via encoder input

Postby shad » Wed Aug 30, 2017 6:27 am

Hello!
The main thing - how UCCNC will control z axis using arc voltage data.
Now z axis work in the position command mode. This is not usable for PID THC, because this is closed loop control based on the error between target arc voltage and measured. No chance to find correct depends between arc voltage and torch height, this data is very different in each cut.
Balazs, what you think - is it possible to add speed control mode for z axis and switch axis to this mode during cutting (you know this mode, for example there are drivers with +-10V speed control - this is very similar)?
For example we have signed value from PID controller "S" which present the required torch speed. Every 20 msec new speed value goes to the controller and controller change speed depend from this value. Of course using acc/dec. The sign of the "S" determines the move direction - up/down. Also we need to add to the UCCNC PID control module. All this are REAL TIME task.
In this case we will have really working system.
Rob, if this will implement - no difference how arc voltage value goes to the UCCNC - Frequency, PWM, MODBUS, Ethernet.
Not problem for me to make easy THC converter module between plasma cutter and UCCNC using Ethernet interface.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 270
Joined: Thu Sep 15, 2016 5:23 pm

Re: Plasma Torch Height Controller via encoder input

Postby cncdrive » Wed Aug 30, 2017 3:43 pm

Hi Andrew,

Hmm, you can already control the Z-axis using the virtual THC up/down signals.
And you can already control the THC speed via the THC speed DRO value.
So, basicly you can already give a speed reference signal and direction to control the Z-axis.
cncdrive
Site Admin
 
Posts: 2374
Joined: Tue Aug 12, 2014 11:17 pm

Re: Plasma Torch Height Controller via encoder input

Postby shad » Wed Aug 30, 2017 6:02 pm

That's why a Neuron THC was created.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 270
Joined: Thu Sep 15, 2016 5:23 pm


Return to CNC Plasma

Who is online

Users browsing this forum: No registered users and 1 guest