Stuck with spindle interface 7i76 card and weird BLDC driver
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
01 Feb 2025 09:59 - 03 Feb 2025 11:32 #320310
by timo
Stuck with spindle interface 7i76 card and weird BLDC driver was created by timo
Hello,
I tried to figure that out, but not really successful, so I spam the forum with the questions. (I have the feeling I should have found the information somewhere; maybe someone can point me in the right direction)
I have a 6i25 card with a 7i76 card connected to my PC. Some stepper motors are running and can be moved with keyboard, a basic configuration is running.
Now I got stuck, trying to hook up the old BLDC driver (labeled TONMAN Brushless DC driver) or the machine (which I have no documentation for) seems not to run with an analog input.
I tried to connect the Spindle interface somehow, but it does not want to run.
There is a pair of pins labeled +- (PWM / ANNA), but I think it is not really for analog input signal.
Hooking up a potentiometer (allowing to create a voltage between 0 and 5V) does nothing to a certain voltage. At approx. 2.6V it switches from "off" to "full speed".
I tried one of those PWM generators which works fine. It allows to control the speed of the motor, no issue. I can adjust the motor speed by setting the duty cycle to anything between 10% and 100% and it seems to be what I need.
Now the questions: Is it correct that in my situation the spindle interface of the 7i76 is just the wrong choice for my BLDC amplifier?
How do I make a PWM control for my spindle with the 7i76 (6i25)?
Greetings Timo
I tried to figure that out, but not really successful, so I spam the forum with the questions. (I have the feeling I should have found the information somewhere; maybe someone can point me in the right direction)
I have a 6i25 card with a 7i76 card connected to my PC. Some stepper motors are running and can be moved with keyboard, a basic configuration is running.
Now I got stuck, trying to hook up the old BLDC driver (labeled TONMAN Brushless DC driver) or the machine (which I have no documentation for) seems not to run with an analog input.
I tried to connect the Spindle interface somehow, but it does not want to run.
There is a pair of pins labeled +- (PWM / ANNA), but I think it is not really for analog input signal.
Hooking up a potentiometer (allowing to create a voltage between 0 and 5V) does nothing to a certain voltage. At approx. 2.6V it switches from "off" to "full speed".
I tried one of those PWM generators which works fine. It allows to control the speed of the motor, no issue. I can adjust the motor speed by setting the duty cycle to anything between 10% and 100% and it seems to be what I need.
Now the questions: Is it correct that in my situation the spindle interface of the 7i76 is just the wrong choice for my BLDC amplifier?
How do I make a PWM control for my spindle with the 7i76 (6i25)?
Greetings Timo
Attachments:
Last edit: 03 Feb 2025 11:32 by timo. Reason: adding the brand of driver (if it helps anyone)
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18388
- Thank you received: 5020
01 Feb 2025 19:50 #320347
by PCW
Replied by PCW on topic Stuck with spindle interface 7i76 card and weird BLDC driver
Yeah, sounds like it's a 5V PWM input.
There is 5I25 +7I76 firmware that replaces one stepgen (stepgen4)
with a PWMGen:
Which should work to drive the motor driver
There is 5I25 +7I76 firmware that replaces one stepgen (stepgen4)
with a PWMGen:
Which should work to drive the motor driver
Attachments:
The following user(s) said Thank You: timo
Please Log in or Create an account to join the conversation.
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
02 Feb 2025 07:27 #320393
by timo
Replied by timo on topic Stuck with spindle interface 7i76 card and weird BLDC driver
Thank you for reply.
So to change the firmware rather than using the software PWM is the way to go?
linuxcnc.org/docs/html/man/man9/pwmgen.9.html
I will give the the firmware change a try.
I hope I will not "brick" the card.
So to change the firmware rather than using the software PWM is the way to go?
linuxcnc.org/docs/html/man/man9/pwmgen.9.html
I will give the the firmware change a try.
I hope I will not "brick" the card.

Please Log in or Create an account to join the conversation.
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
02 Feb 2025 16:39 #320428
by timo
Replied by timo on topic Stuck with spindle interface 7i76 card and weird BLDC driver
I used sudo mesaflash --device 5i25 --write 5i25_7i76x2_1pd.bit --reload
Now I cannot get the direction change working. Is the direction pin of the stepgen still working?
I am using TB3 Pin2 und Pin3 for the PWM.
I tried to find a direction pin.
I can switch the spindle on and off via Axis UI and can also change speeds. (but not the directions)
Now I cannot get the direction change working. Is the direction pin of the stepgen still working?
I am using TB3 Pin2 und Pin3 for the PWM.
I tried to find a direction pin.
I can switch the spindle on and off via Axis UI and can also change speeds. (but not the directions)
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18388
- Thank you received: 5020
02 Feb 2025 17:14 #320431
by PCW
Replied by PCW on topic Stuck with spindle interface 7i76 card and weird BLDC driver
The direction pin is GPIO (GPIO8)
So you need to set gpio8's is_output parameter
and link it to the spindle direction pin.
So you need to set gpio8's is_output parameter
and link it to the spindle direction pin.
Please Log in or Create an account to join the conversation.
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
02 Feb 2025 18:41 #320441
by timo
Replied by timo on topic Stuck with spindle interface 7i76 card and weird BLDC driver
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18388
- Thank you received: 5020
02 Feb 2025 19:17 #320443
by PCW
Replied by PCW on topic Stuck with spindle interface 7i76 card and weird BLDC driver
All pins have GPIO capability (primary function)
Secondary functions are PWM,Stepgen etc
Secondary functions are PWM,Stepgen etc
Please Log in or Create an account to join the conversation.
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
03 Feb 2025 06:22 - 03 Feb 2025 11:46 #320471
by timo
Replied by timo on topic Stuck with spindle interface 7i76 card and weird BLDC driver
I do not really understand. If I flash another bit file (obviously it has two pwm gen) it shows four lines. (that is not a fix, because I wanted to use a stepgen on pin4 and Pin17)
IOPortTag & x"00" & PWMTag & PWMBDirPin, -- I/O 06 PIN 4
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 07 PIN 17
IOPortTag & x"01" & PWMTag & PWMBDirPin, -- I/O 08 PIN 5
IOPortTag & x"01" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
The version with one PMW shows only one line. One line seems to be "empty".
IOPortTag & x"00" & NullTag & NullPin, -- I/O 08 PIN 5
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
Is there something missing? I would have expected something like:
IOPortTag & x"00" & PWMTag & PWMBDirPin, -- I/O 08 PIN 5
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
Greetings Timo
p.s. Do I understand it right that the gpio.008 is not predefined connected for this pwmgen, but could have been used for something else as well?
I am still curious if the tags in the firmware would change anything in terms of use.
Now I put folllowing lines in the .hal (particular unsecure if the setp is what is to be done)
setp hm2_5i25.0.gpio.008.is_output 1
net spindle-ccw spindle.0.reverse => hm2_5i25.0.gpio.008.out
That switches the polarity on the TB3 pin4 and TB3 pin5, that again changes the direction of the motor.
Do not fully understand why it does not switch between 0 and 4.9V. It switches between -4.9V and 4.9V.
IOPortTag & x"00" & PWMTag & PWMBDirPin, -- I/O 06 PIN 4
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 07 PIN 17
IOPortTag & x"01" & PWMTag & PWMBDirPin, -- I/O 08 PIN 5
IOPortTag & x"01" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
The version with one PMW shows only one line. One line seems to be "empty".
IOPortTag & x"00" & NullTag & NullPin, -- I/O 08 PIN 5
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
Is there something missing? I would have expected something like:
IOPortTag & x"00" & PWMTag & PWMBDirPin, -- I/O 08 PIN 5
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 09 PIN 6
Greetings Timo
p.s. Do I understand it right that the gpio.008 is not predefined connected for this pwmgen, but could have been used for something else as well?
I am still curious if the tags in the firmware would change anything in terms of use.
Now I put folllowing lines in the .hal (particular unsecure if the setp is what is to be done)
setp hm2_5i25.0.gpio.008.is_output 1
net spindle-ccw spindle.0.reverse => hm2_5i25.0.gpio.008.out
That switches the polarity on the TB3 pin4 and TB3 pin5, that again changes the direction of the motor.
Do not fully understand why it does not switch between 0 and 4.9V. It switches between -4.9V and 4.9V.
Last edit: 03 Feb 2025 11:46 by timo.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18388
- Thank you received: 5020
03 Feb 2025 18:08 - 03 Feb 2025 18:18 #320520
by PCW
Replied by PCW on topic Stuck with spindle interface 7i76 card and weird BLDC driver
The outputs on TB3 pin 4 and 5 should be used individually,
that is, you would use the appropriate output and
GND (TB3 pin 1) NOT both outputs to create a 5V signal
Which output you chose depends on the direction polarity.
On later bitfiles I have changed from PWMDIR to GPIO
on some configurations because it is more flexible
(many systems do not use the DIR pin and it is unavailable
as a general purpose output in these cases)
And yes, GPIO8 can be used for any type of output.
that is, you would use the appropriate output and
GND (TB3 pin 1) NOT both outputs to create a 5V signal
Which output you chose depends on the direction polarity.
On later bitfiles I have changed from PWMDIR to GPIO
on some configurations because it is more flexible
(many systems do not use the DIR pin and it is unavailable
as a general purpose output in these cases)
And yes, GPIO8 can be used for any type of output.
Last edit: 03 Feb 2025 18:18 by PCW.
The following user(s) said Thank You: besriworld, timo
Please Log in or Create an account to join the conversation.
- timo
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 39
04 Feb 2025 04:51 #320569
by timo
Replied by timo on topic Stuck with spindle interface 7i76 card and weird BLDC driver
Thank you. That clears things up a little more.
So I can change the wiring a bit, Maybe even connect the other pin to the drive enable.
So I can change the wiring a bit, Maybe even connect the other pin to the drive enable.
Please Log in or Create an account to join the conversation.
Time to create page: 0.297 seconds