Mesa 7i96 to spindle FWD/REV control

More
07 May 2021 04:22 #208179 by mhd325ic
I am use a 7i96 as 4-axis + PWM/DIR to control the spindle of a CNC milling machine. The CNC milling machine has a FWD/REV manual switch which I want to be replaced by two relays as suggested in Franco's youtube channel. The connection scheme is shown in the attached the picture.

Is the following connection from 7i96 to relay module correct?

Dir4+ ---- input of relay 1
Dir4- ---- input of relay 2
GND ---- S/S of relay module

Sorry for the novice question.
mhd325ic
Attachments:

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

More
07 May 2021 11:55 - 07 May 2021 11:57 #208200 by BigJohnT
I would just use two outputs to control the spindle. PWM is Pulse Width Modulation. Step and Direction pins are 5v, not sure what voltage 4 is when flashed with pwm firmware.

You might want to try my 7i96 Configuration Tool .

From the 7i96 Manual:

All step and direction outputs are buffered 5V signals that can drive 24 mA.


JT
Last edit: 07 May 2021 11:57 by BigJohnT.

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

More
07 May 2021 14:16 - 07 May 2021 15:08 #208220 by mhd325ic
I used your conconfiguration tool. Thanks very much and I get xyz axis working like a charm. Now I am thinking retrofit to 7i96 spindle control.

My milling machine's spindle needs 0-5v analog voltage to control the RPM. My plan is to convert PWM signal by a PWM2DC module in order to replace the potentiometer outputs. And DIR signal is used to control switchover relays.

Thanks pointing out that voltage 4 may not be 5V pulse.

What is the best approach to retrofit 7i96 to my spindle control?

Thanks in advance!
Mhd325ic
Last edit: 07 May 2021 15:08 by mhd325ic.

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

More
07 May 2021 16:54 #208233 by BigJohnT

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

More
07 May 2021 18:39 #208241 by mhd325ic
Thank you for pointing to this post. This post and the mini lathe project are similar to my situation. It seems a good template for me to try and errors

After reading those posts, my plan is to use PMW4 for spindle variable voltage input and two 7i96 outputs for FWD/REV input.

Please point me out if I misunderstood the information. I will give it a try and posted back.

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

More
07 May 2021 22:58 #208264 by BigJohnT
Other post with same subject and question was deleted... no double posting it's too confusing.

JT

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

More
12 May 2021 23:59 - 13 May 2021 01:04 #208676 by mhd325ic
I use a cheap PWM2DC module to convert PMW4 signal to 0-5v analogy voltage and an opto-isolated relay module is used to implement digital switchover. Without connect to the milling machine spindle control, the output voltage and FW / REV switch over works as expected when measured with a multimeter. The modules that I used are and .


However, it trigged GFCI breaker when it connect to the milling machine. Now I am guessing that the problem is PMW2DC module which don't have opto-isolator. Is my guess correct?
Last edit: 13 May 2021 01:04 by mhd325ic.

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

More
18 May 2021 20:08 #209390 by mhd325ic
Thanks for the help from you and PCW. I got the logic correct. With a SPINX1 card, now 7i96 can control spindle actions of setup speed and directions.

The problem that I am facing is that there are about 25% difference on linuxcnc rpm and spindle rpm.

Is there any way to set scale using 7i96 configuration tool?

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

More
18 May 2021 21:42 #209415 by PCW
I dont know about the config tool but you can certainly change
the 7I96 PWM scale in the hal or ini file

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

More
19 May 2021 12:07 #209490 by mhd325ic
I did a calibration of actual rpm vs setted rpm in linuxcnc. The result is shown in the attached picture: in the setted rpm range of 0-2000, the spindle rpm of spindle is close to linear. If we can map the PWM duty range 0-0.8 to the spindle rpm 0-2500, the spindle speed control accuracy will be improved largely.

How to do it in the linuxcnc?
Attachments:

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

Moderators: PCWjmelson
Time to create page: 0.096 seconds
Powered by Kunena Forum