586,500 active members*
1,860 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2005
    Posts
    86

    Mid-Size Mill -- Long Term Project

    Sorry for the long rambling post. Hopefully somebody will find it interesting enough to read.

    As a hobbyist who likes noodling around with stuff, I have so far been working with tiny machine tools like Sherlines and so forth (see my thread here on the Frankenmill for another small project). When I have something bigger I want to work on I bring an offering of beer over to my friend Pete's place; he has an Enco (Rong Fu) mill-drill he lets me use. Fun as that is, he doesn't really share my obsession with CNC so it's a manual mill, and besides it makes me feel inadequate that his tool is bigger than mine, ha!

    So I decided to start a long-term project to build something larger... I'm thinking maybe 18x10x10 inches of travel. I don't have much extra room in the little corner of the basement my wife lets me do whatever I want with so I'll have to make it as small as I can manage given the travel goals.

    What prompted me to actually get started was a posting here about a great deal on brushless AC servo motors at SurplusCenter.com -- various models from 100 watts to 1000 watts (at 100 volts), some with brakes and some without, ranging from $30 to $40 each, which is amazingly cheap. Go to SurplusCenter.com and search for "100 vac servo" and you'll see them.

    I decided that the 300 watt model without brake would be about right for this project so I ordered some. They came in original packaging and appear to be "brand new" (except that they were apparently built 5 years ago). See the picture. The 300 watt models have the same wiring as reported elsewhere on this site, which is great because there are so many colorful wires to choose from! Fortunately, in those other threads, a kind soul posted an accurate description of what each wire does. It wouldn't be TOO hard to figure it out with an oscilloscope once you guess that the red wire wants 5v and the black wire is ground, but it's nice not to have to bother. Anyway, these are pretty sweet motors.

    On ebay you can usually find brushless amplifiers for pretty cheap; of course scroungers have to compromise and it isn't quite so easy to find 100v AC amplifiers for cheap. I picked up three Advanced Motion Controls BD15A8 amplifiers for $35 each. It's not a perfect fit, but $70 per axis for motor plus amplifiers is hard to pass up! In particular it is only rated to 80 volts (7.5A continuous, 15A peak), and it is technically a DC brushless amplifier. See picture. I'm thinking I'll run the motors at about 67 volts (2/3 of what they are rated at), and that should be sufficient for my needs.

    Here's some math to back that up: At 100 volts the motors have a "rated" rpm of 3000 (rumor says a no load RPM of 4500, but I'll ignore that and just use the "rated" rpm). So at 67 volts that will reduce to 2000 rpm. The continuous torque should not be reduced at this voltage (the peak stall torque will be reduced but I don't care much about that rating anyway). at 9 lb-in and 2000 rpm, that's about 0.3 HP or about 220 watts, which passes the "sanity test" since i'd expect the 300 watt motor to be about 200 watts at 2/3 the rated voltage (I'm talking about normal wattage, not "peak" horsepower which should be roughly cut in half by the voltage reduction, although I'm not sure exactly what these power curves look like for brushless motors). Further sanity checking the electrical input: the motor has a 6 amp rating. At 67 volts, that's 400 watts of input. 400 watts in and 200 watts out is 50% efficiency which seems a little low for a brushless motor like this, but i'd say it roughly checks out.

    Further calculations: my plan is to use these at a 3:1 reduction driving 0.2" ball screws. Assuming 80% efficiency for the screws and linear bearings, that translates into about 650 lbs of continuous pushing force and a speed of 130 IPM, which seems about like the values I want.

    Enough theory... time to test some stuff out. Given the wiring chart for the motors, it's not too hard to hook up the U, V, and W feedback wires to the hall inputs on the amplifier, and hooking up the motor wires is even easier. Plug in a 48v power supply I happen to have for a smaller mill's stepper motors, and ... no luck! Wah!

    Took me a while to figure this one out, so I thought I would mention it here in case it helps somebody else. The sensor set on the motors is great but it's kind of a current hog -- it seems to pull about 110mA of current. The "Hall +V" output on the amplifier is only capable of putting out about 30mA. So the sensors weren't working properly because the voltage sagged down to about 2 volts. Once I powered them from an external 5v supply (which I need anyway to drive the inputs to the amplifier), all was fine. The motor spins like a dream. This means that I have to hook the motor power ground to the logic supply ground, which isn't the greatest idea but will do for now. If I get ambitious I might run a separate voltage regulator off of the motor power supply to drive the encoders and optically isolate the A and B channel encoder feedback to the other circuitry I need to build; or it might work fine like it is.

    Other circuitry? More circuitry is needed? Yeah, unfortunately it is. It's pretty easy to do what I have described so far but alas the big picture is not so simple. Amplifiers like these have two different types of inputs -- either an analog voltage (say, -10 volts to +10 volts), or a direction and PWM duty cycle. Either way, that input is a somewhat imprecise way of specifying desired motor speed or torque. By "imprecise" i mean you can't just give it a particular input for one second and expect it will always move the same distance. Something has to do the job of keeping track of the current motor position and translating the desired position into commands for the amplifier. There are several ways that this might be done:

    1. A dedicated motion control device, like those made by Galil, etc. In some ways this is probably the best solution because the people who build these are the foremost experts on "closed loop" motor control. However, even though you can occasionally find these devices on ebay for a reasonable price, they appear to really be designed for dedicated motion control applications; I can't see any way to hook up my CNC software (ArtSoft's Mach3) to devices like this, which is a pity.

    2. Mach4 + Geckodrive G-Rex. It seems like the G-Rex model 100 and the upcoming Mach4 should be able to do this, though trying to figure that out for sure by reading about the G-Rex makes my brain swell up and blood leak out of my ears. Timeframe is probably next spring sometime which doesn't bother me (I can wait). The $400 projected price tag is a little steep for cheapo ebay scroungers, but there might be other advantages to this approach that I can't see. If I haven't succeeded with another approach by the time this is available, I'll consider it.

    3. Rutex.

    3A. For $100 per axis, Rutex makes a nifty little board that takes step/direction pulses as put out by Mach3 and implements a closed loop controller to send out a +/- 10v value to the servo amplifier. Two problems with this: First, the amplifiers I happen to have are the PWM type instead of the +/- 10v type, so those won't work for me. Second, for three axes that's $300 which isn't a HUGE amount of money but the motors plus amplifiers are only $210 for three axes so far. Scrounging for cheap stuff is half the fun of a hobby project like this.

    3B. Throw away the cheap ebay junk (well, re-sell) and buy Rutex brushless controller/amplifiers that take step/dir signals and drive the motors directly. This is surely the cleanest and easiest solution and would allow some extra voltage since they are rated for 100v instead of 80v. I could be up and running within minutes of getting these in the mail. The downside is that it's $200 per axis, which is very reasonable for brand new nice equipment, but $600 (minus the $100 I could get by reselling my current amplifiers) may be outside my budget. If all else fails, it's nice to have this option available.

    4. Watch Ebay patiently. It's possible that cheap brushless controller/amplifiers that can take step/dir signals could appear on ebay. I haven't seen any in the short time I have been looking and I have a feeling that it would be like feeding time at the zoo if any did appear, but you never know.

    5. EMC. I believe that the linux EMC program is capable of doing closed loop servo control and since it's open source it is possible to adapt it to whatever is needed. A couple issues with this though: first, I'd need to get another PC, put linux on it, and get EMC set up, which will take a bunch of time doing stuff that I do not particularly enjoy (installing operating systems is not a hobby of mine), and still cost a couple hundred for a PC and monitor or KVM switch. Also, I'm not sure how the encoders would be handled. The encoders on these motors are 2000 cpr, which means 8000 state transitions per revolution. At 2000 rpm, that's over 250,000 transitions per second. There's no way a PC could keep track of those directly, so some sort of hardware counter device would be needed, which adds even more expense and complication. Finally, I like my Mach3 and don't want to switch to EMC.

    6. DIY. I'm just a hobbyist with no schedule to meet and to whom playing around and building the tool is at least as much fun as using a completed tool, so why not build something myself? Given that I have some microcontrollers sitting around already it doesn't seem impossible to build a closed-loop PID device basically for free (or certainly under $100 total for three axes if I had to buy the parts). The only real problem with this approach is that it is hard. The accuracy of the parts that the mill will cut depends completely on the quality of this closed loop controller and its ability to tell the motors what to do; there are decades of commercial research and proprietary engineering solutions behind each product on the market that does this. Still, it would be fun to learn something new and there's nothing to lose except time spent doing something I enjoy, so I'll start out on this path and see where it leads. I hooked up an Atmel AVR microcontroller to the amplifier mainly because I was curious to see how well the motor would work at low speed (see picture). The amplifier is for DC brushless and if it is going to have a problem driving these motors, that will become apparent at low speed. So far on the bench it looks okay but we'll see what happens under real loads in real world situations. With a low PWM value I can get the motor down to about 10 RPM and it does exhibit some cogging effects down at that very small torque level but I don't think it will be a problem when it is doing actual work.

    The other thing that needs figuring out is the power supply. I'm not sure exactly how to size this. I have no idea where people who are planning to use the 1000 watt version of these motors at 100 volts are going to get a 100v power supply that can put out 40 amps. I asked this question and was told to build one, but how in the heck do you build a 100v 40 amp power supply?

    Luckily my needs are more modest -- 65-70 volts. I'm not sure how much current to build for, though, for three axes. 15 amps? 20 amps? The more amps, the more $, so it's an important question.

    Ok, enough for now.
    Attached Thumbnails Attached Thumbnails motor.jpg   amp.jpg   motorturning.jpg  

  2. #2
    Join Date
    Aug 2005
    Posts
    86
    Some progress being made on the electronics aspect of this far-away dream of a mill. I decided for amusement value to go ahead and try to build the PID controller. The first picture shows a schematic of the proposed design. First I had to get Eagle and learn how to use it, then sketch out a design.

    The second picture shows the electronics plugged into a breadboard. The processor is an Atmel ATMega8. There are also a couple of buffer chips, an RS232 chip, and a LS7183 encoder interface chip.

    Software-wise, so far I am able to maintain counts of pulses coming out of Mach3 (at about 25,000 pulses per second), keep track of the motor encoder (that part should be able to handle about 500,000 encoder ticks per second), and also output the PWM signal that the motor requires.

    Additionally, I am processing the Hall signals as well to tweak the commutation a bit. I noticed with these motors and the eBay controllers I got that the motor "buzzes" if I stall it by hand at a commutation point, as it jumps back and forth between commutation states (transitions in the Hall signals). Another different type of motor I have does not show this behavior, so I don't know exactly what the deal is. What I plan to do is introduce a little bit of hysterisis in the hall signals at low speed, so that it doesn't bounce back and forth without moving a full degree or so.

    Next step is to give that a try, then on to the PID loop itself, and a PC-based application to help tune it.

    What am I building again? Oh right, a mill! I almost forgot!
    Attached Thumbnails Attached Thumbnails circuit.jpg   proto.jpg  

  3. #3
    Join Date
    Jun 2003
    Posts
    1365
    I have a similar project, long term and all, I picked up the 400w servos with breaks. I have 15mm THK HSR and SHS rails and bearings, I intend to get rutex drives unless something comes up.
    I have a possible source of cast iron plate which I will be machining all peices except the column out of. Because of the sheer size of the peice required for the column and what would need to be removed, I plan on making that out of 4x6" thick walled tubing with some steel rails welded onto it and machined.

    I have started drawing my mill in solidworks, depending on funds, I plan on finishing this in about 1-3 years. My Sr year I will be taking a machine design class which may help with designing my mill.

    Jon

  4. #4
    Join Date
    Aug 2005
    Posts
    86
    Good luck with your project... be sure to take photos!

  5. #5
    Join Date
    Jul 2005
    Posts
    450
    Derek, just wanted to say thanks for the post about the encoders on the p5's! I have the same drives and was powering the encoders off of the hall power and getting nowhere. Guess i should have read the spec sheet for the motors more carefully.

    About the 100v 40A power supply you mentioned, building an unregulated psu is really easy, but for that kind of power rating your looking at $600 worth of parts.

  6. #6
    Join Date
    Apr 2003
    Posts
    302

    Smile

    I just went to the surplus center and found a motor and control for my lathe. Thanks for the tip! I look forward to your progress.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •