Stepgen and 4-phase steppers

More
24 Aug 2020 20:26 #179273 by tommylight
linuxcnc.org/docs/html/man/man9/bldc.9.html
linuxcnc.org/docs/html/man/man9/stepgen.9.html
Both of them will do what you want, BLDC with no feedback or stepgen with step type 3 or 4.

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

More
24 Aug 2020 21:00 - 24 Aug 2020 21:10 #179276 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Beautiful! Thank you!
For hal file I imagine its very similar to 4-phase case (with corresponding stepgen, and pin changes)..
What about ini file? Shall it be set somewhat specific (in case I just want the motor to spin max rpm)?
In coming days will try to set up linuxcnc config, and report/post the results.

Best!
Last edit: 24 Aug 2020 21:10 by Skec.
The following user(s) said Thank You: tommylight

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

More
24 Aug 2020 21:14 #179277 by tommylight

What about ini file? Shall it be set somewhat specific (in case I just want the motor to spin max rpm)?

Nothing specific, just make it spin, then you can tweak and tune as much as you like.

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

More
25 Aug 2020 10:19 #179335 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Hi,

I have tried to run BLDC motor on linuxcnc, using step_type=3.

1. With 5 V, the motor slightly vibrates, when in linuxcnc pressing + or - continuous movement. It seems like trying to keep position (when I spin motor with my hand a bit, it returns to its position (both CW and CWW).

2. With 12V, 3 wires, connecting motor with driver start to smoke.. (motor still does not move, feels like keeping the position).

I have attached the hal and ini file.

In hal file, I think stepgen.capture-position is not needed (?).
Also, I tried to add stepgen.N.maxvel. However, motor did not spin.

What shall be my next moves?

Also, could you please suggest, how shall hal file look using man9 bldc?

Sincerely,

Simonas
Attachments:

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

More
25 Aug 2020 11:19 #179350 by tommylight
setp parport.0.reset-time 500
IN THE HAL FILE NEEDS TO BE
setp parport.0.reset-time 5000
also when testing set the jog speed to very low or 20 to 50 mm/m.
12V will burn the L298 to a crisp as it does not have current limiting at all. Depending on the motor resistance/inductance 5 to 7V should be ok.
One more thing, when testing if you notice the motor vibrating but not spinning, you have to change two of the inputs of the L298 and test again, till you get the phases correct.

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

More
25 Aug 2020 16:50 - 25 Aug 2020 17:14 #179409 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Yep, I have changed reset-time to 5000, as well as jog speed to 20 mm/s.
When trying with 12V, I put very very very think wires from L298N to stepper, which got hot.. L298N itself seem to be fine (it still works with 4 phase stepper).

I have tested all possible combinations for phases: ABC ACB BAC BCA CAB CBA. None of them spin the motor.

I changed phases in hal file:
e.g.

net XPA <= stepgen.0.phase-A
net XPB <= stepgen.0.phase-B
net XPC <= stepgen.0.phase-C

changed to
net XPA <= stepgen.0.phase-A
net XPB <= stepgen.0.phase-C
net XPC <= stepgen.0.phase-B
etc.

Does it count as changing the inputs of L298N?
Last edit: 25 Aug 2020 17:14 by Skec.

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

More
25 Aug 2020 17:11 #179410 by tommylight
Yes it is the same as changing the inputs on the L298, but they have to be A, B, C, not A for all of them.
That leaves only one possibility, and that is that you are using one of the inputs on the L298 that is not connected to a motor winding.

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

More
25 Aug 2020 17:18 #179412 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Sorry, it was my copy paste mistake. Not all As were in the hal configuration (XPA XPB XPC).

I have 3 wires from motor (A1 A2 A3) going to L298N out1 out2 and out3. L298N in1 in2 and in3 are connected to pin3, pin4, and pin5 in parport.

In the forum (electronics.stackexchange.com/questions/...uino-and-l298-driver) I found that COM from motor is connected to +5V... I am curious to try this..

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

More
25 Aug 2020 17:24 #179416 by tommylight

In the forum (electronics.stackexchange.com/questions/...uino-and-l298-driver) I found that COM from motor is connected to +5V... I am curious to try this..

DO NOT wire it to 5V, that will blow the L298.
That is needed only for open collector drives or transistors or mosfets.

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

More
25 Aug 2020 17:26 - 25 Aug 2020 17:27 #179418 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
You just stopped me from blowing L298N!.. Thanks :)
Last edit: 25 Aug 2020 17:27 by Skec.

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

Time to create page: 0.103 seconds
Powered by Kunena Forum