6amp 60v 10 microstep bipolar drive - Page 3

Page 3 of 8 FirstFirst 123456 ... LastLast
Results 41 to 60 of 147

Thread: 6amp 60v 10 microstep bipolar drive

  1. #41
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    Progress, problem has been identified as noise, creating additional steps and also the clonky motornoise.
    Swapped printerport cable and a few other minor changes make that it's almost gone.
    I forgot the 10K-100p filter on the step/dir lines, will try this also.

    Thanks for confirming that he problem was in my setup.



  2. #42
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    Excellent. Troubleshooting is often easier when there are other implementations to compare with.

    I am curious how much resonance there is at the low speeds. (ie: below the midband resonance point). My motor has a severe resonance point at between 68 to 85 rpm. The distortion adjustment POT changes the rpm where it occur but does not eliminate it. I'm not sure if it is caused by the drive or the motor.

    Do you see the same behavior with your motors? If so, I would appreciate it if you check if the Geckodrive does the same thing. If it does, then I would suspect that the cause is motor nonlinearity or cogging.



  3. #43
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    The 10K-100p filter on the step/dir lines seems to have solved the remaining problems. No more steps are added or lost.
    Looks like the interface on the printer port might pick-up some noise wich is now removed at the CPLD, it's better to solve the problem at the source, so I will add a similar filter on the step/dir lines in the opto-schematic I posted before. There was a similar type of filter in printers, saw this long ago when schematics were still available and there were still values printed on through-hole cap's unlike the SMD stuff nowadays.........

    Yes I still have resonance noise at several speeds, but it's very different depending on the type of motor. So I compared the worst motor I have with the CPLD and the Gecko.
    On the CPLD there's vibration noise in all low speed regions plus the resonance noises, on the Gecko it just sings away from low to high speed, nothing abnormal can be heard.
    It's obvious that a Gecko drive compensates for the problems caused by the motor and a "normal" drive. I'm sure it would do it also on your motor.

    I will try to compensate for resonance compensation, don't know if it will work but would already be very happy if I could do just a bit of it.



  4. #44
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    I'm glad you were able to fix the problem. I am now curious why I as able to induce missed steps on my board with the opto coupler. In theory, a sharp rise time should not really be necessary since the cpld has Schmitt trigger inputs.

    As for resonance, my understanding is that it should not occur at low speeds if the sine wave was undistorted. However, because the steps are still discrete, that might not be possible in real life.

    Based on Mariss's hints, I guessing that one possibility is to use a differentiator to detect resonance, so that step timing can be altered to provide damping. I will experiment with it after I test Microchip's DSP design.



  5. #45
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    The reason for your missed steps could be that your opto design wasn't optimal, I had similar problems where the optocoupler added more problems than it was supposed to solve, learned it the hard way.
    The problems with the Ebay TB6560 is another example where a poor design causes problems, one solution is to bypass them.

    I can't work further on this for a few weeks and have to decide what to do next:
    Try resonance compensation (wich will probably take a lot of time) or design a nice smaller layout for a +-40V, 6 Amp drive wich will suit the motors I have, they are low inductance and thus don't need a high supply, 24V looks optimal for most of them.



  6. #46
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    The drive has schmitt trigger inputs. I would expect it to easily handle a slow rise signal, especially considering that there was no direction change. I need to investigate it further.

    By the way, what is your opinion of the tb6560 drives? Did you get yours to work good with the changes? I am considering it for a low performance application.



  7. #47
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    I use my own design since a long time (april 2007), the Ebay ones didn't exist at that time.
    I have a small PCB drilling machine wich has these and works fine, no lost steps with Vexta nema17 motors but they have a original Vexta damper.
    On other machines there are lost steps with nema23 motors and no damper.

    Below is a pic of the prototypes.
    The PCB is double sided and small.
    I want to redesign a nicer PCB with optocouplers, smd current sense resistors and a few other changes. (RC filters added on the list since yesterday...)

    If you want the schematic please send me a PB.

    I think Phil has a version also on his site.

    Attached Images Attached Images


  8. #48
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    The chip looks very simple to use. I will definitely look at it after I'm done with my DSP board. I have an old board based on the lmd18245. It works very well and has no hiss, but the chip is so expensive that it's not worth it.



  9. #49
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    LMD18245... Would that be a Picstep?
    I have these also, indeed far too expensive and they get very, very hot.

    Update on the CPLD:
    I worked on implementing digital morphing: changing from microstep to full step by gradually eliminating the lower value microsteps. Didn't want to change microstepping to abrubtly so I tried to change it in 9 steps.
    Kinda works but there's a "wincky" noise at every change, almost probably caused by jitter on the step pulse rate, same problem I had when I tried to implement it on my AVR drive.
    Next attempt will be analog morphing if I find the time.

    I also noticed that the 10µstep implementation with 8 bit resolution causes problems at higher speeds: a 8 bit PWM cycle takes 50µsec (20KHz), the step rate is also 50µsec when the motor spins at 10 rps. The PWM generation is distorted above this speed and the motor stalls.
    So I changed it to a 7bit resolution and it works better, the motor reaches higher speeds but with almost no torque, morphing should solve this.

    Today I also implemented mixed decay: slow decay when the current is rising and fast when the current needs to drop. It works fine and I have the impression that the motor is a bit smoother at low speed and also reaches higher speeds.
    Ideal would be slow decay at very low speed and mixed at higher, something to think about.

    Did you work further on the DSP drive?



  10. #50
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    Yes, the design was similar to picstep, but I used an AVR instead. I damaged one of them because, at that time, I did not realize that the motors should never be disconnected with the power on.

    I never experimented morphing yet. I will try it when I get my DSP board built. I didn't get much time to work on it lately because I wanted to enjoy the nice weather before summer is over.

    Mix mode decay didn't seem to work well when I tried it. The rising and falling sides were slightly offset. I thought the motor did not sound as smooth. I believe Microchip's implementation switched the decay mode as needed. I have the dsp on a breadboard, but I did not get it to run Microchip's code yet. I need to port the code because I'm using a different processor than the one the code was designed for.



  11. #51
    Member KOC62's Avatar
    Join Date
    Mar 2009
    Location
    South Dundas County, Ontario
    Posts
    533
    Downloads
    0
    Uploads
    0

    Default No Load RPM

    Just came across your thread.
    I too was interested in building a stepper driver but was advised not to hand-wire a perf board due to stray capacitance. A good pcb design will keep the stray capacitance more controlled.
    But to get something started I ended up with a Gecko G540. With this driver I can get my Keling stepper to go over 4500 RPM under no load. I used a simple design to generate a 2us variable pulse repetition generator to drive the step pulse input of the G540.

    What no load-RPM can you get with your designs?



  12. #52
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    This drive will need a proper mechanical damper to achieve high speeds. Using a crude one, the highest speed I got was about 1800rpm using a 2mH stepper and 34v. I don't think the trial version of Mach can go higher with 10 micro-steps.

    The G540 has an electronic damper.



  13. #53
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default FPGA system

    For anyone working with CPLD/FPGAs on motion controller stuff, I had an idea. I just purchased a Papilio board from cutedigi (about $50)

    My thought is to combine several ideas into a complete system.

    Papilio
    The Papilio has a built in dual USB JTAG programmer and serial bridge. No extra cost for tools/programmer.
    Plenty of space 250K or 500k gates (2 versions)
    The Papilio site has a modified open core for a AVR
    Very nice set of utilities for configurations and merging bitstreams
    All open source licenses

    Grbl
    On github - look for Grbl
    A Gcode interpreter being developed for the Aurdino (Atmel AVR platform)
    I've simulated this using an ATMega32
    Also open source

    Translator
    An HDL behavorial port of Kreutz's code from ATtiny2312


    Result
    FPGA runs the open AVR code for Grbl. Also contains translator logic for 3 axes. (current Grbl limit)

    Final driver stage (PWM filter, comparators and transistor/IC output) be left to builder based on power requirements

    I was envisioning more or less what Kreutz had already done with the CPLD version of his driver, only integrate all the CPLDs and the gcode controller in the FPGA

    The only part missing from a professional DIY system is mid-band resonance compensation. As others have previously noted there are several expired patents of this issue

    Just my 0.02



  14. #54
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    Interesting idea. I will take a look at it.

    I've built another board based on the Microchip DSP app note. It differs from most designs in that current is controlled using a PI feedback loop rather than a cycle by cycle controller. The net effect is that it produces the phase advance that helps the motor get pass the midband resonance point. It appears to work quite well. It can reached higher speeds my cpld board. However, when the motors are mounted on my mill, the mechanism appears to produced enough damping on it's own, such that I'm not sure I can see any difference in performance between the two boards.

    PI control is interesting. The loop adjust the pwm duty in response to the difference between the command and measured currents. I wonder what would happen if I add an encoder and use position instead of current error in the servo loop. Would it behave like a servo motor, or would it go unstable?



  15. #55
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    Nice work on the projects you posted in this thread!

    I DL'd that AppNote after I saw it referenced in this forum. Very interesting indeed. The anti-windup was particularly fascinating to provide the phase adjustment, that never would have occurred to me.

    I built a PID based servo controller a few years ago using the motor/encoder assemblies from some old plotters. (To ironically build a plotter; albeit vertical ala V P · S Q U A R E D - at Paul's Page of Pain) The PID was very tricky to get tuned once I had some code working. (I didn't have any reference code so it was all trial and error, mostly error) It was also ATMega32 based. The project worked, but never to my full satisfaction.

    Closed loop stepper will work, but I'm not sure how to integrate it to the app note code. I used US Digital LS7084's for my encoder inputs with an interrupt to count position, an input pin for direction and drove the motors with PWM via LMD18200s. It was straightforward to compare commanded pulses vs received pulses. (kind of like treating it as as stepper, I think the encoders were 500/rev, so that was my resolution)

    I enjoy doing this stuff for the knowledge and the tinkering aspect. This is a great place to learn and share this.

    I'm just getting started with Verilog, but come from a C programming background.



  16. #56
    Gold Member
    Join Date
    Jan 2005
    Location
    Toronto, Canada
    Posts
    1695
    Downloads
    0
    Uploads
    0

    Default

    Years ago, I also played with a servo controller using a cheap motor. It worked OK but lacked positional rigidity because motor was non-linear and suffered severely from cogging. I did not do more with it because real servo motors were expensive compared to steppers.

    As for the app note, the PI control loop error is the difference between the measured and sine look up value. The servo acts to minimize this error. Adding an encoder would allow the position error to determined. This value can theoretically be substituted in place of the current error to implement servo positional control.



  17. #57
    Gold Member
    Join Date
    Mar 2003
    Location
    United States
    Posts
    2839
    Downloads
    0
    Uploads
    0

    Default

    My 2 cents on the subject:

    Your 20kHz, 10kHz problem is caused by an over-constrained current feedback loop. It evidences itself anytime the current decay slope is steeper than the attack slope.

    An over-constrained condition exists when a pulse-by-pulse current regulator is constrained by a constant switching cycle period.

    The cure is to use feed-forward compensation. This means adding a positive slope waveform to the signal coming from the current sense resistors. This slope compensation is generated by the "DUMP" output from the CPLD. Every 50uS this output 'dumps' a 10nF cap fed by a 20K resistor going to 12V to generate a 20kHz ramp.

    This ramp signal is attenuated to the proper level via the 100pF / 1MEG series RC and is summed with the current sense signal at each comparator's inverting input.

    Please see the attached .gif file; I drew this up in ACAD a few minutes ago. It is a fun way to graphically illustrate over-constrained feedback instability that anyone can replicate if they have a CAD program.

    The first graph uses a decay slope (blue) steeper than the attack slope (red), always the case in any switching current regulator. The horizontal line (black) depicts the reference current and the vertical lines denote the 50uS time-ticks. The resulting current immediately degenerates into an unstable quasi-10kHz waveform.

    The 2nd graph has the decay slope shallower than the attack slope. Note how the current quickly (in a few cycles) converges on a stable 20kHz waveform.

    Hope this explanation helps in understanding why you have the waveform you see and what is the remedy for it.

    Mariss

    Attached Images Attached Images


  18. #58
    Gold Member
    Join Date
    Mar 2003
    Location
    United States
    Posts
    2839
    Downloads
    0
    Uploads
    0

    Default

    Part II,

    Low-speed resonance is a function of motor non-linearity. In other words the motor being used doesn't have a linear relationship between its electrical angle and mechanical angle so its microstep locations aren't evenly spaced.

    Please see the attached jpeg. This graph shows a particularly bad high holding torque NEMA-23 motor's electrical to mechanical non linearity. High holding torque motor optimization comes at the expense of motor linearity; High linearity motor optimization comes at the expense of holding torque.

    What if you want both? It is a reasonable request.

    Studying the curve suggests adding a variable amount of 3rd harmonic distortion to the sine and cosine reference currents to compensate for the motor's electrical to mechanical non-linearity. The equation should look like this:

    sin (theta) - k * sin (3 * theta)
    cos (theta) - k * cos (3 * theta)

    Where 'theta' is your microstep electrical angle (4.5, 13.5, 22.5, etc. degrees for 10 microsteps) and 'k' is the amplitude of the 3rd harmonic content (0 to 0.075 is a good range).

    We are doing exactly that in our next generation drives. A CPLD is uneconomic for all the other stuff we have to have in it so we have switched to using FPGAs instead. The FPGA has a user ROM which we program with 16 sine / cosine look-up tables with differing values of 'k' in ascending order (0.000, 0.005, 0.010, ... 0.070 and 0.075). A 4-bit ADC converts a trimpot entry into a 4-bit address offset to the FPGA ROM which allows the user to intuitively select the optimal compensation profile.

    After some quality time with your calculator, you can turn the results into a new look-up table for your CPLD. Start with k = 0.04 as a good first guess.

    You can generate a very accurate electrical to mechanical curve of your particular motor:
    1) Superglue a mirror (0.5" by 0.5") to the side of the test motor shaft.
    2) Set the motor with the shaft end up and tape it to the bench-top.
    3) Sandbag a laser pointer with its beam hitting the mirror projecting its beam at a 90 degree angle onto a wall at least 10' away.
    4) Circle the projected beam on the wall with a pencil.
    5) Step the motor a single microstep.
    6) Repeat steps 4 and 5 until you have microstepped the motor one full step.

    The distance from your first to last pencil marks equals one full step (1.8 degrees). Measure each microstep distance from the first pencil mark until you have all 10 measurements. Divide each measurement by the full step distance and multiply each result by 1.8 degrees. Now you can graph each microstep angle against its corresponding electrical angle. This gives you your motor and drive linearity curve (we use a 20,000-line Canon laser encoder but it's not as much fun).

    Mariss

    Attached Images Attached Images


  19. #59
    Member
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    364
    Downloads
    0
    Uploads
    0

    Default

    Mariss, thanks for the info on the DUMP signal.

    I noticed the same problem and now understand it. Assumed it was caused by the fast decay

    There has been some confusion about the DUMP function in the CPLD tutorial thread, active or not during standby:

    http://www.cnczone.com/forums/663370-post189.html

    This would mean that Phil's "corrected" code is wrong for the DUMP signal.



  20. #60
    Gold Member
    Join Date
    Mar 2003
    Location
    United States
    Posts
    2839
    Downloads
    0
    Uploads
    0

    Default

    Part III,

    Step servo. An eye-opening idea is there is no fundamental difference between a brushless DC motor (BLDC) and a step motor. Both are AC permanent magnet synchronous motors (PMSM).

    A BLDC motor has 3-phase excitation and a low pole-count (6-pole typically) while a step motor uses 2-phase excitation and has a high pole-count (50 or 100 poles). There is a lot of literature on field oriented control (FOC) using Clarke-Park transforms for BLDC motor control. The Clarke transform converts a 3-axis coordinate vector into a 2-axis quadrature format. The Park transform converts the rotating 2-axis vector into a stationary vector (d,q vector components). The d component is the flux vector and the q component is the torque vector. The d component is summed with a field-weakening command and PI filtered, the q component is summed with a torque command and also PI filtered.

    PID magic is applied to the stationary vector and afterward the inverse Park and Clarke transforms restore the vector to its 3-axis rotating form (Va, Vb and Vc).

    A step motor's rotational vector is already in a 2-axis quadrature format so the Clarke transform and its inverse can be neglected.

    The rub is the high pole-count (over 8 to 16 times more than BLDC). A DSP processor samples and processes the vectors every 50uS (20kHz). A step motor scales to 320 kHz sampling rate (3uS) and this is beyond an MCU's ability which is why there aren't inexpensive step motor servos around.

    I have taken a different approach by executing the Park / inverse Park transforms using analog circuitry. What previously was an insurmountable obstacle now disappears; I have a working current-mode amplifier, an absolute requirement for closed-loop operation.

    Mariss



Page 3 of 8 FirstFirst 123456 ... 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

6amp 60v 10 microstep bipolar drive

6amp 60v 10 microstep bipolar drive