How To Turn Any Motor Into A Servo Motor (#075)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
over the last several months I've been building this massive CNC machine that also has a rotary axis on it a 4th axis I can both plasma cut and spindle cut on that rotary axis but then I thought wouldn't it be awesome if this guy could spin as fast as a lathe and still give me the cnc precision that i might want for cutting threads or something like that now the stepper motor that I have on there currently is not up to the task stepper motors simply don't spend fast enough in order to operate like a lathe in order to get that kind of speed and precision you're gonna have to use a servo motor now I have built to leave before and there's a video on my channel about that and in that video you'll see that I use a treadmill motor very similar to this one which I'm controlling with the speed controller like this guy this guy shows up in a lot of videos and people always ask me how I made it and there's a video on that as well which I'll put a link in the description but basically as I turn this down I'm gonna get power here to my motor and that controls my speed if I turn it up get more speed you get the idea the problem though is that that's not nearly precise enough right I can't control when it stops and I certainly can't stop it on a dime and put it in reverse the way you might want to do with a CNC lathe so then I begin to think well what's the difference between this motor and a servo motor the only difference is encoder feedback so let's make a servo motor out of this treadmill motor obviously now before I get into this too far I do want to say that I'm not convinced that this is the best solution but we're going to experiment with it and then we could talk about it in the comments the engineering reasons why you may or may not want to do this but let's have fun with it anyway all right so I bought this encoder and this has got a coupler on it this is a differential encoder and for the sake of this video an encoder is simply a sensor that gives real-time shaft position information to a speed controller now this B controller here can't do anything with encoder feedback so I need a servo driver a servo driver is basically a speed controller which can take information from a computer or from whatever source you want it could be an Arduino whatever you like it can also read the encoder information and then in real time adjust both the speed and position of the shaft and even hold the shaft in position if something is pushing against it let me show you first let's screw this down okay I'm gonna disconnect this deed and hook you up to this dude this is a servo driver which is designed to work with permanent magnet DC motors this is a two and a half I think it's to an F mmm two and a quarter horsepower these permanent magnet DC motor and now that it has an encoder attached it's a two and a half horsepower sovel motor so we have an extraordinary amount of power and it actually didn't cost me to buy this and this encoder didn't cost nearly as much as if you had just bought a dedicated server motor I was going to walk you through all of the wiring but that's going to depend a lot on what type of CNC controller you're using so I'll put a wiring diagram on a screen in case you happen to want to copy exactly what I've done here but I do want to point out a couple of things at some time that tripped me up the first time I did something like this number one I did not know that this type of plug was called an rj45 I always thought of this as an each ethernet cable but if you search for rj45 that's really helpful in finding parts for this another thing that's helpful is this guy this is called an rj45 breakout board and this is good when you want to take this cable and spread it out into individual wires that you can just screw down and connect and as you can see this cable runs to my encoder here I've got my plus and minus going to my servo driver and on a tapa says armature one an armature tooth but that's basically motor positive are the positive lead and the negative need on the DC motor before going in further I want to point out that this could be done with any type of motor it can be a universal motor an AC induction motor it doesn't matter as long as the servo driver is designed to drive that type of motor these guys are made for brushless DC motors for AC synchronous motors whatever type of motor it is you just need to be sure that whatever driver you're using is designed for that motor type and also designed for the encoder that you have attached to it so there's absolute and incremental those are the two main categories and then subcategories on the incremental is the single and differential encoder type so this guy requires a incremental differential encoder to work I think I said that right and that's what I have here there are a couple other components that you're going to need in my case I need a DC power supply but depending upon what kind of motor you're driving the power supply may be built into the driver or you may need other type of power supply but everything is sized according to the motor that I'm operating with the last thing that you need to do is give the servo driver the commands you want to tell at what direction to spin and how far to spin it in order to do that you need to send step and Direction commands you have many different options for sending those commands to your servo driver in my case I'm using this guy this is a CNC controller a little mini one that you will use on a small CNC machine it's a smart Bob mini PMD x4 14 it's a particular model that I'm using of course it doesn't have to be this one I bought this guy specifically for this purpose in order to show you guys how you might control this with CNC controls now for my application I need yet one more piece of hardware in order to talk to you my CNC controller and that is the software at Mach 4 now you might be thinking why do you need another step why can't this guy send the steps to the servo driver and that's because this guy isn't designed to do that this is a CNC controller it's meant to handle multiple motors at once and you will send all the commands to this guy and it commands all the motors but if you only control in one motor it will be better or I should say it will be simpler to use something like an Arduino you can pre-program it to move a certain number of steps I don't know it could be as simple as you controlling a solar panel and you wanted to rotate 30 degrees every couple of hours something like that could be done with an Arduino with a PLC and that's what I would recommend if you just controlling one motor in my case I bought this because I have other experiments I want to be able to do with a really small CNC controller that's thanks to my patrons by the way it's because of you guys that I can do things like this so thank you for that so that's why I'm using this today rather than programming in Arduino for this application so I've got Mach 4 setup over here and it's already programmed to talk to my smart Bob and the jog is set to 5 so I'm just going to leave it there look in a jog five units and it's set to the x-axis so Mach 4 thinks that this is the x-axis and the other thing is each unit is one full rotation so we should get five exactly five rotations let's see I notice is buzzing right now that's the motor working hard to hold the exact position so that you can't rotate yourself it's gonna fight back and make sure it holds that position and that's because the encoder is talking to it now if you wait long enough it'll settle down and stop but I've also plugged up this reset button here to make it stop checking the motor for a few seconds and then it or notice that it's not moving so anyway you can control the speed there's a lot of things that we have control over here so I'm gonna disable this for a moment go to configure control motors so let's make some changes here we'll set this guy to you I don't know thousand rpms hopefully this smart ball can handle that let's see okay so we're now set to you a thousand rpm and hable and now we're going to go G's G zero zero x mmm I don't know let's go 500 and you can see it counting up its counting up the units then I got 500 revolutions now of course I can go much faster than this but this is probably the fastest you could get from a stepper motor maybe if it is a really powerful one but again we can rotate and stop so anyway that gives you an idea of how this works right you can accelerate in either direction that you want stop it and if you write a whole list of g-code you can make your commands as precise as you won right 2,000 steps forward stop for five seconds go 3,000 steps back stop for a half a second go forward five steps you get the idea precision control even with precision control even with a treadmill motor this kind of project is really fun in principle but there are some engineering concerns you need to think about before you go strapping this guy to your CNC machine number one obviously this motor was a design for this application servo motors take many other things into consideration that I haven't yet put into application here number one can the motor handle operating at that speed for extended periods of time you can see I've removed a fan from this motor in order to attach the encoder but maybe what you do is you extend the shaft through the fan somehow and attach the encoder on that extended portion of the chef well maybe you have external cooling there's a fan behind the encoder blowing air over the motor to have cooled off the winding because remember there's current running through the winding but it's not spinning to cool itself it might just be holding his position let's discuss it in the comment section what do you guys think the engineering pros and cons are for using a treadmill motor like this in this application it cost me about a hundred dollars to get this encoder and this servo driver was also I think about a hundred and $100 to $130 I don't remember which one this one is and if you compare that to the cost of buying like a servo motor again this part was free I just ripped it out of a treadmill so there's some value in saying this system cost $200 and maybe it requires modification whereas you might spend a lot more where I know you will spend a whole lot more to get a two horsepower silver motor you can check out more of my content by going to my page or clicking on one of these videos that I'm putting over here and if you want to be notified when the next video comes out you should hit the subscribe button so that you don't miss anything until next time thanks for watching
Info
Channel: Jeremy Fielding
Views: 219,393
Rating: undefined out of 5
Keywords:
Id: 7aU2ESpwp5A
Channel Id: undefined
Length: 12min 5sec (725 seconds)
Published: Mon Sep 30 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.