Large Brushed servo setup on the cheap (WIP) - Page 4


Page 4 of 18 FirstFirst 123456714 ... LastLast
Results 61 to 80 of 352

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

  1. #61
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default Keeping PWM simple & cheap

    Samco,

    I need to recap what I understand about your setup, so you can correct me here:

    You are using the raw parallel port (or Pluto-P card for higher data rates) to output a pwm up-count and down-count on 2 separate pins which are piped through a 2 channel high-speed optocoupler to two IR2111s, which then feed the high and low gate signals to each side of your massive H-bridge. No current limit scheme is in place yet, inductive currents are handled by the massive capacitor, and back emf is handled by the high speed super-diodes working in parallel with the mosfet's internal body diodes. No shunt ballast resistor - so some heating might occur in the motor if high speeds and high loads are combined.
    Feedback is provided by a square wave encoder which is read into the pport pins provided by EMC2's pwmgen hal module, or the Pluto-P. The PID loop is handled internally in EMC2.

    Sorry for the long-winded description. Please correct me here. Feel free to expand on or replace anything...

    I do have the Mesa 7I33 for +/- 10V, which I was planning to use with the existing servo amps on the Kasuga.

    Since I already have most of the components that you are using on your H-bridge design, I would like to try one out on my mill (my mosfets are rated 300V,40A, RdsOn=.08 ohm). With your permission, I would like to implement a pwm+pwm H-bridge scheme like yours. If you have any circuit board artwork to share, I would like to use it to make a chemical etched version (hand drilled) to try out and report back on.

    I'd be happy to document my results here in this thread.

    Thanks for your help,
    Tom



  2. #62
    Member samco's Avatar
    Join Date
    Jul 2003
    Posts
    1754
    Downloads
    2
    Uploads
    0

    Default

    Exactly

    Go for it! Keep us updated.

    sam



  3. #63
    Member samco's Avatar
    Join Date
    Jul 2003
    Posts
    1754
    Downloads
    2
    Uploads
    0

    Default

    oh - and http://www.electronicsam.com/images/...vostart/schem/
    are the eagle files.. The parts are not correct (I was strictly looking for physical sizes) - here is the parts list.


    FDH44N50 N - MOSFET transistors 500V / 44A for the power mosfets.
    RURG5060 Ultra Fast Diodes 600V 50A for the free wheeling diodes
    IR2111 for the half bridge driver.
    MUR120RLGOSCT-ND DIODE ULTRA FAST 1A 200V AXIAL for the boot strap.
    LM340T-15-ND 15volt regulator
    TLP2530-ND PHOTOCOUPLER DUAL 6N135 8-DIP
    .1uf caps and
    iirc 10uf electrolytics.
    The big cap is 1900uf I think at 350volts (I think)

    Couple things
    - when there isnt any pwm signal applied to the bridge - both lower mosfets are on. (braking)
    - I had a lot of help from a emc developer that does high power circuits for his real job.
    - there is no current limiting yet.
    - you should find lower Rds mosfets.
    - if your going to run higher than 200v you need higer voltage boot strap diodes.
    - this cannot have 100% duty cycle pwm signal other wise the boots strap doesn't get charged.
    - use at your own risk (of cource)
    - great care was made to have a short power circuit loop - to help get rid of stray inductance.




  4. #64
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default

    OK!
    I got your .brd and .sch files opened in Eagle Light - I'm all set.
    There may be a way to implement a chopper based current limit scheme on the low side logic level gate signals. We'll see...
    Thanks.
    Tom



  5. #65
    Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    1602
    Downloads
    0
    Uploads
    0

    Default

    Hi guys, I really like the idea of a simple opto-isolated PWM amp, but I think I'd need current limiting in my system.

    I am currently considering using a high-side monitoring IC - would you guys be interested if I get something working?

    Also, what sort of current requirement do you have on your 12v power line? I am wondering whether it is feasible to generate the 12v supply on board from the motor power line with a linear regulator.

    Cheers, and good luck!



  6. #66
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default Questions, ideas

    Samco & Digits,

    I have a few questions for you Samco:

    What are the values for the R/C noise filters on the logic input lines?

    Why is it that the Pluto-P can achieve higher data rates that the P-port to which it is attached??

    Re. current limit:

    Simple current limit could be: pipe a small analog signal (0- 20mv - from a sense resistor calculated from expected motor power into an opamp w/gain x 100, then to a comparator with an adjustable V ref on one of the inputs (current adjust) and a logic 0-5V pulse output, then to nand gate which cancels the low side gate pulse when a positive pulse from the sense comparator is on one of the inputs.

    Another scheme could be to use the current sense comparator output to drive a small signal transistor to clamp the low side gate signals to ground.

    Please, anyone is welcome to comment on this idea , really!

    Tom



  7. #67
    Member samco's Avatar
    Join Date
    Jul 2003
    Posts
    1754
    Downloads
    2
    Uploads
    0

    Default

    the resister is 220ohm and the parallel cap is 100pf.

    The pulse train from the printer port is limited by the os/realtime kernel. You can only go so fast and still have the computer responsive. That seems to be 20Khz to 100khz (if your lucky). the pluto can ouput much faster pulses because that is all it mainly does. Emc sends it velocity and the pluto ouputs the pulses and sends emc back a position. (I may be a bit vauge.)

    sam



  8. #68
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default Pluto-P

    Samco,

    Ok. Thanks!



  9. #69
    Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    1602
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by kestreltom View Post
    Samco & Digits,

    I have a few questions for you Samco:

    What are the values for the R/C noise filters on the logic input lines?

    Why is it that the Pluto-P can achieve higher data rates that the P-port to which it is attached??

    Re. current limit:

    Simple current limit could be: pipe a small analog signal (0- 20mv - from a sense resistor calculated from expected motor power into an opamp w/gain x 100, then to a comparator with an adjustable V ref on one of the inputs (current adjust) and a logic 0-5V pulse output, then to nand gate which cancels the low side gate pulse when a positive pulse from the sense comparator is on one of the inputs.

    Another scheme could be to use the current sense comparator output to drive a small signal transistor to clamp the low side gate signals to ground.

    Please, anyone is welcome to comment on this idea , really!

    Tom

    Looking at other open-source designs such as UHU-servo, I think you actually need to latch the output of the comparitor so that it disables the gate pulse for the entire cycle. Otherwise you might get nasty oscillations as the current limit trips, the current drops, the circuit un-trips and the current rises again - all with a few us round trip.

    I am also worried about current limiting during regenerative-braking - if the motor is generating power, and raising the voltage of the +ve supply rail, I would have thought that the voltage across the sense resistor would become -ve and so not trip the comparitor?



  10. #70
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default current limit circuit

    Digits,

    OK... now were off. Nice thinking - thanks! Would you post a link to the UHU schematics or discussion that treat this topic? I would like to take a look at it.

    Yes, I was wondering what sort of damping, if any, would be needed keep the limiting circuit from unstable oscillating. Keep in mind that the pwm frequency becomes the current limit period - so at 20K we have 50us for example. Unnecessary oscillating/switching will caused a lot of ripple and harmonics with resulting motor heating and other nasty stuff.

    Just ruminating here: the comparator circuit of choice would need to have some dead band, so a latch, schmidt trigger, or a line driver (ex:74LS244N) - or all three on the logic outputs will help keep switching clean. Another idea would be to run the comparator output through a flip-flop that is clocked to the pwm rate. This way we are guaranteed a clean logic high or low once per pwm period.

    I have not had a chance to research how to handle recirculating current yet. My take is that since the current sense resistor will only generate a positive voltage when current is flowing from the motor to ground, then it wouldn't matter what the voltage potential is at the rails. The current sense comparator inputs only respond to a positive signal from the sense resistor leads - so negative current flow here, and thus a negative sense voltage would be ignored.

    Comments?

    Tom



  11. #71
    Member
    Join Date
    May 2006
    Location
    Australia
    Posts
    2420
    Downloads
    0
    Uploads
    0

    Default

    I may jump on board as well, I am doing much the same thing, I have made my own H Bridge board and this will plug into a seperate processor board. As yet I have no current limit but would like to do something. My thoughts on the regen from the servo is to build a regen power dump circuit that sits on the motor power supply, as the voltage spikes, the excess energy is dumped and this keeps the voltage under a certain level.

    This way a standard current limit only has to trip under overload conditions.

    Just my 2c. Keen to see how this all goes.

    Russell.



  12. #72
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default Regenerative power dump

    more 2 cents...

    A simple regen power dump, as Russell points out is actually part of the common power supply for all the amplifiers attached to it. My guess is that a linear switching circuit using a high current bipolar transistor and a low value but very large resistor would form the basic circuit.

    Tom



  13. #73
    Registered
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default Regenerative power dump

    Hi guys,
    I've been a bit involved in testing the new HP-UHU board and I've designed a powerdump circuit that helps clamping the powersupply voltage. You can find the schematic for this in post #1646 here.

    However, clamping the voltage is just part of the problem which has also been discussed quite a bit in the UHU-thread, basicly starting here.

    /Henrik.



  14. #74
    Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    1602
    Downloads
    0
    Uploads
    0

    Default

    Cheers Henrik - that is very helpful

    If I have understood it correctly:

    During regenerative braking at full speed, there is a danger of exploding the MOSFET's and power capacitors if the sum of the motor back EMF and the PSU voltage exceed their specifications - hence the dumping circuit.

    There is also a danger of melting the motor-windings if the current produced by this summed voltage exceeds the motor's limits.

    However, is it the case that if you measure and limit the current through the motor during full-speed reversal, both of these disasterous events can be avoided, at the minor penalty of only being able to decelerate at the same rate that you can accelerate?

    I'm not saying that measuring the actual motor current will be easy, but it might be a neater solution than burning off a shed load of power in braking resistors.

    Then again, I may have got the wrong end of the stick again!



  15. #75
    Registered
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    Hi digits,

    If you browsed thru the messages in the UHU thread you probably noticed that I don't have a full understanding of this issue either, but little by little it is sinking in, I think/hope. So, please don't take this as 'the truth' but more as an open discussion.

    Yes, the dump circuit is there to prevent the powersupply voltage from increasing above what the drive is rated at and/or the voltage rating of the capacitors in the powersupply itself. The capacitors in the powersuopply will absorb quite a bit of regenerative energy even without a dump circuit but if operating close to the drives limit and driving heavy loads it might be a good idea to use one. Industrial drives either have the dump circuit built in or simply shuts down the drive on overvoltage - which also prevents it from dying.

    The powerdump circuit does not impose any negative performance on the motor at all. But again, it's only part of the problem.



    The transistors in the H-bridge can die of too much voltage and/or too much current, the dump circuit will prevent it from the former. However, it can't prevent from the later.

    Measuring true motor current (tourqe) is the key to prevent it from dying from too much current while regenerating. A common type of H-bridge in DIY-drives, like the HP-UHU works by turning on two of the diagonal MOSFETs and look at the current that flows thru the senseresistor at the bottom of the bridge. When this current reaches the setpoint it switches off the MOSFETs untill the next PWM cycle - nice, effective and simple. (But not the best way)

    If the motor is spinning in one direction, generating, say 100V, and the H-bridge applies the powersupply voltage of 140V "in series" with the motor the resulting voltage across the motor terminals is now 240V.

    The 140V powersupply will "push" current thru H-bridge, thru the motor, down thru the sense-resistor and back to the powersupply untill the current sense circuit turns off the MOSFETs (just like it always does). But during the short period that the MOSFETs are ON the current generated by the 100V BEMF of the motor has a "closed circuit" from the "positive" terminal of the "generator", up thru the diode in turned OFF upper MOSFETs, down thru the other turned ON MOSFET and back to the "negative" of the "generator". The only thing limiting this current is the winding resistance, wiring, connectors, PCB traces and RdsON of the MOSFET.


    For a large, high voltage, high current servo motor this current might be 100's of amps. By measuring the actual current thru the motor you can catch this and turn off the bridge before the current rises to high.




    The "right" way to do it is to have two control-loops in the drive, one "inner" loop, the torque-loop (or current loop) that is always controlling the current and one outer loop, usually a position loop in this case that calculates how much torque is needed and "orders" that amount of torque from the inner loop.


    Complicated, yes. That's why you don't see it on many "DIY-drives". The VSD-A from Granite Devices is the only one I know of that does it the "proper way" and has a price you can actually afford without taking a second mortage on the house.



    Again, please don't read more into this than it is. I'm still trying to figure most of this stuff out too.

    Sorry for the ramble....

    /Henrik.



  16. #76
    Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    1602
    Downloads
    0
    Uploads
    0

    Default

    Thanks for such a detailed reply Henrik - I keep forgetting about those darn diodes!

    It does still sound to me though that if you are sensing the current on the motor leads, and reducing the PWM on-time to clamp it to a safe max, you will also limit the FET/diode current, won't you?

    Having already toasted 3 G320's due to back-EMF induced PSU voltage rise or excessive diode current, I am very keen to find a way to solve this safely if I do build a 'simple' PWM amp.

    Cheers.



  17. #77
    Registered
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    Hi,
    It does still sound to me though that if you are sensing the current on the motor leads, and reducing the PWM on-time to clamp it to a safe max, you will also limit the FET/diode current, won't you?
    Yes, exactly. The tricky part is how to do it - the devil's in the details.

    Let us know what you come up with if you give it a go.

    /Henrik.



  18. #78
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    83
    Downloads
    0
    Uploads
    0

    Default Sensing motor back emf - power dump

    Henrik

    Thanks for the helpful post! This made me jump to the UHU HP forum and spend some time reading there, watching the videos, thinking, etc.

    I took a good look at the the current limit circuit posted in the UHU_MODIFIED_Dated1.4.08_R1.0b.pdf file, and I noticed the dual slow/fast response circuits that combine outputs before piping the signal to the microcontroller. What is the reason for having separate slow and a fast response signals & why combine them?

    Thinking about recirculating currents and the capabilities of EMC2 here...
    I suspect that EMC2 does not have the ability at this time to read a current limit logic/analog input and incorporate it into the position control computations that adjust pwm. As far as I know, PWMgen, or the Pluto P configs only take position feedback from the encoders and interpolate velocity from the same before calculating error and commanding the pulse width on 2 separate (up/down) complementary pins. This would be analogous to a torque command, or what I think you refer to as the outer torque loop. This is a very simple arrangement which Samco calls "pwm & pwm", and may have undiscovered limitations due to the fact that EMC2 can read position & velocity, but has no way of knowing if the motors and amps are melting down. The only response from EMC2 in a severe servo overload situation would be tripping the maximum position error setpoint.

    In order to avoid damaging motors and mosfets, or exploding capacitors with recirculating back emf - I am guessing that the simple/smart way to go is to design in a lot of overcapacity into the basic H bridge and power supply so that the limits are not ever reached - which I believe Samco has achieived here. Adding a current dump and a current limit will increase useable power to the servos, increase safety and reliability, will not require any input from EMC2, and will cost a little in added complexity.

    Since pulse by pulse current limiting, or the inner torque loop, is not hard to implement directly on the motor drive, it should be done.

    That said (whew...) I am getting ready to improvise a design. Your input from your UHU HP experience is very helpful - since it is a high power design.

    Please feel free to respond, correct, add...

    Thanks,
    Tom



  19. #79
    Registered
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom,

    The reason for the fast/slow limit is that you can utilize the peak torque of the motor for a limited time before the continous limit "kicks in". It is supposed to give you 2.2 times the continoues torque for a few seconds and then limit the current to the value you set. That is what it's supposed to do but although tested on the prototype it doesn't seem to work properly on two of the beta-boards. (Mine and Jozsi's). They both operates at the peak-current limit all the time, the integrator circuit never charges enough to trip the slow limit which it apparently did on the prototype. I'm sure there's something simple going on and we'll figure it out soon.


    With larger motors there's an absolute must to have a current limit circuit. If you don't you can fry both the H-bridge and the motor in case of jamed mechanics or what not. Take my motor as an example, it has 0.24ohm armature resistance, if the motor won't spin due to it being jamed, applying 140V across it will result in a current of 580A(!). If that much current is ever let into the motor it will self destruct in a heartbeat.

    You definetly need some safety margin on the components in the powerstage but as you can see above it gets very unpractical and very expensive to design "around" a proper current limit scheme.


    I don't use EMC myself but I dare to say that trying to use the CNC-control software to limit the current won't work. Real-time or not it's too slow, you need to react in uS here or something will smoke.


    The output from the current limit circuitry on the HP-UHU does not go back to the microcontroller, it inhibits the PWM by disabling the MOSFET drivers for the rest of the PWM cycle. The microcontroller has no knowlege or control over the current - it's all done in hardware.

    What I guess you could do is something like what the HP-UHU does, ie. feed the PWM from EMC to the H-Bridge and then inhibit the PWM by disabling the MOSFET drivers with the current limit circuit, cycle by cycle as is done on the UHU. This will not prevent regenerative current from blowing the high-side MOSFETs though, dump circuit present or not. (Depending on powersupply voltage, motor etc of course).

    Interesting stuff... ;-)

    /Henrik.



  20. #80
    Member samco's Avatar
    Join Date
    Jul 2003
    Posts
    1754
    Downloads
    2
    Uploads
    0

    Default

    I am sure there are going to be limitations... Mainly what I want to try is this..

    1. H-bridge will be fused.
    2. Following error will be set as tight as it can.
    3. Accelleratioin will be set to a 'safe' amount.

    The h-bridge is running slow decay mode. (the motor windings are shorted out thru the bottom 2 fets durring the off cycle) This also makes the h-bridge more linear vs input signal.

    This is by no means a perfect setup. But it will be fun to play with. We may in the end buy some comercial amps.

    sam



Page 4 of 18 FirstFirst 123456714 ... 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)