584,837 active members*
5,697 visitors online*
Register for free
Login
Page 2 of 8 1234
Results 21 to 40 of 148
  1. #21
    Join Date
    Jan 2005
    Posts
    364
    First off: thanks for your extensive reply on my queries.
    I've been reading very much and also started the PCB designs.

    I decided to use a daugter board with the CPLD and it's basic components because I really doubt that I will be able to solder that extremely fine pitch CPLD, if I can't then somebody else could do it for me: just ship the small adapter pcb's back and forth. When all this fails: there are adapter boards with CPLD and basic components available on Ebay...

    There's also a very important second reason for this: A few years ago I started a design and used an AVR to control the power section, it worked but needed some fine tuning. Unfortunatly this went on the backburner, other more urgent stuff to do.
    If I want to pursue this AVR based drive: it would just need another daughter PCB with the AVR and use the same power PCB.

    BTW: this AVR firmware already implemented "morphing", still needing some testing and fine tuning.

    Regarding your last post on resonance compensation: I did a lot of reading on this subject a while back and as far as I remember:
    - the incoming step pulse is a bit delayed before it actually changes the current in the power section.
    - resonance is detected by monitoring the drive's current
    - when resonance is detected: a correction is applied by advancing or delaying the current change in the power section.
    - The amount of correction is a function of the amount of resonance detected and the motor speed.

    Does this match with the Microchip stuff? I would be interested in a link to their solution.

    Thanks again and regards,
    Luc.

  2. #22
    Join Date
    Jan 2005
    Posts
    364
    Addition to the resonance correction:

    Quote Originally Posted by H500 View Post
    I'm not sure how to do this with the cpld
    As far as I understand it: it's more analog than digital: dedicated motor current filter, proportional phase shift and speed detection.

    So I looked at my spare G251 and it has a 14 pin LM324 and 14 pin LM339, this adds up to 8 analog "elements", the CPLD tutorial only has 2.....
    The basic schematic on one of the patents (4675590) has 4 for the correction alone.

  3. #23
    Join Date
    Jan 2005
    Posts
    1695
    Quote Originally Posted by lucas View Post
    I decided to use a daugter board with the CPLD and it's basic components because I really doubt that I will be able to solder that extremely fine pitch CPLD,
    It's actually very easy to do. You don't need to do it pin by pin. Just smear on the solder and drag it over multiple pins. If there are shorts, use a solder wick to clean it up.

    BTW: this AVR firmware already implemented "morphing", still needing some testing and fine tuning.
    What sort of issues remained?

    Does this match with the Microchip stuff? I would be interested in a link to their solution.
    Microchip's approach is different.

    Here's a link to the software description.
    ww1.microchip.com/downloads/en/AppNotes/01307A.pdf

    Here's the circuit
    ww1.microchip.com/downloads/en/DeviceDoc/70610A.PDF

    Microchip uses a DSP. They use a proportional integral current control algorithm. An A/D converter is used to measure the current. The PWM duty cycle is adjusted in a closed loop fashion to create the sinusoidal drive waveform. Additionally, an anti-windup term is added to the mix. It has the side effect of creating the phase advance on the winding current, which counteracts the midband instability.

    I am building the control section on a breadboard.

  4. #24
    Join Date
    Jan 2005
    Posts
    364
    Well for me it ain't that easy, I etch my own pcb's and can't do trough hole plating and no solder mask...
    Used through hole components and used their pins as via's from top to bottom layer (standard practice).

    The daughter pcb is done, parts arrived today and I started soldering with the result below.

    Several unconnected pads and 2 connected ones came loose from the pcb, so some repair with thin wire was needed. Cause could be bad PCB quality or soldering iron temp. too high.

    Final result looks good enough to me but more practice will be needed to achieve a better result.

    Next step is try to program it using the simple parrallel programmer with the Xilinx 10.1 software.

    Thanks for the link to the Microchip pages, I will have a look at it during the weekend.

    Regards,
    Luc.
    Attached Thumbnails Attached Thumbnails CPLD Daughter014.jpg  

  5. #25
    Join Date
    Jan 2005
    Posts
    1695
    It looks good. Very similar to the one I did for my unipolar board. Did you use toner transfer or photo-resist?
    Attached Thumbnails Attached Thumbnails board.jpg  

  6. #26
    Join Date
    Jan 2005
    Posts
    364
    High time for an update, a lot has been done.

    All my PCB's are homemade: CNC drilled and photo-resist. I didn't get toner transfer to work properly.

    A "parrallel cable 3" is supported upto ISE 10.1 wich is still available for download. So I made the programmer, installed 10.1 and with some trouble and problems finally managed to program the CPLD with your JED file.

    I also designed a drive PCB, very quick, didn't pay much attention to "nice" or "PCB real estate" and used components I had, the only thing I did take care off: a good power gnd and signal gnd plane. If I can get this to work as I want a better, nicer one can be made.
    The design has place for gate resistors and diodes, but I didn't put them in, just wires for the moment.

    First tests were promising, the motor works better on this drive than on a DIY TB6560, much less vibration and almost never stalls.

    Some observations:
    The motor does make a slight hiss or whine in standby mode, on a Gecko it is dead silent.
    I also saw the "mystery" glitches at zero-crossing and top of the sine waves.
    The noise in standby should be solved by the slope compensation if I understood the tutorial correctly.
    In your implementation there's no slope compensation in standby anymore.

    So I wanted to compare it with the original one. Big problem: can't compile the original design with ISE 10.1, errors with the simulation libraries. I did spend almost 2 days on trying, nothing helps. Big frustration as I will probably never use that simulation anyway.
    Then installed ISE 13.1 and YEP got it to compile. Then reprogrammed the CPLD using ISE 10.1 and my cable 3 programmer.

    Apparently didn't make mistakes cause there's no magic smoke..

    The drive seems to work almost the same but the noise during standby is (much?) less and the mystery glitches are gone.
    It's difficult to compare when there are several days between the 2 tests, ideally I should build a second CPLD daughter PCB. This would make comparison much easier.

    On your "10kHz" problem: I noticed something similar but isn't there another explanation: There's a full 50µsec cycle where the current is rising but doesn't reach the setpoint, on the next cycle it continues to rise and quickly reaches the setpoint. This makes it look like a 100µsec cycle with some glitches but is in fact 2 50µsec cycles required to reach the set current.
    Using a higher supply voltage should solve this and apparently the slope compensation you implemented did it also.

    I am currently testing with 24VDC, the same as I used with the TB6560, a gecko and PAc-Sci drive. Next will probably be 48VDC and some other motors.
    I would also like to try 8 or 10 microsteps but don't know if I will be able to change the code and/or have the time to do it.

    Are you able to compare with the original implementation and check the mystery glitches and hissing?

    A pic of my quick and dirty drive... :
    Attached Thumbnails Attached Thumbnails S6000490.jpg  

  7. #27
    Join Date
    Jan 2005
    Posts
    1695
    Good job! I was hoping someone else would build one so that we can compare results. I haven't worked with through hole components for a long time. They have the advantage of being easy to probe.

    Here's my Verilog code for the 10 micro-step implementation. Most of the differences are in the sine generator.

    It might be possible to get rid of the the glitches by optimizing the slope compensation. I did not try it yet since I don't have a POT in the circuit. I believe the glitches disappeared if I left the drive in the slow decay mode.

    I am 99% sure that the 10khz issue was caused by the lack of slope compensation. The loop becomes unstable and alternates between maximum and minimum duty cycle.

    I turned off the slope comp during standby because the drive enters the slow decay mode. I don't have the amount optimized, so it increased the current slightly if left on. It's very simple to leave it on if you wish. An improvement would be to reduce the current during standby. That will reduce the hiss. On my motors, the hiss is very soft and will only occur at one or two of the microstep positions.

    I'm using 34v. I still need to build a higher voltage supply. The drive is more likely to resonate with higher voltage. Without damping, it is possible to end up with less speed when a higher voltage is used.

    I've been doing a lot of reading on DSPs. I would like to try a closed loop current controller to deal with the midband resonace problem.
    Attached Files Attached Files

  8. #28
    Join Date
    Jan 2005
    Posts
    364
    First off: Thanks very much for posting your implementation. The differences between yours and the original makes it easier for me to understand what changes are needed.

    Last night tests left me with a dillema: mystery glitches in yours and none in the original. The used hardware was the same so I thought that there should be a problem in the code.
    I checked your changes for the 10 µsteps and couldn't find anything wrong, but you also made quite a bit of other changes, like the decay.. wich I don't (yet) fully understand.

    After pondering for a while on what to do next, I decided to modify the original one with only your changes for 10µsteps so I would be able to check if they come from the µstep changes or the other ones.

    Managed to do this without much difficulty, but hey it's easy if you just have to compare 2 implementations...
    The result however was awfull: a huge glitch on top of the current sine waves and the motor vibrates like hell.

    After several hours of measuring, reading, thinking I finally found the problem:
    The PWM values are reversed versus the QA counter values.
    The definition for G100 must have a low QB counter value iso a high one and so on.
    So I swapped the QB PWM values around for Asin and Bsin.
    Reprogged the CPLD and it works, no more mystery glitches....

    I overlooked this before when checking your 10µstep changes and still don't understand why it did work so well.

    The glitches on your implementation are really small compared to the ones I had, cause must be the slow decay in yours (I think).

    I can mail you my implementation if you want to check this.

    Thanks again for posting yours, I would probably have spend a week or so to get it working.

    Regards,
    Luc.

  9. #29
    Join Date
    Jan 2005
    Posts
    1695
    I'm glad my code was helpful. I'm new to Verilog, so I'm learning as I go.

    Some of the changes I made to the decay was for experimenting with mix mode decay, fast during decreasing and slow during rising current. It resulted in a distorted wave, so I did not continue. Right now it switches to slow decay only on standby.

    Were you able to get rid of the glitches when using the fast mode decay? If so, I would be very interested in looking at your implementation. I don't know what is causing them. I think they might cause more vibration.

    Do your motors currently have any hiss?

  10. #30
    Join Date
    Jan 2005
    Posts
    364
    I modified the original code from 5 to 10 µsteps using your changes, but only the ones wich were relevant to the 10 microstepping.
    And found the problem in the sine/cosine values.

    It's fast decay when moving and recirculating during standby. There is some slight hissing during standby.
    The slope compensation does reduce it but not completely. This could be due to my hardware or some fine tuning in the slope compensation is needed.

    I'll try to do some more testing with other motors, higher supply and current.
    Will keep you posted.

    Luc.
    Attached Files Attached Files

  11. #31
    Join Date
    Jan 2005
    Posts
    1695
    Thanks. I will take a look at it. I would be very interested in your opinion on how well this drive work compared to the others you have. I had nothing to compare it to, other than my other boards.

  12. #32
    Join Date
    Jan 2005
    Posts
    364
    I can only compare with a DIY TB6560, a PacSci and a Gecko.
    The 2 last ones work just fine (of course).
    The TB6560 looses steps makes noise and hisses.
    The CPLD is a bit better than the TB6560 but also looses steps, we knew this already.

    I have 5 different brands of Nema23 1-2 Nm motors (minimum 3pcs of each brand), all are 4 to 6 Amp per phase, thus out of the TB6560 range. This is why I wanted to try this CPLD design.

    The noise and hiss it makes is no priority, nor is a morphing implementation as long as steps are lost.
    What I do need is resonance compensation, mechanically or electronically.
    Unfortunatly all my motors are single shaft, so a damper will be difficult.

    I think that I understand the basic implementation for compensation in a drive but designing it will take a lot of time (wich I don't have much).
    The microchip application (wich you pointed too) explains it as I understood it.

    Did you have a look at the implementation, I'm interested in your opnion.

    Regards,
    Luc.

  13. #33
    Join Date
    Jan 2005
    Posts
    1695
    I haven't done extensive testing, but as far as I can tell, my board does not miss steps. How are you testing for it? What do you think is causing it? With my earlier designs, I found that adding optocoupling on-board often helped by removing any ground potential with the PC.

    If your motors are single shaft, you can add the dampers to the ball screws. That's what I plan to do with my nema34 motors if I can't get the electronic damper to work.

    Also, my board has no hiss except when it stops at certain phase angles. Even then, it is very soft. Perhaps you need more filtering because of the through hole design?

    If I did not come across the DSP design, I would be be building 3 more units. But I find the DSP PID current control to be very interesting. It has potential for experimenting with closed loop position control. I have a bunch of encoders lying around.

    I am going to build a modified version of the microchip board. The main change is that I will use the IR2103 instead of FANxxxx because it has less pins.

    In theory, Microchip has fully functional code. I downloaded and compiled it successfully. I just need to design the hardware.

  14. #34
    Join Date
    Jan 2005
    Posts
    364
    Opto's already installed, hidden behind the daughter PCB.

    What I do for "losing steps" testing:
    - Set a low start speed
    - Set a low acceleration
    - issue a series of moves (at least 5) in one direction then move back in a single move to the original postion, do this 10 times in a loop.

    This causes the motor to pass slowly through all resonance frequencies and the destination offset indicates the kind of lost steps.

    By just moving back and forth the lost steps in the 2 directions cancel each other.

    I did reload your implementation and the results are the same.
    Differences between yours and mine:
    - No gate resistors, don't think this is the cause.
    - No damper, this could very well be it.
    - Your Keling motor might be better than the ones I use.

    Sometimes a damper can't be installed on the screw, no space. See pic below of a small machine I'm building. on the left will be a small pulley with a belt to the stepper.

    PS: This is the 2nd time that a message get's lost when posting and I have to retype everything. Looks like the Zone has a problem.
    Attached Thumbnails Attached Thumbnails X as001.jpg  

  15. #35
    Join Date
    Jan 2010
    Posts
    2141
    lucas, I haven't been following this discussion in great detail, but I noticed your mention of losing steps in a TB6560 driver as well as with your current driver.

    I don't know whether or not this is relevant to your current problem, but I thought that I'd note that some reports of missed steps with TB6560-based drivers have apparently been traced to signal timing issues, namely a slow response of the optoisolator(s) on the direction input (which is presumably a level-based signal) vs. quick response to the matching step signal (which is a positive-going edge-triggered signal), such that a reversal of direction may issue the step command before the associated direction signal has changed to its intended value. While that symptom is often noted when the optoisolator on a step input is bypassed while the opto remains in place on the corresponding direction pin, it might possibly be a factor even when both signals pass through optos, especially slow ones.

    Obviously this may have nothing whatsoever to do with your current situation.

  16. #36
    Join Date
    Jan 2005
    Posts
    1695
    How severe are the missing steps? How far off is the rotor?

    My test involved running the motor in one direction near max speed. When it stops, I check the alignment mark. Then I reverse the direction and then check it again. I could not detect any misalignment even under a microscope.

    I will try your test as soon as I get everything set up again.

    Perhaps you can try accelerating it quickly to avoid the resonance points. If it still skips, I would suspect the step/dir signals rather than the motor vibration.

    You could also pause after a direction change to ensure that the problem mentioned by Doorknob is ruled out.

    What pulse width are you using for the step signal? On my machine, it is set to 5 uS. If it is too narrow, the drive would ignore it.

    You could also try bypassing the optocouplers. I am currently not using any. I used a 1k series resistor to provide some protection.

  17. #37
    Join Date
    Jan 2005
    Posts
    364
    I'm really looking forward to the results of the test on your hardware and motor.

    Accelerating fast to avoid the resonance is a solution for some applications but is useless for CNC: Imagine milling a circle: The X motor will start very slow and accellerate in a sinewave like speed profile doing approx. what I do in my test.
    The circle will not be perfectly round if steps are missed but the endpoint might be spot on the starting point. Reason is that the missed steps during the positive moves cancel out the ones lost in the negative moves. Result looks to be no lost steps. This is obviously not correct.
    This is why I do at least 5 moves in one direction and only 1 in the other and each move must be slow start, slow acceleration.
    Edit: when rereading your post: I now realise that you suggested the fast acceleration as a test and not a solution, sorry for this but I will leave the above text in as it explains the reason for my way of testing.

    @Doorknob:

    The TB6560 is a DIY PCB and I have used it with and without opto's.
    I am aware of the problems with the Ebay drives, have seen the thread on how to solve it.
    The optocircuit I'm using is the one wich Mariss kindly explained on this forum a while back.

    I don't think this is the problem but I will recheck the polarity settings and signal delays.

    Thanks for your input.
    Luc.

  18. #38
    Join Date
    Jan 2005
    Posts
    1695
    I won't be able to work on it today, but I ran a quick test this morning. This is the g-code sequence:

    g92 x0,y0,z0
    g90
    g01
    f1500
    x1000

    My x axis is set to 2000 steps per unit, 1700 velocity, 80 accel. Each unit is one rotation. This code will rotate the motor 1000 rotations.

    When STEP is driven direct through a 1k resistor, there are no missed steps. However, if I add a hcpl2531 non inverting opto circuit on a breadboard, steps are missed. Typically, it's about .03 rev off per 1000 revs.

    Assuming your setup is similar, the problem would appear to be with the STEP signal. Perhaps you can send me your g-code to try.

  19. #39
    Join Date
    Jan 2005
    Posts
    364
    I was using Turbocnc for the tests and had a real close look today and saw some weird results.

    After running around in circles for a while I decided to use the MACH3 Pc from my production machine and configured the motors like yours.

    A 1000 turn move is indeed almost correct, but this is at constant high speed.
    When I zero the X and issue the MDI command G01 X10 f50:
    The motor is moving a bit too far...
    This is exactly the weird result I had with Turbocnc.
    I tried this with all 3 implementations: the original, yours and mine. All give the same result..
    The thing isn't loosing steps but gaining..........
    And I also hear a clonky noise from time to time during the f50 moves, both under TC4 and Mach.

    Am I getting senile???

    The clonky noise could be caused bu the XP setup, I'll verify this tomorrow

    Could you please verify this low speed move "G01 X10 f50"?

    For the optocouplers:

    Below is the schematic wich I use, I verified it and it's just perfect, timings are spot on. Quite normal coz it's based on the info from Mariss:
    http://www.cnczone.com/forums/184216-post2.html
    Apparently it ain't easy to design a circuit like this if you read the whole thread.
    Attached Files Attached Files

  20. #40
    Join Date
    Jan 2005
    Posts
    1695
    I tried your g-code several times. The rotor stopped at exactly the expected position. Is is possible that your motors are 2 degree per step instead of 1.8?

    Thanks for the opto link. I will have a look at it.

Page 2 of 8 1234

Similar Threads

  1. 6A 80V bipolar microstep drive, vote hope price
    By beliefdrive in forum News Announcements
    Replies: 3
    Last Post: 12-10-2009, 12:46 AM
  2. Replies: 0
    Last Post: 11-18-2009, 09:37 PM
  3. Bipolar Microstep 48 volt 5Amp /phase, 4 axis board
    By kreutz in forum Stepper Motors / Drives
    Replies: 571
    Last Post: 08-17-2009, 10:49 PM
  4. NEW Microstep Drive Module
    By jafgraphics in forum News Announcements
    Replies: 0
    Last Post: 02-02-2007, 05:43 PM

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
  •