Grizzly G0704 CNC Conversion - Exploring Closed Loop Stepper Motors - Video #9

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video i'll be exploring the closed loop stepper motors that i chose for this cnc conversion the motors for the x and y axis are 4 newton meters or 566 ounce inches nema 24th the z-axis stepper motor is a nema 34 8.2 newton meter or 1160 ounce inches here's a comparison of a nema 34 on the left to anema 24 on the right i had read several times that anema 34 on the z axis is overkill for a mill of this size i also read that most people choose to go with the nema 34 for the z-axis in the end i just decided that a larger motor would give me more options in the future for instance if i chose to upgrade to a larger spindle motor that was heavier or if i chose to do vertical broaching which would require more torque then i would have a motor large enough for the task at some point in the future i will probably 3d print an adapter and mount one of the nema 24s onto the z-axis just to see how it performs so here's the basic setup i'll be using in this video a 10 amp variable dc power supply that i have set to about 36 volts a cl57y closed-loop stepper driver a nema 24 closed loop stepper motor rated at four newton meters and to supply the pulses to the stepper driver i'm using an arduino nano microcontroller that i programmed to make one revolution at 12 rpm then pause for three seconds and repeat continuously later in this video i'm running three stepper motors at the same time so i just added two more stepper motors and two more drivers all of them being pulsed from the same output of the arduino there are lots of resources on the internet on how to wire the stepper drivers and setting the dip switches so i won't get into that here i will provide a couple of pictures of the stepper driver so you can pause the video and inspect it closer if you want notice in this image to the right of the dip switches there is a usb connector i'll be using this a little later in the video to connect the driver to the computer and adjusting some parameters here on the stepper driver you can see the green power led to the right of the connectors and above that the red alarm led which i'll be activating later in the video also there's a missing connector in the middle of the row which is the alarm output i won't be utilizing that in this video but i do intend to connect it to the mesa controller board when i assemble the system now let's take a closer look at the closed loop stepper motor in this setup i'll be comparing it to the open loop stepper motor on the right and on the left is a second closed loop stepper motor that will be the control that i'll use for comparison of the other two all three of these stepper motors are hybrid stepper motors but only the two on the left are closed loop they have quadrature encoders mounted on the back of the motor that provides position feedback to the driver more on the encoder later i'll start by simulating a load on the open loop stepper motor that exceeds its capabilities this will cause the stepper motor to lose steps and it will be out of sync with the other two in this example the error is about 45 degrees when connected to a ball screw with a five millimeter pitch this would equate to an error of about point six millimeters now i'll simulate an overloaded condition on the closed loop stepper motor the position error is detected by the encoder and the stepper driver advances the motor to put it back in its proper position the driver will also correct a position error if the motor is forced out of position while it is stationary the encoder mounted on the back of the stepper motor has a resolution of four thousand which means it will produce four thousand pulses for every one revolution the default firmware setting of the driver is to produce a position alarm when the encoder position error exceeds four in other words the driver will not produce an alarm until the stepper motor is one complete revolution behind where it should be for my purposes i wanted to adjust the firmware to produce a position alarm much sooner this brings us to the tuning software and the usb adapter despite the stepper driver being labeled as usb shown here in the upper right hand corner and having a type b usb connector the stepper drivers communication protocol is actually rs-232 i bought the usb interface adapter that allows for connecting the stepper driver to a computer the usb to rs232 adapter was not recognized by my computer when i plugged it in and there were no instructions or drivers provided with the unit i popped the cover off to have a look inside and what i found was a chip labeled sil2104 a quick google search led me to the silicon labs website where i found a driver to download for the chip which enabled the adapter now with the connected stepper driver showing up on com6 i click on connect and the software comes to life the bottom row of the interface shows live data coming from the stepper driver i only had interest in changing a couple of the parameters the first one being peak current parameters are changed in the setting value column clicking the right button at the end of a row will only temporarily write that parameter change to the stepper driver to make a parameter change permanent you have to select the save eprom button at the top of the interface otherwise the parameter will reset to its previous setting when the driver is powered down and restarted the factory setting for peak current is 7000 which i will assume is milliamps or 7 amps i reset the peak current to 1000 milliamps or 1 amp this reduces the torque of the motor so that i can stop the motor by hand the other parameter that i'm interested in is the position deviation alarm threshold from the factory it's set to 4000 which is the same as the encoder resolution at this setting an alarm output is not produced until the motor is one complete revolution out of position once the mill is put together and i'm tuning the software i expect this setting to be closer to forty than four thousand and the peak current will be set back to 7 000. looking at the live position error it seems to be normal operation for this number to run between 0 and 3 or 4. on two of my stepper motors the position error would fluctuate between zero and two and on the third stepper motor it would fluctuate between zero and six i pulled the cover off the back of the motor to reveal the encoder and found the encoder wheel had a bit of dust on it which i removed with a camera lens cleaning brush and blower once reassembled the position error now read between zero and three i find these small numbers to be perfectly acceptable as any travel error will be measured in microns rather than tenths of a millimeter now let's take a look at the software and the motor simultaneously a couple things to notice here first the position error is running up in the teens to near 20. the reason for this is that i have set the peak current to only one amp and the motor isn't receiving enough power to maintain a more accurate position i'll reset this to 7 amps when it's installed on the mill the other thing that you might notice is that there's about a 4 second delay in the position error reporting in the software however there is no delay in deactivating the motor once the position deviation threshold has been reached next up we'll take a quick look at the other two inputs on the stepper driver first up is the input labeled mf this stands for motor free when this is activated it disables the motor by shutting off power to the coils the motor can then be freely rotated until the mf input is deactivated the other input is the dr input or direction input enabling this input simply changes the direction of the stepper motor and the last thing i'll look at is how the motor reacts to a much lower setting of the position deviation alarm threshold from the factory it's set at 4000 i set it at 400 temporarily but here i will set it at 100. excellent as expected the alarm is triggered almost instantly and that completes the overview of the stepper motors here i plugged the big nema 34 into the stepper driver just to give it a few revolutions this driver is undersized for the 34 but since i'm not driving any load it gets the job done i'll install the motors onto the mill off camera since it's a simple process anyway in my next video i'll start into the electronics and enclosure assembly subscribe if you want to follow along and take care until next time
Info
Channel: JoatMon
Views: 18,621
Rating: undefined out of 5
Keywords:
Id: zWPSGLtLspE
Channel Id: undefined
Length: 11min 12sec (672 seconds)
Published: Wed May 04 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.