Hi folks, I have done some searches and could not find any documentation or sample-code for the very nice looking stepper driver located here: [url]https://bitbucket.org/ghi_elect/gadgeteer/src/86e246d051bf5e78ec1923b173410c5e47591bf8/Modules/GHIElectronics/StepperL6470/StepperL6470_43/StepperL6470_43.cs?at=master&fileviewer=file-view-default[/url]
For basic operations I think I am ok, but I was considering exactly what the driver are capable of.
@ Mr. John Smith - if there is anything more recent with a little more context…
Nothing really just this one
Once you init the driver, you just call Drivers[x].Move. The sophsticated stuff like BEMF compensation and Stall detection require knowledge of your stepper motor Rph, Lph and Ke values. Which typically aren’t on the datasheet.
@ Mr. John Smith - Thanks
Ok now that I’m awake fully. to get those values you have to know what your motor does when it acts like a generator. You need either an oscilloscope or a True RMS multimeter (which I had to get). Drive the motor will a drill, and measure the output voltage and frequency on the meter/scope. I am trying to find the original place where I saw that technique we well as a link to the spreadsheet that has the calculations. It looks like this.
@ Mr. John Smith - Now we are talking, looking forward to hear more. Doesnt these values come with the motor?
@ njbuch - The Ke value does not, it has to be measured. Also, as the motor’s magnets weaken it changes.
So that’s the forum post where I got the spreadsheet; but since it requires authentication. Here is a direct link to mine.
I can’t find it easily. it was important too. I’m gonna have to search and search. Also, did you know that Voltage Mode driving is patented by STMicro? [url]https://www.google.com.ar/patents/US8390235[/url]
I found this document to optimize for a stepper motor useful, AN4144 from st. Also describes how to measure Ke value of your stepper motor.
@ PHITEK - Can you find a version where you don’t need an oscilloscope?
@ Mr. John Smith - Off hand I haven’t seen any document that doesn’t use an oscilloscope, I will keep my eye out for it however.
I am just proto-typing the second stepper motor controller (daisy chain), broken out the SW pin and adding pulse counter, and a SPI 2x20 LCD display to test the SPI bus capabilities. I hope to integrate this into our old instrument for testing in the next week or so.
@ PHITEK - Pulse Counter? Is there an encoder on the stepper?
@ Mr. John Smith - Yes, in the past we used US Digital encoders E5S-400-197 with the stepper motor controller using 1/4 stepping. I also want to use the CUI AMT313Q-V with a higher stepping mode (1/8th or 1/16th). This is necessary to test if we are loosing steps in a known environment, I will check the pulse counters after a move for the expected value, in software, previously we had a FPGA to do this. Once we have that working satisfactory we will try using the L6470 stall detect, to determine if the shaft encoder can be eliminated.
Our motors are Applied Motor Products, HT17-075D with a 2:1 geared down to a cam shaft.
So far I like the acceleration / deceleration rates, they offer very smooth control with the L6470, so visually the motors look good, but clearly could be driven harder. All with very little processing load on the .NETMF processor.
@ PHITEK - It’s funny, I’ve been using 7 of these motors to do drawings with a pen plotter (part of the cartesian robot I’m designing). I was worried about step loss and the like but so far it hasn’t come up. 1/128th microstepping is smooth as butter. I wouldn’t eliminate the encoder though. I would always want some way of verifying the actual position of the effector in a mechatronic system.
@ Mr. John Smith - I also want to push the SPI bus a bit with different devices, may add some digital pots at some point.
@ Mr. John Smith - In our application if we loose steps, we tend to loose quite a few, hence we abort the test. I think we will plan on leaving space for the shaft encoders and logic just encase we want to do a more advanced recovery at some point in the future. So your right, that is good advice to keep the shaft encoders.
Hmm, you scare me (and probably a few others) away from playing with steppers. I think the applications are great for stepper motors, but this seems overcomplicated for most of us.
Would it make sense to request a stepper motor from a supplier that can give these values, and then just configure the driver based on that?
@ njbuch - Sure some applications are very demanding, but the basics are quite do able for most makers. With the L6470 sample code the only comment I have is to start with the chip defaults, and change them as you become more familiar and your needs require. It is very easy to miss configure the L6470.
ST has tools that are GUI based for Windows, but of course you need an SPI adapter, but this looks like a good way to learn the controller. This might be a good codeshare project for this forum.
Many older hobbyist books show how to turn a parallel port into a controller, other controllers require, full/half stepping mode, direction, and step pulse so very easy to interface to.
Power saving modes, shaft encoders, and custom jam detect logic are for the more demanding applications.
@ njbuch - The phase resistance and inductance values are available in the stepper motor data sheet, the Ke is required for more advanced voltage compensation and stall detection.
So not necessarily required in all applications.