Optical encoders with DC motors

More
6 years 1 month ago #180204 by Skec
nice! That is sufficient for me. I want to drive small dvd rom dc motors, that pushes out the shelf for CD/DVD. I assume I could use Etch example from LinuxCNC library, and modify code so, that there is no more encoder part.(?)

Please Log in to join the conversation.

More
6 years 1 month ago #180209 by tommylight
Using spindle PWM should be much easier. Set up a spindle using stepconf, wire the L298 inputs to the spindle parallel port output and it should run. You can also use the spindle-on pin to enable and disable the L298

Please Log in to join the conversation.

More
6 years 1 month ago #180211 by Skec
That is fantastic tommylight! I set up L298N through stepconf as PWM. And it runs. I can control DC motor movement through Spindle STOP button. CW and CCW also works. However, I can only turn dc motor ON or OFF, and then it spins on its own. I would love to be able to control it through "+" and "-" in continuous mode using mouse. If it could spin while I keep pressing "+" or "-" with mouse - it would be perfect.

Please Log in to join the conversation.

More
6 years 1 month ago #180219 by tommylight
Does pressing + and - near the spindle button do anything ?

Please Log in to join the conversation.

More
6 years 1 month ago #180222 by Skec
It increases and decreases the speed. If I choose 0 Hz in config, then + or - starts the dc motor CW or CCW depending which one I press. But still, DC motor spins continuously once I press + or -.

Please Log in to join the conversation.

More
6 years 1 month ago #180224 by tommylight
That is exactly how it should work.
If you want to do some more testing, try running some gcode with something like this in it:
Code:
% M3 S100 G04 P5 M4 S200 G04 P10 M5 %
That will run the motor CW for 5 seconds at 100 RPM then run CCW for 10 seconds at 200RPM, then stop.

Please Log in to join the conversation.

Time to create page: 0.044 seconds
Powered by Kunena Forum