THC on a new Plasma build

Moderators: TomKerekes, dynomotion

Post Reply
scott
Posts: 3
Joined: Thu Dec 05, 2019 10:24 pm

THC on a new Plasma build

Post by scott » Thu Dec 05, 2019 11:16 pm

I am starting a new plasma table build. I am planning on using KmotionCNC with Kflop for the controller. All motions are DC motors with encoder feedback to two snapamp drivers. It will have 2 x motors, 1 y and 1 z motor in a typical gantry layout. I have done this before with a CNC setup, but I have questions about the THC. I understand the THC controls the height of the tip using the voltage from the plasma source. I have read many ways that this can be accomplished.

Is there a preferred method and hardware to accomplish this task using KmotionCNC?

User avatar
TomKerekes
Posts: 2527
Joined: Mon Dec 04, 2017 1:49 am

Re: THC on a new Plasma build

Post by TomKerekes » Fri Dec 06, 2019 5:20 pm

Hi Scott,

I'm not aware of a particularly good method of interfacing the plasma voltage to KFLOP. It would be good to have it somehow opto isolated. One method of doing this might be to convert the voltage to a frequency, pass the digital signal through an opto coupler, then into a KFLOP encoder input, then have KFLOP measure the frequency (delta count / delta time).

From a control standpoint it is usually best to have a dual loop configuration. The inner control loop is a standard absolute position z axis. The outer control loop targets a specific plasma voltage by commanding the velocity of the inner loop to move up and down.

It is also common to have an M Code switch between modes: single or dual control loops.
Regards,

Tom Kerekes
Dynomotion, Inc.

scott
Posts: 3
Joined: Thu Dec 05, 2019 10:24 pm

Re: THC on a new Plasma build

Post by scott » Fri Dec 06, 2019 7:13 pm

I should use a board such as the THCAD from Mesa to convert from voltage to a frequency at a range of 100KHz to 1Mhz. Then bring it into an encoder input. I understand what you are saying about the dual loop control in theory, how difficult is this to implement in the kflop?

User avatar
TomKerekes
Posts: 2527
Joined: Mon Dec 04, 2017 1:49 am

Re: THC on a new Plasma build

Post by TomKerekes » Fri Dec 06, 2019 8:13 pm

Hi Scott,
I should use a board such as the THCAD from Mesa to convert from voltage to a frequency at a range of 100KHz to 1Mhz.
That should work well. KFLOP's encoder inputs require A B quadrature. I believe the THCAD only output's a single frequency signal. A simple RC circuit can be used create a slightly delayed version of the signal to form a quadrature like signal pair. Note also that KFLOP inputs are limited to 1 million quadrature counts/second which would correspond to 250KHz. Unfortunately I think the THCAD board only has an option to divide the 1MHz by 32 down to 31250 Hz. To get a reading with 1% resolution a sampling time of 3.2ms would be required. Probably plenty fast enough and with sufficient resolution depending on your application. Some THC systems work with only periodic Up/DOWN signals.
I understand what you are saying about the dual loop control in theory, how difficult is this to implement in the kflop?
Quite easily. For example this code can be used to connect the two loops together. The output of the outer loop (ch2->Output) is used to ramp the target Destination (ch0->Dest) of the inner loop.

Code: Select all

main()
{
    for (;;)  // loop forever
    {
    	WaitNextTimeSlice();
		ch0->Dest += ch2->Output;  // move ch0 at speed of ch2 output
    }
}
The two loops can be tuned independently like any other axis.
Regards,

Tom Kerekes
Dynomotion, Inc.

scott
Posts: 3
Joined: Thu Dec 05, 2019 10:24 pm

Re: THC on a new Plasma build

Post by scott » Fri Dec 06, 2019 9:48 pm

Thanks for the quick and helpful response. I will be placing my order for new boards with Dyomotion early next week for the entire system. I look forward to the build with this kind of great assistance!

User avatar
TomKerekes
Posts: 2527
Joined: Mon Dec 04, 2017 1:49 am

Re: THC on a new Plasma build

Post by TomKerekes » Sat Dec 07, 2019 10:59 pm

Hi Scott,

BTW I found this old Thread on cnczone.

It shows a spice simulation on how a 3V differential signal (black/green square wave traces) can be converted to a delayed 2.5V differential signal (gold/blue traces) using two 100ohm resistors and one 0.01uF capacitor.
PulseToQuadratureSchematic.jpg

Note that the delayed signals switch polarities ~1us (vertical dashed lines) after the original differential signal switches polarities.
PulseToQuadrature.jpg

The OP describes a digital circuit design which is basically a two bit counter with exclusive-or logic to convert the counter bits to quadrature. The advantage here is the full 1MHz could be used as the circuit would naturally convert the frequency to quadrature counts/second.
PulseToQuadLogic.png
XOR SPICE VIEW.jpg
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply