Large Brushed servo setup on the cheap (WIP)


Page 1 of 18 123411 ... LastLast
Results 1 to 20 of 352

Thread: Large Brushed servo setup on the cheap (WIP)

  1. #1
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default Large Brushed servo setup on the cheap (WIP)

    Hi - my name is sam.. I am a cheap bastard.

    That being said..

    I have fallen in love with emc2. Yes that is a strong word but I have. You may have seen me praise the virtues of emc2 in other threads. I try not to be too annoying.

    Now back to the subject at hand. Emc2 works with servos as well as steppers. Normally you would buy a servo amp for each axis + an interface card that does hardware encoder counting and servo control out (+/- 10V or maybe pwm). Well servo drives are expensive as well as the interface cards. Emc2 does the pid loop plus it has feed forward 0-2.

    One of the gurus on the emc irc channel had mentioned that he had used a h-bridge to run a servo. Emc2 has a Hal module (hardware abstraction layer) that is called freqgen (now there is an even better hal module called pwmgen). This module can be set up to output 2 pwm signals - one for forward and one for reverse - in proportion to velocity. So he had an h bridge hooked up to the pwm out - one pin for forward - one for reverse and read the encoder back in for position (another 2 pins). (parrallel port).

    This got a lot of people thinking. This guy made a servo etch-o-sketch using the same principle. http://emergent.unpy.net/projects/01142347802. He used a L298 as the h-bridge and also read the encoders back into the printer port.

    Another emc developer converted one of his lathes to servos using the same L298 Bridge. He has had great luck with it so far. Very small following error. (he has not made a page on it yet but is going to)
    Here is a picture of his servo mount
    http://timeguy.com/cradek-files/emc/DSCN6290.JPG

    so what you have is..

    Emc2 > h-bridge > servo > Encoder
    ^_____<______<______<____<___V

    Simple servo loop with minimal parts With emc doing the pid

    I was thinking - I wonder if this would work with larger servos. That is where I am at at this point. I have created a simple h-bridge using some 44a mosfets and ir2111 bridge driver. (they are 44a 500v but I will be lucky to get 20a out of them because of the power dissipation (rds is .12 ohms)). I got lots of help from one guy who does power circuits for work.

    I am at the point right now where I am just testing to make sure the h-bridge is working. I have it hooked up as a spindle in emc2 (outputting s words changes the pwm duty cycle testing the circuit)

    Couple of things - issues with the circuit. There isn't any current limiting (that’s what fuses are for right ). I am planning on just winging it like I normally do and see what happens. I am hoping that I can set limits within emc that will keep the current in check. If not then version 2 of the circuit will probably have some simple current limit in it.

    This is the ultimate plan for the conversion
    http://www.electronicsam.com/images/...DSCCurrent.JPG

    Here is the h-bridge circuit as is.
    http://www.electronicsam.com/images/...art/almost.JPG

    Here is a picture of emc2+axis. (work of art)
    http://www.electronicsam.com/images/KandT/Dapper.png

    I will post the circuit once I get more farmiliar with eagle. I was just picking componants by the physical size I wanted not the correct package.

    I will keep updating this thread with successes and failures

    sam

    Similar Threads:


  2. #2
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    To explain the K&T
    http://www.electronicsam.com/images/...DSCCurrent.JPG
    http://www.electronicsam.com/images/KandT/oldkandt.JPG

    This is a kerney & trecker horizontal machining center. It is named the Milwaukee matic IIIb. We had gotten it for the price of scrap maybe 15 years ago. Thought we could make it work and did. It has a GE controller on it that is all discrete components. Yes discrete components: ). It worked quite well for the past 15 years but finally died. It had linear and circular inturp up to 9.9999 inches (which wasn't that great but worked)

    It has a 60-tool chain. 38"X36"X24" travel. Table that indexes at 5 degree increments. It has Ball screws through-out and tikko(sp) ways (think re-circulating roller bearings for way bearings)

    Emc2 will be a nice match - it has ladder logic built in to do some of the tedious things like pallet and tool changes.

    Right now it has hydraulic servos but the plan is to replace them with these or similar
    http://www.electronicsam.com/images/KandT/DSC_0242.JPG

    The emc group has done something similar to a mazak
    http://wiki.linuxcnc.org/cgi-bin/emc....pl?MazakRetro
    also
    http://webpages.charter.net/bengvall...onversion.html

    sam



  3. #3
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    442
    Downloads
    0
    Uploads
    0

    Default

    I built a version of the etch-a-sketch circuit with some L293b (1 amp). EMC performs very well but cannot keep up with high pulse rates on the encoders.

    Aaron



  4. #4
    Registered
    Join Date
    Dec 2005
    Location
    USA
    Posts
    3319
    Downloads
    0
    Uploads
    0

    Default

    International Rectifier has created some real neat driver IC's which make it very easy anymore to make H bridge drivers using inexpensive N channel mosfets.

    NOTE: with care, you CAN parallel fets to really up the drive capability PROVIDING you can turn them on equally fast and hard so that current sharing is fairly even. We were running 6 in parallel on our RC car speed controls and pulling nearly 100 amps and they ran fine (only at 3khz not 20khz as a servo drives them).

    For a single chip servo IC and discrete drive bridge, see if you can find any info on the UC3637 IC. It is supplied by Unitrode/TI.

    http://focus.ti.com/docs/prod/folders/print/uc3637.html (samples)
    http://focus.ti.com/lit/an/slua137/slua137.pdf (U102 app note, thanks Aaron!!!)

    This is a programable +/-10volt servo amplifier IC although with a bit of resistor changes, you could make it run at +/-5 or almost whatever you want.

    This neat IC and the hard to find U102 application note provides all the info you need/want in easy to follow format to build a servo amp including speed, direction and pulse by pulse current sensing/limiting. THe current data sheet sucks in that it is in electro-speak making it hard for then non-EE to understand.

    Although the power amp for the UC3637 in the U102 app note uses N and P-Fets, it would not be that hard to replace them with N-fets via the use of the current fets and fet driver technology that IR has released (IR2184 or something like that).

    The U102 application note from the 1988 Unitrode catalog is hard to find (Aaron found it an it is linked above) and I have no way to scan the copy I have. THis is sad as the U102 shows how to make a much higher current driver than the L298 listed in the current application note (again, thanx to Aaron).

    Last edited by NC Cams; 10-18-2006 at 09:53 PM. Reason: add links and fix U102 references - thanx Aaron


  5. #5


  6. #6
    Member
    Join Date
    Jun 2003
    Location
    Boalsburg PA
    Posts
    866
    Downloads
    0
    Uploads
    0

    Default

    I hope you wear a lab coat when you operate that machine!

    One of the issues you may have to deal with is braking: the machine is going to backdrive your motor drive circuit when you slow down.



  7. #7
    Registered
    Join Date
    Dec 2005
    Location
    USA
    Posts
    3319
    Downloads
    0
    Uploads
    0

    Default

    Fanuc dealt with that problem by shunting an NO/NC relay across and in series with the output of the drive. Bridgeport did it that way too on their V2XT's with servo motor drives.

    The NC terminals are shunted across the motor terminals between the motor and drive when the drive is OFF. The NO is in series with one drive leg and is mounted between the drive and the NC terminals during OFF as well.

    You can dead short the NC or shunt it thru a resistor to bleed off the backdriven EMF.

    During slowdown as opposed to "no drive at all" situations, the amplifier drive has to be robust enough to absorb the back EMF or you have to find a way to shunt the voltage around the controller via a EMF overvoltage sense circuit.

    Last edited by NC Cams; 10-18-2006 at 11:01 PM. Reason: added Bridgeport note


  8. #8
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    Thanks for all your ideas.

    I am planning on getting or making some 250 line encoders or there abouts. That gives me 1000 edges. If I do connect the servos direct drive - that gives me a resolution of .000333" minimum.

    emc can count an edge per base period. That mean the maximum I can count at 3000 lines per inch (3 lead ball screw) is

    1/.00005(base period) = 20khz

    20khz/3000lines-per-inch = 6.66 inches per sec = 400ipm (twice as fast as the machine was originally and the maximum these servos will do 1200rpm).

    A 50us period is slow. A decent ghz class computer should do 20us or better.

    So it seems very do-able.

    NC Cams - The ir2111 is a half bridge driver that uses a boot strap circuit to run the high side n-channel mosfets. Pretty cool if you ask me. The only issue is you can't send it a 100% duty cycle as the boot strap circuit needs the off time to charge the cap. The reason I am doing it this way is that emc can output a pwm signal to directly drive the h-bridge.



  9. #9
    Registered
    Join Date
    Dec 2005
    Location
    USA
    Posts
    3319
    Downloads
    0
    Uploads
    0

    Default

    The charm behind the use of the UC3637 is that it also does current limiting - good protection for motors and drivers, especially if you hit a limit stop.

    Although you can do lots of stuff with computers, sometimes the use of chips that have a lot of built in protection schemes is much more efficient than to try to have the computer do everything.

    Essentially, that is what Bridgeport and other machine integrators did when they used outsourced servo amp. Current monitoring, over/under voltage and other stuff was easier to do remotely and then merely send an error signal to the PC to tell that a fault had occured.

    Look carefully at the use of the UC3637. It was designed to do EXACTLY what you want and requires a minimum amount of input to do so. Yes, it requires a pure analog voltage to run but there are surely step/direction to analog voltage converters that one could readily use/create to affect the interface.

    In any event, the U102 application note will provide a lot of useful information to you whether you use the UC3637 to build a servo driver or not.



  10. #10
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    442
    Downloads
    0
    Uploads
    0

    Default

    My test system falls apart at around 32000 pulses per second, this is on a 1.4GHz AMD.
    Bumping up the processor speed will give diminishing returns - the issue is that I/O operations are extremely slow on x86 derivatives. You can have the fastest processor in the world but it won't go any faster than the I/O.

    As far as 100% duty cycle on the IR bridge drivers, it's easy to add a secondary charge pump to allow for 100% duty cycle. Check their application notes for a circiut using a 555 timer.

    Aaron



  11. #11
    Registered
    Join Date
    Dec 2005
    Location
    USA
    Posts
    3319
    Downloads
    0
    Uploads
    0

    Default

    When we PWM's hobby motors, we often did not run 100% duty cycle and did so intentionally. Unless you knew what was going on, you couldn't even tell.

    We ran the buss a bit over voltage and then PWM limited the voltage to 90% or 95% so as to not over speed the motors. The higher voltage gave us a bit more low speed torque due to a higher current potential.

    Then again, we were using true servo circuits with current limit which is where the charm of the previously mentionded servo IC really shines. The pulse by pulse current limiting helped prevent demagnitization from the overvoltage we threw at them.



  12. #12
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    Didn't play with it much this weekend. I have some cheap encoders coming from usdigital.

    I did hack apart a mouse to play a bit..
    http://www.electronicsam.com/images/...astermouse.png

    You can see I am getting edges atleast every 50uS. So it looks like I sould get my 20k counting rate I was shooting for.

    My base period right now is set at 20uS.

    sam



  13. #13
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    well I have gotten my 400 line encoders from usdigital. (bought the hub and sensor to mount on the servo).

    we found this servo to play with. (just sitting on a shelf )
    http://www.electronicsam.com/images/...t/permotor.JPG
    It is a smaller than the monster servos we have and will be a bit saner to test . I pulled the tach off the back and the shaft coming out is .375 - exactly the size that we bought the encoder hubs. Score!

    I hooked it up to the h-bridge (still set up as a spindle in emc) and found out what low inertia servos are like.. I could switch from 2500rpm to -2500 rpm and the thing wouldn't even twitch. Pretty cool.

    Hoping tonight to mount the encoder and close the servo loop.. (change it to an axis)

    sam



  14. #14
    Registered DennisCNC's Avatar
    Join Date
    Aug 2005
    Location
    United States
    Posts
    828
    Downloads
    0
    Uploads
    0

    Default

    You are all over this project! Keep up the good work!!

    Dennis


  15. #15
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    Cool - just cool.

    I closed the loop tonight - mounted the encoder and hooked it into emc.. I hacked the etch-o-sketch hal and ini files to work with my setup.

    It is cool trying to rotate the shaft and have it fight back - also it is cool being able to turn the shaft in estop and have the position update. (first time I have hooked an encoder into emc2)

    The pid loop needs to be tuned - but it worked well enough to see the concept. Again - very cool. The emc2 developers are awesome.

    http://www.electronicsam.com/images/...start/mess.JPG
    (don't have the heat sinks mounted yet )
    http://www.electronicsam.com/images/...t/Endoder1.JPG
    http://www.electronicsam.com/images/...rt/Endoder.JPG

    sam



  16. #16
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    mounted one of the 'smaller' servos on the z axis of the gantry. I still have to learn how to tune pid loops. It works though. like I said before pretty damn cool if you ask me. Very little hardware and poof - servo control through pc.

    This servo isn't the most powerful... but we where running z at 150ipm - the drive was taking 5 amps. we could get it to use 20amps by trying to move the shaft.

    http://www.electronicsam.com/images/...art/servoz.JPG
    http://www.electronicsam.com/images/...tart/sinks.JPG

    sam



  17. #17
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    262
    Downloads
    0
    Uploads
    0

    Default

    That machine looks roughly the size of what eventually became a KT-200 ?? I have run 800 and 200. The ones we had were straight shank at first then we changed them over to Cat taper. If your machine is like a 200 there is more Y travel avail than the machine thinks it has, we got darn near another 1" travel out of them for a certian job. The 800's especially wehn you look at them close and see the mles and miles of weld used to build one your mouth will drop open.

    Fine fine machines :-)...the like of which will never be made again. 10 years ago K&T was buying all they could get their hands on to put new controls on them. Takes some getting used to to use F0 for rapid :-)....With the new controls it is kind of nice to have the tool change also turn on the H and D offset for that tool...and you can set it up so the work offsets automatically kick in for a given B position....our 800's with the new controls would do 4 axis G01 at once too. The new controls also brought the function of having each axis only rapid as fast as it had to to arrive at the XYZB location at the same time as the axis with the furthest distance to travel.

    That Z axis sure has some mass to it, it is something to see when a guy gets a TLO off by several inches on a taper shank drill over 1" dia and all that mass breaks it to toothpicks :-).

    As old as our oldest 800 was it had METRIC hydraulic lines on it.

    Before they retro the new controls on the machines used the old pin reader to discern the tool numper from feeling the rings on the toolholder, they would get chips in them and do some funky crap :-)....and the rings were such a PITA to change that a toolholder once it was Tool #1 pretty much stayed Tool #1 forever :-)....there was a special part that screwed into the back end of the toolholder so that the tool was PULLED into the spindle, we only used them on endmills...if you didnt use one a large endmill would get sucked out of the straight collet spindle by the helix on the cutter.


    Bill



  18. #18
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    262
    Downloads
    0
    Uploads
    0

    Default

    Another thing I remember about those machines, now and then you will have some issues with part geometry, get to checking the machine with a test bar and an indicator, the pallet will indicate 0..0..0..0..0..0 all alog the front....but go back in Z and she falls away, means the shoulder is breaking off the cups the pallet sets on, pretty common, they will all maybe eventually break given heavy enough parts and enough cycles. We ran 800lb parts on both pallets of an KT 800 pallet changer.


    Bill



  19. #19
    Member
    Join Date
    Jul 2003
    Location
    Holmen, WI
    Posts
    1717
    Downloads
    2
    Uploads
    0

    Default

    Quote Originally Posted by Willbird View Post
    That machine looks roughly the size of what eventually became a KT-200 ?? I have run 800 and 200. The ones we had were straight shank at first then we changed them over to Cat taper. If your machine is like a 200 there is more Y travel avail than the machine thinks it has, we got darn near another 1" travel out of them for a certian job. The 800's especially wehn you look at them close and see the mles and miles of weld used to build one your mouth will drop open.
    I am not very informed about the k&t models. But yes - The amount of welding that was used to create these things is unreal. The plate steel is around 1"+ thick and it is welded up into a box frame. We have never tried to get any more movement out of the machine as we have been using the orginal controller which we where just happy it worked . (which now doesn't).. Also the tiko(sp) ways - Think roller bearings for way bearings.

    Quote Originally Posted by Willbird View Post
    Fine fine machines :-)...the like of which will never be made again. 10 years ago K&T was buying all they could get their hands on to put new controls on them. Takes some getting used to to use F0 for rapid :-)....With the new controls it is kind of nice to have the tool change also turn on the H and D offset for that tool...and you can set it up so the work offsets automatically kick in for a given B position....our 800's with the new controls would do 4 axis G01 at once too. The new controls also brought the function of having each axis only rapid as fast as it had to to arrive at the XYZB location at the same time as the axis with the furthest distance to travel.
    With the old controller - f99 was rapid - 150ipm (f98 was 98ipm). I don't see us making B a full axis. It has a cirvix(sp) coupling that gives us 5 degree indexes. Maybe in the future.

    Quote Originally Posted by Willbird View Post
    That Z axis sure has some mass to it, it is something to see when a guy gets a TLO off by several inches on a taper shank drill over 1" dia and all that mass breaks it to toothpicks :-).
    I have formed metal by accident when inverting x and z by accident.

    Quote Originally Posted by Willbird View Post
    As old as our oldest 800 was it had METRIC hydraulic lines on it.
    hydraulic english here

    Quote Originally Posted by Willbird View Post
    Before they retro the new controls on the machines used the old pin reader to discern the tool numper from feeling the rings on the toolholder, they would get chips in them and do some funky crap :-)....and the rings were such a PITA to change that a toolholder once it was Tool #1 pretty much stayed Tool #1 forever :-)....there was a special part that screwed into the back end of the toolholder so that the tool was PULLED into the spindle, we only used them on endmills...if you didnt use one a large endmill would get sucked out of the straight collet spindle by the helix on the cutter.

    We where trying to decide if we wanted to use the rings on the tool holders or use the tool position in the chain. With emc2 I think either would be possible.

    It is cool finding someone that is farmiliar with the k&t line. Granted this one is very old. Still it must have been cutting edge in its day as the options on it are touted as 'new' on new machines.

    thanks for the heads up on the pallet line-up pins. It has had a pretty easy life since we have had it.



  20. #20
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    262
    Downloads
    0
    Uploads
    0

    Default

    I only ran the machines we had a very few times on the old controllers. The guy from K&T that came in and worked on them, I think his name was "Gary Star"....we all called him "Starman"...this was before they became Giddings and Lewis....the two 200's they had rebuilt to machine Ford new Holland housings were they ones they got the extra 1" of Y travel out of, there were two holes in the part at 6 o'clock and 12 o'clock that needed that extra bit of travel to drill them.

    I have to guess our 800's were mechanically ready to go for the 4 axis.....I guess some machines are mechanically true 4 axis, and some are 3-1/2 (not KT but cnc's in general) some the pallat drops down into what look like gear teeth when it clamps up......others it just rotates and the motor holds it in position ?? Some machines even 3 axis at once was a software option, and full fourth might be the same way ??

    Really I consider myself fortunate, and you should as well to get to pilot one of those old girls ?? Hope you get her singing again.....not many CNC machines out there that will bury a man in chips when he works them hard hehe :-)

    Bill



Page 1 of 18 123411 ... LastLast

Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Large Brushed servo setup on the cheap (WIP)

Large Brushed servo setup on the cheap (WIP)

Large Brushed servo setup on the cheap (WIP)