I can't reverse the spindle rotation.
- Ismacr63
- Offline
- Elite Member
-
Less
More
- Posts: 160
- Thank you received: 8
23 Jun 2026 21:26 #347286
by Ismacr63
I can't reverse the spindle rotation. was created by Ismacr63
Hey everyone,
I'm stuck with a weird problem and could use some advice.
I've got a 3-axis mill with a 1.8kW AC servo on the spindle. It used to run perfectly from a parallel port and a Chinese BOB. I'm now upgrading to a Mesa 7i92, still using the same BOB.
To reverse the spindle I've always used a PC817 optocoupler module. When the REV signal is active, the module pulls the servo driver's DI4 pin to GND, and the spindle reverses. Simple.
Now with the 7i92, everything else works (motion, outputs, etc.), but the spindle reversal doesn't. The LED on the PC817 module lights up when REV is on, but the spindle doesn't reverse. If I take a piece of wire and manually jumper DI4 to GND, it reverses instantly. I've even tried a brand new PC817 module – same behavior.
Wiring of the PC817:
Input side: IN → pin 9 of the BOB, GND → BOB GND
Output side: V (collector/output) → DI4 on the servo driver, GND → servo driver GND
The BOB GND and the servo driver GND are common.
What puzzles me is that this exact setup worked fine with the parallel port. Why would the 7i92 cause a problem with the same BOB and wiring? Is there something different about the 7i92 outputs that could mess with the PC817?
Is there a better or more reliable alternative to these PC817 modules for this kind of level shifting?
Thanks in advance
I'm stuck with a weird problem and could use some advice.
I've got a 3-axis mill with a 1.8kW AC servo on the spindle. It used to run perfectly from a parallel port and a Chinese BOB. I'm now upgrading to a Mesa 7i92, still using the same BOB.
To reverse the spindle I've always used a PC817 optocoupler module. When the REV signal is active, the module pulls the servo driver's DI4 pin to GND, and the spindle reverses. Simple.
Now with the 7i92, everything else works (motion, outputs, etc.), but the spindle reversal doesn't. The LED on the PC817 module lights up when REV is on, but the spindle doesn't reverse. If I take a piece of wire and manually jumper DI4 to GND, it reverses instantly. I've even tried a brand new PC817 module – same behavior.
Wiring of the PC817:
Input side: IN → pin 9 of the BOB, GND → BOB GND
Output side: V (collector/output) → DI4 on the servo driver, GND → servo driver GND
The BOB GND and the servo driver GND are common.
What puzzles me is that this exact setup worked fine with the parallel port. Why would the 7i92 cause a problem with the same BOB and wiring? Is there something different about the 7i92 outputs that could mess with the PC817?
Is there a better or more reliable alternative to these PC817 modules for this kind of level shifting?
Thanks in advance
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 21651
- Thank you received: 7396
23 Jun 2026 21:51 - 23 Jun 2026 21:52 #347289
by tommylight
Replied by tommylight on topic I can't reverse the spindle rotation.
Do i understand correctly, you have a BOB attached to Mesa, and then from BOB to PC817?
That seems redundant as you already have the GND's wired together, so might want to get rid of the PC817 as it is not isolating anything.
Is there any resistor on the input side of the PC817?
There must be one, probably a 47-100 ohm should work.
also, might want to try the pull down version, so the pin 9 to the other input of PC817, and the input that was on pin 9 to +5V. This might also require inverting the pin in hal.
That seems redundant as you already have the GND's wired together, so might want to get rid of the PC817 as it is not isolating anything.
Is there any resistor on the input side of the PC817?
There must be one, probably a 47-100 ohm should work.
also, might want to try the pull down version, so the pin 9 to the other input of PC817, and the input that was on pin 9 to +5V. This might also require inverting the pin in hal.
Last edit: 23 Jun 2026 21:52 by tommylight. Reason: typo
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 17927
- Thank you received: 5251
23 Jun 2026 21:58 - 23 Jun 2026 21:59 #347290
by PCW
Replied by PCW on topic I can't reverse the spindle rotation.
Is it a hal setup error?
For Mesa FPGA cards you need to know the GPIO pin number
for the pin and to set that GPIO pin into output mode.
For Mesa FPGA cards you need to know the GPIO pin number
for the pin and to set that GPIO pin into output mode.
Last edit: 23 Jun 2026 21:59 by PCW.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 21651
- Thank you received: 7396
23 Jun 2026 22:02 #347291
by tommylight
Replied by tommylight on topic I can't reverse the spindle rotation.
The LED on the PC817 module lights up when REV is on, but the spindle doesn't reverse.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 17927
- Thank you received: 5251
23 Jun 2026 22:13 - 23 Jun 2026 22:29 #347292
by PCW
Replied by PCW on topic I can't reverse the spindle rotation.
Can you check the output of the module with an ohmmeter?
If the PC817 module needs 5V drive you would have to connect it in sinking
mode to the 7I92. ( +5V to PC817 module IN+ 7I92 output to
PC817 module IN- and active low output )
Is there some other issue with reverse in the hal file
( like PWM connections if you have spindle speed control )
If the PC817 module needs 5V drive you would have to connect it in sinking
mode to the 7I92. ( +5V to PC817 module IN+ 7I92 output to
PC817 module IN- and active low output )
Is there some other issue with reverse in the hal file
( like PWM connections if you have spindle speed control )
Last edit: 23 Jun 2026 22:29 by PCW. Reason: clarify
Please Log in or Create an account to join the conversation.
Time to create page: 0.095 seconds