Electronics > Projects, Designs, and Technical Stuff

Closed loop stepper control and encoder resolution?

(1/4) > >>

rwgast_lowlevellogicdesin:
So I am working on a fully robotic telescope/astrophotography system. I ordered a new equatorial mount some nema17 steppers and A4988 driver boards. My plan is to use two .9deg steppers at 1/16th micro stepping with encoders to count steps and provide on the fly correction for missed steps, and lastly to use a DIY absolute encoder along with an MPU attached to the right accession access after the standard worm gear/spur combo found on equatorial mounts in order to correct for any periodic error in the gears and final point accuracy problems with the micro stepping.

So here the first thing I ran in too, I ordered these stepper motors off ebay. I chose them because they have plenty of power, they are 0.9 degree, lastly they have back shaft to mount encoders. The nice perk is the vibration dampening system, which is what is kind of confusing me. The black wheel on the back is a soft rubbery material, looking at the pictures online I assumed it was just a fly wheel for the vibration dampening. The thing is these things have magnetic properties, magnets stick to them and are repelled from them, although they dont attract metal. When I use an analog compass near the wheel the needles south side flips directly tword the wheel and stays that way until the compass is about a half inch from the wheel, using a cell phones manometer I measured the general magnetic field of the stepper around 500uT and the wheel around 2500uT. So im wondering if these are actually magnetic encoder disks? I only have a single one of these hall effect sensors I can find to test the theory, but I found a similar looking "Rotary Damper" at this website. Im just a bit confused as to why these rubber discs would give such crazy magnetic reading if they are not some sort of encoder disc.

Now lastly this is where I think i didn't quite think my plan through all the way when it comes to closed loop steppers, this is my first time using steppers although I have plenty of experience with brushed gear motors and home made encoders for motion control. If I want to 1/16th step these motors I am going to end up with a .0625 degree resolution and 5760 steps per revaluation, if im doing my math right. So in order to make sure i am not missing steps on the fly I am going to need an encoder disc with a minimal of 2,880 read in quadrature counting rising and falling edges to get enough encoder counts for minimal usable resolution which would be 2*5760, or do I only need to have enough ticks to match the steps? I just know with a basic dc motor servo you need double encoder resolution you actually want. At this point ive broke my budget on this project and I only have one encoder wheel around with 2,900 counts, which I ripped out of a printer along with its optical quad head. Im use to just using a program called wheel encoder generator to print my own optical transmissive encoders out, but 2900 ticks is to many to DIY like that unless the encoder has like a 2 foot radius! I cant seem to find any encoders online for under 50 bucks that have more than a few hundred ticks. I was thinking maybe I could use a low res encoder wheel and then add some gearing to the back shaft of the stepper but im also thinking that experiment may be a huge waste of time due to backlash and gear imperfections... idk though thats why im asking here. Or maybe im thinking about this all wrong and i dont need two time the number of steps in 360 degrees in order to correct missed micro steps? The real issue here is I need to get as close as I can to about 5 arc second accuracy per pixel on the DSLR as I can and that is such a mega challenge in and of itself that im afraid any kind of compromising in any part of the motor system will just compound to much error by the time i read the absolute encoder connected after the mechanics.

awallin:
afaik most if not all commercial stepper-solutions for telescope mounts are open loop.
the periodic errors are due to worm-gear errors, not missed steps on the stepper.
why not start first with an open-loop system - there's a lot to do until you have star-trails to analyze on a long-exposure DSLR photo.

the next step up might be a geared servo that drives that same worm-gear. the gearing would reduce the need for a really high-count encoder.

usually the periodic errors are servoed out with a separate guide-scope + webcam that looks at a single star and tries to keep it in one place on the camera by giving extra guide-commands to the mount..

rwgast_lowlevellogicdesin:
The problem is most systems suck and cost way more than there worth. My challenge is to create an easily reproduced system that can do 10 minute exposures without a guide cam. The reason i want to add a 3rd encoder after the gearing where the telescope physically joins the right accession access is to use it along with an IMU in order to eliminate any periodic error, an  automatically calculate polar alignment. The only reason I want to close the loop on the steppers is to make sure they dont miss any steps when micro stepping every step they miss will just end up throwing the absolute encoder off that many arc seconds from where I expect it to be

This is really an exercise in high precision motor control than anything else, there is already all kinds of solutions out there on micro's and sbc's that can take care of the goto, camera control etc etc. The problem i am trying to solve is tracking objects along right accession with as much accuracy as possible without the need for a seperate guide cam and without using exotic expensive parts.

For example an absolute encoder is ridiculously expensive, they actually sell 3 million count abs encoders for telescopes at a whopping 10,000. Instead of doing that why not print out a lower res abs encoder use a few ir sensors to read it and then in code keep track off quad encoder ticks from the motor in arcseconds until you hit the degree on the abs encoder that way you can always read you position with even sub arc second accuracy without the need for some specialized 3000000 million count encoder. I know accurate pointing and dead reckoning arent easy but i feel like most commercial telescope gear solves problems very poorly using standard parts or just throws tons of money at things like synchrounous torque motors and nothing imbetween.

duak:
Many years ago I worked with an electro-optical device that had a linear stage like in the attached image.  It was open-loop with a two phase stepper and a torsional damper on the end.  The stepper was microstepped with a sine/cosine driver with, I think, about 64 microsteps per step.  At that time, the dampers had a silicone fluid but I believe newer ones may be based on ferrofluids ie. https://en.wikipedia.org/wiki/Magnetorheological_damper  These things work under the influence of a magnetic field so the ones you have probably have some sort of magnet inside.  BTW, without the damper, the stepper motor made typical stepper motor noises and could only run at about half speed before stalling.  With the damper, it was dead quiet at any speed.  Makes sense as a stepper motor has terrific cogging, ie., it has preferred positions caused by the interactions of the magnetic field and the stator/rotor design.

One of my colleagues was tasked with improving the fine stepping capability by predistorting the drive waveforms by adding harmonics.  In this case, he burned new EPROMs for the sine/cosine lookup tables.  If memory serves, he used 4th harmonic to reduce the error.

After I retired, I got involved with occasionally repairing CNC machine tools.  All of the ones I worked with have servo motors with integral optical encoders (about 2000 pulses per rev) driving ball screws without any overall position feedback.  All of the machines have correction charts that are used by the control to take out overall ballscrew error.  Some of the CNC machines could have been ordered with optional linear encoders to provide more accurate positioning.  When a ballscrew bearing is on the way out, it usually manifests as a noise, and often affects the positioning accuracy with a period about the size as the ballscrew pitch.  Since the pitch was almost always 10 mm, it was easy for me to plot an error chart by using a dial indicator to measure the position while I stepped the table by fixed amounts.

When working with rotation and angles, measuring the position directly is difficult.  A high res encoder is one way but it's expensive.  However, since this is a camera mount, perhaps you can take images of a scale at various angular positions to determine the error and perhaps compensate for it.  ie., set a graticule line on the zero of the scale and then make small jumps in the same direction and figure out the angle from the displacement observed on the scale.  Surveyors get some pretty decent accuracy by using methods like this.

Cheers,

Someone:

--- Quote from: rwgast_lowlevellogicdesin on April 02, 2019, 10:22:42 pm ---The only reason I want to close the loop on the steppers is to make sure they dont miss any steps when micro stepping every step they miss will just end up throwing the absolute encoder off that many arc seconds from where I expect it to be
--- End quote ---
You don't lose or drop (miss) micro steps, only whole steps. The cheaper solution than precision encoders is usually to add a larger motor so you have enough headroom in the torque to avoid missing steps unless there is something seriously wrong (person leaning on the telescope).

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod