Threaded View
-
29-05-2014 #1
Over the past 8 months, or so, I've designed and prototyped a servo motor controller. In short, I had to do a project for my final year at university, hence I asked if I could make a servo drive for a CNC machine (with a particular machine in mind
). I started by getting a cheap motor from hobbyking and finding out what would be required to run it as a servomotor. The design I've come up with can run different types of motors and uses the vector control algorithm to accurately and efficiently control the motor torque.
Here are some specifications:
Ratings:
- 240VAC single phase (only tested up to 100VAC, will try mains soon).
- 8.5A line current with no fan up to 40°C ambient - more possible with better cooling.
- 18-24VDC@300mA required for logic.
- With the motor from Hobbyking, about 1kW (so slightly OTT).
General features:
- Vector control - can operate in position, speed and torque control modes.
- Tuning of controllers via GUI - can test step response, measure torque vs speed, etc.
- Mains is isolated, some inputs also isolated (so single or double isolation depending).
- Hardware over-current/over-voltage protection (adjustible).
- Software over-current protection (partially inherently implemented, trivial).
- Drive temperature readout / protection.
- LEDs and switches for something (not really sure what).
Motor types supported:
- Permanent Magnet Synchronous Motors: (PMSMs, i.e. most modern servomotors, motors from hobbyking). Sensored only, but working on sensorless control.
- 3-phase Induction motors (e.g. spindle): The common 2.2-3kW spindles work well. Vector controlled currently only if sensored (not tested), harware supports sensorless so will work on adding that. Tested and works fine with Vf control and SVPWM - so slightly better than the cheap drives that come with the spindles, but potential for a lot more at a lower cost.
- Single phase induction motors: (not tested, but don't see why not).
- DC motors: (for those that live in the 19th century
Could be implemented (just requires programming):
- 6-Phase PMSMs: Algorithm worked out, still under development, requires 2 drivers.
- Stepper motors: Limited performance possible with one driver per motor, could run 3 motors from 4 drivers but that's getting a bit silly and I don't really see much point in pursuing it, as although a cheap mains voltage stepper driver would be nice ... a cheap mains voltage servo driver is nicer.
Encoders supported:
- Quadrature, differential and single-ended signalling.
- SSI and SPI protocol (common for absolute encoders).
General I/O:
- USB via RS232 converter (GUI uses this, but can configure for other things)
- Few spare pins which can be mapped to any spare peripheral the PIC supports (e.g. RS485, SPI ...)
- Step/Dir (Could also configure these for quadrature input, which is advantageous as can obtain higher step frequency)
- Isolated fault indication output.
In addition to the usual methods to control the driver, I made an interface using MATLAB, so you can adjust all the controller gains and try different tests (e.g. measure torque vs speed characteristic of load) by clicking buttons. Here's an example - graph shows q-axis current controller (part of the vector control algorithm - torque is proportional to q-axis current):
I rewound the motor, to make the current ratings more reasonable and enable it to be driven directly from the mains (instead of requiring a big expensive PSU):
To test the motor under load I made an eddy current brake, which worked well:
Here's some pictures of the motor parts with the housing I machined to hold the 17-bit encoder and adapt the mounting to Nema 23. Note the flexible PCB:
Testing with 3kW spindle:
Typical step response (note load inertia of brake is *VERY* high compared to CNC router/mill, so response is not as fast):
The position controller step response isn't so good - it oscillates quite a bit, but I think I know how to solve that now so I'll try it again when I have time.
Last but not least, here's the actual driver - first version of PCB made using toner transfer, 2nd one got made professionally (both use SMT components):
This was quite a big project (barely scratched the surface with this post) so any questions welcome. I might upload some videos, but I don't think there's much point as I'm sure you can imagine what a spinning motor looks like...
I have not yet decided how I should take this project further - namely make it just open source, open hardware, both or neither. My next step will be to make some more and test them on my CNC mill and router.Last edited by Jonathan; 29-05-2014 at 03:51 PM.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Closed loop Step Servo Drive Driver 2HSS86H + 4.5N.M Motor + Encoder
By george uk in forum Motor Drivers & ControllersReplies: 20Last Post: 23-06-2014, 08:38 PM -
Servo drive problems
By Tomnewry in forum Motor Drivers & ControllersReplies: 15Last Post: 27-03-2013, 11:30 PM -
servo control vs stepper control
By Peter. in forum Motor Drivers & ControllersReplies: 24Last Post: 17-09-2012, 08:36 AM -
NEW MEMBER: I am going to build a 3 axis servo control
By markey1979 in forum New Member IntroductionsReplies: 8Last Post: 16-11-2011, 12:53 AM -
drive control system
By oadamo in forum General ElectronicsReplies: 1Last Post: 22-05-2011, 07:30 PM
Bookmarks