Stepgen and 4-phase steppers

More
16 Aug 2020 13:21 #178403 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Thanks. How about this case: I wire 4 wires from stepper to L298N. From L298N I get another 4 wires (in1...in4), which I put into parallel port pins 2, 3, 4, 5. Now I have to enable pins in the sequence 2, 4, 3, 5 to move stepper motor one step.

I use this L298N driver: sigmatechbd.com/product/l298-stepper-motor-drive/
And a dvd rom stepper motor.

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

More
16 Aug 2020 14:34 #178409 by tommylight
Yeah, those require 4 pins and each has to be stepped by the PC, and those are exactly the ones i was talking about regarding powering them.
Have a look here:
forum.linuxcnc.org/10-advanced-configura...posing-a-pic?start=0
there is also a config attached that works for exactly that type of drives, it has everything set up for X and Y axis, the Z axis is used as PWM. Pins 6 to 9 are for X and pins 17,1,16,14 are fo Y axis.

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

More
16 Aug 2020 17:56 #178422 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Thank you!

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

More
19 Aug 2020 15:28 #178724 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Hi,

I have tried to configure (by hand, mostly copying configurations from uploaded examples) for one phase stepper motor control using Linuxcnc. Attached are *.hal and *.ini files. May I ask, if configuration files are right, assuming I connected L298N driver leads into parport 2, 3, 4, and 5 pins (motor A A* B B* leads I connected to L298N driver as suggested in spec.sheet)?

The stepper I am using is a motor from DVD ROM.
Driver - L298N.

My other question would be, if the parameters (e.g. cycle time, linear velocity, etc.) are set correct (I guess I left the default values)... Its hard to find those values for DVD ROM motor and L298N driver..

Thank you!
Attachments:

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

More
19 Aug 2020 19:14 #178737 by tommylight
In your pinout.hal file there is
net XPA => parport.0.pin-03-out
net XPB => parport.0.pin-04-out
net XPC => parport.0.pin-05-out
net XPD => parport.0.pin-06-out

Not 2,3,4,5 as you say in the post, so correct that.
When testing set LinuxCNC to very low speed, like 100mm/minute and check if the motor turns.
Also set the step_type to 6 until the motor is turning correctly as it will make it easier to check, later you can try mode 7 or 8 or 9 and see what gets you more torque or more speed.

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

More
19 Aug 2020 19:44 #178742 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Yes, sorry, I made mistake in post here. The pins are 3, 4, 5, and 6. Thanks for correction.

I tried to load this configuration file, however, I got error: function 'parport.0.read' not found in core_stepper.hal. For this reason LinuxCNC terminated.

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

More
19 Aug 2020 19:51 #178743 by tommylight
Gather everything from two hal files to one, then edit the ini to use only that hal file.
I see no reason why it is complaining about that, but might be due to the loading of real time stuff.

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

More
19 Aug 2020 21:06 #178764 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Finally it works! Thank you everyone for suggestions!

Just a reminder:

I wanted to drive stepper motor (taken from old DVD/CD/Floppy) with L298N using LinuxCNC.
Because Step/dir configuration could not be used, configuration must have been prepared manually (without config. wizard).

Below are the figure of hardware configuration, as well as added *.hal and *.ini files. *.var, and *.tbl files also should be included in the same directory (not added here).

Only 1 axis is configured. However, it is super easy to add other axis too (just copy-paste-rename X axis; change some number accordingly, e.g. axis number, naming, etc.)

Also, be aware that when manually tested motor movement in LinuxCNC (under continuous option) - the stepper motor will spin with no brake (as long as you press "+" or "-"). This might damage the sledge or motor, if being not careful.

Best,

Simonas.
Attachments:
The following user(s) said Thank You: tommylight

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

More
20 Aug 2020 13:02 #178822 by tommylight
Nice.

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

More
24 Aug 2020 20:04 #179270 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Hi guys, me once again,

I do not know, if this question can be related to this topic.. but here it goes:

Can linuxcnc control BLDC motor with L298N driver? I have seen a youtube video (
), where one controls BLDC with L298N and Arduino. I have attached the diagram (which I copied from the video).

If, however, question is not related to this topic, I will delete it.

Also, if you know information related to my question, I would appreciate if you could direct me.

Sincerely,
Attachments:

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

Time to create page: 0.116 seconds
Powered by Kunena Forum