Arduino Pulse multiplier

I’ve searched the Internet for a solution to multiply pulses coming from an stepper controller without any success,

I don’t have enough experience to write the code needed my self and are seeking guidance to make it possible,

The idea is that a controller send pulses and direction signal to a stepper driver, the stepper driver in this case is used by two different controllers:

Controller 1 (only capable of 1/4 microstepping)
Controller 2 (Capable of 1/32 microstepping)

These two controllers will be selected via a relay to choose which one of the controllers is wired to the driver when that controller function is called for

Controller 1 is a ELS Basic 4 controller and in my setup is only capable of a maximum of 800 or 1/4 microstepping, and the other controller will run at 1/32 or higher to make the machine run smoother,

So my headache is to make a multiplier that will take 1/4 pulses and then multiply them to match controller 2 output:

(Controller 1 (1/4) -> (multiplier) -> Output (1/32) -> Stepper driver)

Otherwise it would be needed for me to change the the microstepper switches manually on the drive every time I switch between the 2 controllers,

Would you also need to switch the enable and the direction? Are the grounds and power for both controllers the same?

I guess I’ll bypass the Arduino with the direction and enable signal and run straight from the controllers, the only thing modified will be pulse signal,

Controller 1 and 2 will be isolated from each other via a relay (4 pole double trow)

5V/EN/Step/Dir controller 1 -> NO side of relay
5V/EN/Step/Dir controller 2 -> NC side of relay
5V/EN/Step/Dir to driver from -> Common of relay

By switching the relay on you select controller 1 for example,

Forgot to mention that the controller needs to multiply 2 Step signals independently due to 2 axis control,

So you let one controller set the pin to run clockwise and the other controller set the pin to run clockwise and the other controller set the pin to run counter-clockwise?

Depends on what each controller wants the driver to do, I guess if controller 1 is in action it will tell the driver either high or low on the drivers Dir pin,

For example: (Relay is on) and controller 1 is wired to driver, direction enable and step signal is forwarded to the driver and controller 2 is bypassed

(Relay is off) and controller 2 is wired to driver, direction enable and step signal is forwarded to driver and controller 1 is bypassed

My thoughts about this solution is that either driver will tell direction pin what state to be,

If controller 1 was previously high (clockwise), and then switched to controller 2 and controller 2 wants it to be low (counterclockwise) the state will change and go counterclockwise

If state is still high (clockwise) when switching from controller 1 to controller 2 then the motor will go clockwise

(Not sure about which one of the states is clockwise or counterclockwise)

Relay mentioned earlier is 4PDT relays,

Relay for Y axis selection:

4 NO = (ENA/PUL/DIR/5V) from controller 1 (Y)
4 NC = (ENA/PUL/DIR/5V) from controller 2 (Y)
4 Common = (ENA/PUL/DIR/5V) to driver (Y)

Relay for Z axis selection:

4 NO = (ENA/PUL/DIR/5V) from controller 1 (Z)
4 NC = (ENA/PUL/DIR/5V) from controller 2 (Z)
4 Common = (ENA/PUL/DIR/5V) to driver (Z)

PERhaps you design is not complete, quite yet.

Not 100% that’s no problem to fix when the hard parts are figured out,

As for now the only thing stopping me is the pulse multiplier,

Basic functionality needed is:

Multiply pulse signals from ELS to match the other controller,

Only step signal is needed to be multiplied, by a adjustable amount x2 x4 x6 and so on to match pulses from the other controller,

You are thinking about the "pulse signal" the WRONG way. You need to reduce the time interval between pulses, so the first requirement is to measure the time between pulses and then divide that by some integer.

Which stepper motor(s)? Which stepper motor driver(s)?

There is some reason why you can't use a different controller/driver for each stepper?

Yes, but the amount of pulses per rev is still multiplied, fullstep 200 pulses per rev, half step 400 pulses per rev, and so on

Stepper driver: CL86T Stepper driver
Stepper motor: 34E1K-120 Stepper motor specs

I’m gonna try to explain the setup,

It’s a lathe I’m building, that has 2 different controllers,

First controller is a ELS basic Lead screw controller, it’s normally used on manual lathes “built by a manufacturer”
My lathe is DIY and have no way to disengage the halfnut for manual operation, so it’s controlled electronically.

The ELS isn’t made for jogging the machine more than short distances and zeroing the machine and the workpiece, everything else is normally moved by disengagement of the half nut to operate manually

= ELS disabled

That’s why I opened a thread on this forum with great success to make another controller to run in parallel with the ELS

The “secondary controller” will jog the 2 axis by 2 MPGs (manual pulse generators) one for each axis, and then there’s a 4way latching joystick to get continuous feedrate that’s adjustable with a potentiometer,

So there’s only 1 stepper and driver per axis

What is your level of programming experience?

Close to 0, some basic knowledge and understanding

Then you will probably have to pay someone.

That’s very possible, somehow there’s always people out there that’s glad to help, I know by my own experience and countless times that I’ve helped people for free, most of the time the feeling to be able to help is enough for me but that’s not the case for all,

Yes, I help a lot here but in the form of assistance with an existing project, not from scratch. Also it would be a huge project, taking many many hours. If you don't undertake some of the work, there won't be much interest. I didn't make the reality, I'm just telling you what it is.

Yes, of course. But is is MUCH easier to divide the off time by some integer value than it is just multiply the pulses with NO regard for the interval between pulses.