Electronics > Projects, Designs, and Technical Stuff

Closed loop stepper control and encoder resolution?

<< < (3/4) > >>

pardo-bsso:

--- Quote from: rwgast_lowlevellogicdesin on April 04, 2019, 07:16:14 pm ---
@pardo-bsso, thank you very much for code sharing, in my original post I had asked about gearing the back shaft down before the encoder no one else has answered that question. Wouldnt gearing the back-shaft cause backlash and periodic error on the encoder wheel and severely hamper accuracy?


--- End quote ---

You're welcome. If the belts are properly tensioned and the mount balanced it will give better results compared to a direct drive. In case I wasn't clear on the other post, what I suggested was using one reduction from the motor to the worm (so for example 10 turns on the motor result in one worm turn) and also another from the worm to the encoder (say, one worm turn ten in the encoder to keep numbers simple). Or just the one from the worm to the encoder.

Also, think about how the difference in position between the axis of rotation of your encoder shaft and the center of the printed pattern affects readings if they are not aligned.

We haven't tried gears bewteen the motors/encoders/worms on this project but some older (and waaaay bigger) telescopes here used a drum with several turns of steel wire and a dead weight on the shaft to provide a more or less constant load on the gear train and reduce backlash.

There are lots of sites showing the insides of Meade telescopes for inspiration.

In any case you'll spend a lot of time tweaking things.

Smokey:
If you are after accuracy, it's not a bad idea to start thinking like an organization that has a healthy respect for accuracy, like NASA for example.  WWND.  If you answered ignoring all commercial products and instead spending a lot of time and energy hand making , debugging, and generally fiddling with something that was a foundation for the performance of the whole system then you would be wrong.  If you answered using a common off the shelf product that has detailed specifications for accuracy, resolution, reliability, and tollerances that you can just use and trust without spending a lot of time fiddling then you would be on the right track. 
Encoders are a solved problem.  If you think the machine heidehein uses to create their encoder wheels only cost 5k, you would also be wrong.
eBay is literally crawling with inexpensive used encoders with crazy resolutions.    This route will save you machine space,  time, money, effort, and make your widget better.   

mrflibble:

--- Quote from: Smokey on April 05, 2019, 04:21:36 am ---If you are after accuracy, it's not a bad idea to start thinking like an organization that has a healthy respect for accuracy, like NASA for example.

--- End quote ---
Or if the objective is to spend lots and lots of time on homebrewing precision positioning gadgets, some casual reading on ASML EUV wafer steppers might be in order.


--- Quote ---eBay is literally crawling with inexpensive used encoders with crazy resolutions. This route will save you machine space,  time, money, effort, and make your widget better.

--- End quote ---
Precisely this. If you want to do this for the fun of it, then have at it! If you're having fun while doing it, mission accomplished, that's what hobbies are for. If however your brain is providing you with bullshit rationalizations such as "I want to create a simple DIY solution anyone can make, using only their local print shop. ^_^", then yeah ... no. If you really believe that, then do the following experiment: go to a DIY astronomy forum and start a poll. Are people interested in making an encoder such as described above. I'm willing to bet the answer "Not only no, but fuck no!" is going to get the most votes. Why? Not because it's an inherently bad idea. But simply because it's frigging 2019. Why would anyone want to faff about with the local print shoppe for something like this? "Nono, not this usb stick, that usb stick. Nono, not this pdf standard 2.0 sub XYZ/, that pdf standard sub 2.1 QED. If you don't use that version the output of your pdf exporter will not result in the toner placement you intend." <Insert multiple trips to print shoppe here>. Now contrast that with: pointey-clickey-ebay, go about your business until part arrives, integrate part into project. Hell, if you find out later that the encoder you got was not precisely what you needed, there will always be that other project where you can use it.

So if you need wafer stepper precision, go aim for it! You won't reach the goal, but your efforts can have a good price/performance ratio. You will learn lots of stuff, and if you post that as a DIY-howto with parts list, it'll even be relevant in 2020! For anything less, maybe the ebay encoder is a better use of limited time...

Regardless of the encoder... As other posters have already suggested, open loop is probably the way to go. You can characterize the positioning error and compensate for it. The simplest way would be to use a deconvolution filter based on the estimated positioning error. Probably iterative, with a sprinkling of wavelets and l1-minimizers. Or if numberical solutions are too boring, and you simply have to have something mechanical in the mix, I'd suggest looking into make a rotational flexure, driven by a piezo stack. That can be made pretty damn stiff, and the loads are fairly predictable. At least, I certainly would hope so, if you value your optics. ;D That flexure would then be placed at the telescope mount, and make minor corrections for any rotation errors caused by the imperfections of the stepper, worm gear, etc. Making such a flexure doesn't have to be super expensive in terms of material. But don't worry! That will be more than compensated for by the time spent in design. ;)

rwgast_lowlevellogicdesin:
Thank you guys for the input, btw i may be hell no against an open loop solution, BUT i have not said I was against a commercial solution as long as it is reasonably priced and sourced. Those requirements kind push cheap second hand e-bay encoders out, which is the same reason im trying to go the print shop route instead of tearing up a few scrap printers for there disks. Also if i was following a project i would much rather go have something printed for 2 bucks than run around sourcing and tearing of scrap. Also I started with hobby robotics about 6 years ago and at that time it feels like everyone was just printing there own encoder disks, i still see diy encoder stuff on letmakerobots... i think alot of people enjoy building what they can when its feasible and economical.

I am really starting to think that getting some of the ATST-500TR encoder chips or breakouts are the best bet though... as far as anything optical when looking on digikey and mouser anything suitable for motor applications with at least 2880cpr or more, that include sensor and wheel starts at $300 dollars! I will also look in to all the algorithms you guys have suggested open loop or not.

Part of my problem right now is the mount I ordered turned out to be back ordered so i am sitting here with my steppers, driver boards, gears/pullyes, belts, etc etc.. and I have no idea of the worm drive reductions. So really im just kind searching around for solutions to things without being able to do exact math because on top of the worm drives im not sure what kind of gearbox/belt drive reductions I plan to use between the motor and worm.

I am not looking for NASA precision here, im just looking for what I would consider the pointing accuracy one should get at a few hundred bucks total. I feel like the robotic mounts or even the goto/tracking kits to add to a mount that companies like meade/orion/celestron sell give pretty poor performance for there price. When using small aperture short refactor telescopes with a 2 to 4 degree FOV of the sky a $1500 celestron mount cant even track accurately enough for long exposure for 10minutes, it basically just uses open loop motor control with some lower res quad encoders to help with go to.

In 2019 we can add a 4 dollar GPS with some ttl chips on it 1pps pin, a decent tcxo, and an rtc chip, for a super accurate sidereal clock. Next is a 10 imu with manometer to find true north with a high degree of accuracy given integration time, and who's angular output can be fused with encoder data. Lastly it looks like 5+ dollars on a magnetic absolute encoder that will give at least 360 in relation with are true north measurement from imu. Lastly a combination of quadrature encoders and gearing on are steppers that will allow us enough resolution to track 3600 tiks accurately. This way when we put the encoders on the motors together with the abs encoder on the mounts RA access we can then say o well the RA shaft says we are at 15 degrees and the ra motor has counted 1200 tiks so that means we are at 15 deg 20 mins. This can then easily be shared with a planatarium program also for are go to. Using the exact sidereal time along with information from the ABS encoder and the quadrature encoders along with long integration IMU time I would think we should be able to adjust out all the periodic error from the mechanics. So why do mounts that cost 1500 dollars still use open loop control with maybe a gps for location only? Using a guide cam for doing exposure under 10 minute in still weather without earthquakes seems like a copout

Someone:

--- Quote from: rwgast_lowlevellogicdesin on April 05, 2019, 06:36:56 pm ---So why do mounts that cost 1500 dollars still use open loop control with maybe a gps for location only?
--- End quote ---
Because at that price range the best accuracy is achieved with open loop control, instead of spending money on encoders it goes to larger motors and intelligent drive methods. Correcting motion by looking at the target is very much the correct way to do it when following the target is the most important characteristic of the drive, removing all the errors in the rest of the system.

You can go ahead with your plan for encoders on the motors, but its not closed loop. The gearing and mounts add their own errors which are unaccounted for and those may well be far in excess of the error you correct by using an encoder on the stepper motor. These things can be measured and quantified before deciding on the system architecture, because right now you've made many many assumptions which our experience tells us are wrong.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

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