Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_beauty_night_skies.thumb.jpg.2711ade15e31d01524e7dc52d15c4217.jpg

tekkydave

Arduino Ascom focuser Mark2

Recommended Posts

On 5/12/2017 at 08:52, petequin said:

Ah, it's the way of the world.

3D printers? Cool! Sadly, my lovely wife has made it plain that a 3D printer would be a gadget too far. Sigh...

Pete

 

On 5/12/2017 at 11:35, Gina said:

There are dozens of things you can make for the house with a 3D printer - I even have a pretty blue 3D printed toilet roll holder to match the bathroom colour scheme :D

Completely off topic, I know, sorry... but I couldn't resist after reading Pete's post...
Pete, show your wife this jewelry box ..... If she likes it I'll send you the stl files just in case...:grin::grin:

Busy drawing/printing a spare set of (8)wheels/brackets for the lower basket of our dishwasher this very moment. Cost on ebay 15(!)£,  selfmade 1.16£..!! (+ I had the pleasure designing a far better and stronger version of these brackets).

As Gina said dozens of things to be made with a 3D-printer, I lost count how many things(not toys) I made/repaired for the house.

Sorry again for the off topic post...

jew-box2.JPG

jew-box1.JPG

  • Like 1

Share this post


Link to post
Share on other sites

@tekkydave

I've hacked into a Canon EFS lens using this guide... https://pickandplace.wordpress.com/2011/10/05/canon-ef-s-protocol-and-electronic-follow-focus/ 

One of the comments in that blog has arduino code - sure enough I can control the focus and aperture of my 18-55mm kit lens after I got the code compiling.

So my next logical step, would be to modify your code - it looks like if I just un-define the stepper motor pins and then have the function anticlockwise() and clockwise() call focusRing(1) and focusRing(-1) it looks like it will work, maybe ;)

And voila - it does...

 

So now I should be able to try the 18-55 kit lens on ZWO camera and actually be able to get it in focus!!

It should now obviously work with any Canon EFS lens as the protocols are all the same.

  • Like 2

Share this post


Link to post
Share on other sites

It should work but you will need to rewrite the clockwise() and anticlockwise() functions to suit the stepper controller. Good luck.

Share this post


Link to post
Share on other sites

Hmmm.... not being a programmer that might be a challenge but will see what I can do!

Share this post


Link to post
Share on other sites

Hi there. Wonder if I can pick peoples brains here..... My friend built an AAF2 focuser for me some time ago and it worked well for a good amount of time. Now it seems that after a short time SGPRO is losing the connection. 1st thing to go is the temp readout, then the motor refuses to turn and focus my scope...... Like tonight this is what has happened. If I bring my scope indoors to test it tomorrow, I KNOW it will work ok for a short time then start doing the same again.....

Share this post


Link to post
Share on other sites

check the cables\connectors\power, all issues usually boil down to one of those. 

Share this post


Link to post
Share on other sites

I would think that sourceforge would have multiple data center,  dually powered rack with different power rail, and announce their IP space through different tier 1 ISP via BGP .. with all the adds and other crap they are putting on their page these days ..

Rodolphe

 

Edited by rpineau

Share this post


Link to post
Share on other sites

Hey I've been following this project for a while now and think it's really cool. After not having a lot of success with the 28byj-48 stepper motor (too weak) I switched my setup to use a nema 17 stepper motor. Because of the larger motor I now needed to use a different solution to drive the larger motor, I found the easy driver board to be a great solution!

As a result the code isn't compatible with the different board, unlike the 28byj-48 stepper motor which uses a uln2003 to drive the motor you don't have to manually switch between each set of coils to get the thing to turn. The really great thing about the easy driver is you just tell it when to make a step, which direction you want to step in and the resolution of the step. So as we speak I'm in the process of creating a 'B' variant of the 2.5.0 arduino sketch designed to work with drivers that simply take step commands. This will help people out there who are struggling with the arduino stuff who have used something other than the uln2003 to drive their motor. I'll share it when I'm done so people can at least get the sketch from here or tekkydave can add it to the sourceforge if he's still hanging around :p

Happy imaging and cheers from down under,
~Jameson

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, OuterObsession said:

Hey I've been following this project for a while now and think it's really cool. After not having a lot of success with the 28byj-48 stepper motor (too weak) I switched my setup to use a nema 17 stepper motor. Because of the larger motor I now needed to use a different solution to drive the larger motor, I found the easy driver board to be a great solution!

As a result the code isn't compatible with the different board, unlike the 28byj-48 stepper motor which uses a uln2003 to drive the motor you don't have to manually switch between each set of coils to get the thing to turn. The really great thing about the easy driver is you just tell it when to make a step, which direction you want to step in and the resolution of the step. So as we speak I'm in the process of creating a 'B' variant of the 2.5.0 arduino sketch designed to work with drivers that simply take step commands. This will help people out there who are struggling with the arduino stuff who have used something other than the uln2003 to drive their motor. I'll share it when I'm done so people can at least get the sketch from here or tekkydave can add it to the sourceforge if he's still hanging around :p

Happy imaging and cheers from down under,
~Jameson

Look forward to seeing this and probably will have a look at the Nema17's too!

Worth saying I struggled with 28byj-48 steppers, which was not quite enough to move the OC2 focuser, FW, Barlow and Cam on my OO newt (via 10-30 MX belt reduction).    However, earlier in the thread someone pointed to a 12v version of this motor which has worked brilliantly (even working supporting my DSLR and coma corrector).    Though, if you are directly connecting to the focuser shaft a more powerful stepper like the NEMA17's  is needed.

  • Like 1

Share this post


Link to post
Share on other sites

If you are looking at motor permutations relative to what you require then look on R Brown's site for his in-depth information on motors and drivers etc.. I'm not saying you should commit to his DIY project, as this is tehhydave's thread. Just the info behind it.

https://sourceforge.net/projects/arduinofocuscontrollerpro/

Steve

  • Like 1

Share this post


Link to post
Share on other sites

Yes I've already got everything figured out, just need to clean up the code. The nema17 gets very hot even being driven at low currents, I'm going to stick a heat sink on it which should fix everything up. Apparently stepper motors just run hot sometimes when they get pushed hard.

Atm the pressure plate for my crayford focuser just has a 3D printed replacement in there that lets me use the nema17 with a 4-6mm shaft adaptor. It pulls alright straight vertical with canon 70D on the back which is more weight than most setups. Unfortunately the plastic part has already cracked but the end plan was to get it cnc'd in billet aluminum if it looked all good anyway (which it does)

I've looked at R Brown's stuff overkill for me atm but maybe in the future. Also the easy driver is much more simple to run from the arduino then other stepper drivers, it also can do 1/8th steps by using some trickery but at the cost of less torque etc... I need to play around with the different precision settings more see what works best for focusing, might set it up so it does low precision when it has to move a longer distance. You can read more about the easy driver here: http://www.schmalzhaus.com/EasyDriver/

Also I ran my 28byj-48 stepper at 12v but it didn't really help, one thing that made stuff worse was the fact that I wasn't directly driving the stepper shaft like I am now.


d780bb4d-f50b-4190-a5ac-24092ec60fc7.thumb.jpg.df686642bdb16546d8fcb3d8e85f5d8d.jpgacd73e3e-00aa-44aa-b3bd-cbeb0301b138.thumb.jpg.603a92aec400c472cdf982ffde2b16f3.jpga7638f96-b461-415f-866d-e9279862cf1c.thumb.jpg.4273d8681e3bfb0b5ed5da6b29c70bed.jpg 

  • Like 1

Share this post


Link to post
Share on other sites

Ok here's the modified sketch for people using the Easy Driver board. Keep in mind this only works with the Easy Driver and not 28byj-48 steppers. You can find more information about the Easy Driver here: http://www.schmalzhaus.com/EasyDriver/ and they can be bought at Sparkfun.

The sketch performances identically to tekkydaves original sketch with the exception of two things:

1. The sketch allows you to set the precision at which the easy driver should run at, 1/8th (highest precision) gave me the best results but was the slowest. (lines 95 - 119)

2. The sketch disables the FETs to conserve power when not adjusting the focus. When the FETs are disabled the stepper motor has no holding power, with them enabled it has holding power but will use full current. The EN variable toggles FETs ON/OFF (HIGH = OFF)

Let me know if anyone has problems I'll try to keep an eye on this thread - at least for a little while.

Cheers from down under,
Jameson

AAF2_EasyDriver.ino

  • Like 1

Share this post


Link to post
Share on other sites

Yes I've already got everything figured out, just need to clean up the code. The nema17 gets very hot even being driven at low currents, I'm going to stick a heat sink on it which should fix everything up. Apparently stepper motors just run hot sometimes when they get pushed hard.
 

You're Stepper motor shouldn't getting hot. This looks like it's energised constantly and will not last long in this condition.

Steve

  • Like 1

Share this post


Link to post
Share on other sites

Yes that's one of the things I changed in the final sketch. My solution was to toggle the EN pin after it's done moving positions to switch the FETs off. On top of that I added some additional heat dissipation so even with it on for extended periods it doesn't get too hot. The Easy Driver board still heats up moderately but that's normal operation and the chip will shut down if it exceeds 103c.

Share this post


Link to post
Share on other sites

Also the 3D printed plastic ended up cracking in the middle of where the 4 screws hold it, I had to cut a small strap of aluminum to reinforce it.

I plan on getting a future version cnc'd out of billet aluminum and anodized in black. The nice thing about my design is it works on basically all the Skywatcher, Vixen, Orion telescopes fitted with a Crayford focuser.

Share this post


Link to post
Share on other sites

I was in the process of building an Easy Driver based version of this when Jameson kindly supplied the modified sketch above to support it, thus saving me a fair bit of time.  I've taken things a bit further and so find attached below a new version (2.5.0C) which is compatible with the current ASCOM driver. The changes I have made are as follows:

1. I have re-unified the standard (unipolar driver board, sketch V2.5.0) and Easy Driver (bipolar driver board, sketch V2.5.0B) variants in to a single sketch to make future additions and updates easier rather than having to maintain two forks.

- To select which board, just uncomment #define EASYDRIVER at the top of the config section to use the Easy Driver board, or leave it commented out (default) to use the normal unipolar functionality.

- You'll then need to define the pins for whichever board you are using in the section immediately below.

2. I have refactored the code to achieve the following:

- Separated mandatory and optional user-configurable settings in to two sections.

- Moved everything which is not actually a user configurable setting out of the configuration section to avoid mistakes.

- Added a bunch more #ifdef clauses to eliminate redundant code (mostly to choose between driver boards, but also to get rid of temperature sensor library and code if definitely not using one). This helps to keep memory usage down on small devices (e.g. Pro Micro) so that extra functionality could be added later (e.g. OLED display, control buttons, etc.)

3. Added a couple more configuration options:

- #define DALLAS_TEMP which enables the temperature sensor functionality (on by default). As before this will check if there is a sensor or not so can be left on safely, but if you now comment out this line then the Dallas and OneWire libraries are no longer required and the checking code is excluded to reduce memory consumption.

- #define FORCE_SERIALEVENT which forces checking of the USB serial input (off by default). On my pro micro clone board, serialEvent() is never called, as for some reason serialEventRun() is not defined by the Arduino IDE (this seems to be an issue for certain board variants that others have reported). serialEventRun() is called automatically every loop and calls serialEvent() if there is data to process, but it can't be called if it isn't defined! If you get time-out errors trying to connect to the focuser through FocusAAF2 or another application using the ASCOM driver, you may need to try uncomment this line to fix the issue.

There are other reasons why you may not be able to communicate, but you can attempt diagnose it by connecting to the board using the Arduino IDE serial monitor (9600 baud, no line endings). Try sending a # or V# command through the serial input. If there is no response then you've likely got this issue. (Much head scratching and tactical use of LED blinking to figure out what was broken!!)

IMPORTANT NOTES: I have tested the sketch with an Easy Driver, but I have not been able to test the temperature sensor, Bluetooth or unipolar driver functionality as I have none of these available to me. Hopefully I have re-incorporated everything correctly - sketch certainly compiles with these options on. Please feed back any issues after verifying your hardware works with either the 2.5.0 or 2.5.0B sketches as appropriate.

AAF2_Combined.ino

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.