MPCNC Plasma build with external THC

HI guys.

Just finished printing off all the parts, and today received my build kit, thanks V1 way faster shipping to Australia than expected.
I am gathering equipment to build it still, and I have been doing a bunch of reading on THC for plasma units.
I have ordered the Proma THC SD unit with the intention of using it with this project.
I went with mini rambo board.

My questions to you gurus, has anyone tried to intercept the Step and Dir lines for using external THC with the mini rambo?
I am thinking about how I might be able to do this with minimal hacking of the board.
I was originally thinking about using the test pins for EN, Step and Dir and using an external stepper driver, but not sure if I need any other pins to make this work, ie MS1 and MS2 and Zref.
If these are required, is it better to try and tap these off the on-board stepper driver chip? or some other way?

I have found some useful information and drawings on the reprap wiki.

I am sure I can make it work, just need some advice on pins/data lines required.
Thanks in advance.

You want marlin to control the Z stepper, but also respond to commands from the thc?

En, dir, step are the only ones you need from Marlin, and since the mini rambo only has those as teeny tiny pins, O would try to find other pins you can use and just change the assignments in the pins file. Then you’ll need something to read those pins add in the THC offset and then control another driver using En, Dir, and Step. That driver will need to have its MS pins wired right and Vref set.

I should probably explain how the THC works.
The stand alone THC takes the Step and Dir lines in and changes them to suit and outputs them to the stepper controller.
Basically Marlin does its normal control, and the THC fine tunes the Z position up and down to optimise.
In my research I found there are test points on the bottom of the MiniRambo board that I could solder to, that will give me Step Dir, EN and Ref.
What do the MS pins do? and do I need them? can I work around them?

The THC won’t be able to override what the mini rambo is sending to the driver on the board, so you can use the test points to go to the THC, but then the output from the THC would go to an external stepper driver. I would use a A4498 because that’s what is on the mini rambo.

The MS points control the microstepping. You need to just wire them all to ground (I think, it might be to 5V).

Do you already have the mini rambo? Is that why you want to use it specifically?

I agree with Jeff, it seems like the simplest thing to do would be to reassign some pins.

For your reference if you haven’t already seen it:

I wonder if you could reassign the dir and step pins to something else, and leave the actual en dir pins floating (from the microprocessor perspective) and then wire the output of the THC into the test pads to drive the on board driver. I would want to look carefully at the schematic to make sure there are no surprises.

But honestly, seems like a waste to avoid using a $5 driver.

thanks for the replies guys.
I am quite happy to use external step driver, that seems easiest solution.
Looking at the schematic again, thanks Kyle, it mentions the drivers are A4982.
checking the data sheet for this, I found this truth table.

Table 1: Microstep Resolution Truth Table
MS1 MS2 Microstep Resolution Excitation Mode
L L Full Step 2 Phase
H L Half Step 1-2 Phase
L H Quarter Step W1-2 Phase
H H Sixteenth Step 4W1-2 Phase

Does anyone know if this is a fixed setting or does Marlin interactively change this throughout printing?
If so does it matter if we fix it in a position? I would think probably not given it will be driving a leadscrew for plasma cutting, not 3d printing, so small resolution is not (I think) needed to be that small.

On the topic of re-assigning pins in the program, how do you know what pins are available to be used still? and where to find them on the board?

And another side question, possibly related to the above, how do I drive a relay on and off for starting the cutter? can I use the otherwise unused heated bed or extruder heater outputs? are these just a Gcode we can call? would it have been included in the V1 version of Marlin supplied with the board?

Sorry for all the questions guys, thank you so much for your assistance.

This is all beyond me. I would just personally be looking at a tb6600 because I don’t understand anything you just said :slight_smile: I bet others can help you here.

I would study the previously linked schematics to see what pins are available and can be assigned or reassigned in the firmware.

I used gcodes M106 and M107 to switch the “fan” pins high and low to run a relay for a router. You could do that and there would be no need for firmware changes. You’d want to play with your post processor and consider that the initial pierce height is different than the cut height and pierce dwell time. Are you going to implement a float switch or ohmic sensor?

I haven’t looked into the pierce and cut heights yet, I thought maybe the THC might do this part for me.
I will have to do some more research on this.
I like the simplicity of the fan switch, that seems like easiest option.

You can change it via gcode, but you’d have to be a madman to change it frequently. You usually set it up and forget it. Just assume you will always be 1/16th microstepping.

You can find a ton of info at pololu. You can usually find these little boards at the usual places (amazon, ebay, banggood) for pretty cheap. They are comodity chips.

There are some places where they have been laid out for things like servos, or extra endstops, or if you don’t use a screen, you get a ton of pins available. You can’t use just any though, I believe they need to be PWM capable. I would google for “5th stepper mini rambo” or something to get someone that has already figured it out. If you hit a wall, you can always use the test pads.

As Kyle said, the fan is easier, because it doesn’t have any feedback thermistor and thermal protection. It is low side drive, meaning the (+) is always 12V and the (-) is either floating with a pull up to 12V or ground. The “iot relay” from amazon will trigger on this differential signal just fine though.

Some arduino pins are PWM-capable and some are not. You can use a non-PWM pin for a relay as it is just on/ off control. If you want variable speed or intensity control you’ll probably want a PWM pin. Also the arduino is limited in the amperage it can manage so use of transistors or mosfets are needed for larger loads.

The default RAMPS configuration supports 4 r/c-style servos which use PWM-enabled pins 4, 5, 6, and 11. If you’re not using servos those are easy to remap and in a pretty convenient spot on the RAMPS board. For example, on 3D printers it is fairly common to run a temperature controlled hot-end fan (different from a part cooling fan) on pin 11, and I have used pins 4, 5, and 6 with some transistors to control RGB led strips (but I’m not using servos for anything).

I don’t have a RAMBO so don’t know if the pins are as easy to get to on that board.

And just to clarify, you can use a pwm capable pin in non-pwm applications. The fan pins to switch the relay for example.

Out of curiosity is there anything that op is wiring up that does need pwm?

I thought they played games with the step pins that needed pwm.

1 Like

No plans for any PWM outputs.