Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Arduino Ascom focuser Mark2


tekkydave

Recommended Posts

Have parts for this project coming, started to install the software side on Win7 32bit netbook, not comfortable with code and cmd commands and spent some time getting the driver dll registered, big stick to windows again and a lot of running around in circles.

Eventually putting this in the cmd command box worked for me, see pictures

C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe "C:\Program Files\AAF2\AAF2\ASCOM.AAF2.Focuser.dll" /codebase

Don't ask why I added the /codebase tag at the end, I spotted it on the net somewhere and it got included by default, doing it again I would leave it off, (not sure what it's doing)

I found I could not run the installer as administrator then found something on the net, modified the registry, created a menu that gave me the option, but still the dll was not registered. (I may have missed something).

So now I have to start fitting parts together, have the nano and managed to add the sketch to it.

Thanks for your work on this, I am finding it an interesting and challenging project, first time with Arduino etc.

post-37988-0-08075400-1405418528_thumb.p

post-37988-0-75780500-1405418543_thumb.p

Link to comment
Share on other sites

Fat on yesterdays success with getting the driver registered I connected the nano up (still to assemble the other parts),  Ran the AAF2test and the FocusAAF2 to see if there were any problems, as you can see from the screen grabs all is good.

Next up a loose connection of motor/battery/switch, be nice to see the motor turn (can you see it turn?) then figure out the mounting.

post-37988-0-30337900-1405438865_thumb.p

post-37988-0-53266200-1405438880_thumb.p

Link to comment
Share on other sites

Lashed the bits I have got together and ran the software,  all works, motor turns  :grin:

Just have to find a box to fit it in, 80x60x40 as the parts list looks a bit tight, I have one on order, we shall see.

I think the switch with neon I am using here may have to go.  Mostly I am surprised at how cheap ebay nano's and stepper motors are if you don't mind waiting on delivery.

post-37988-0-09434100-1405523756_thumb.p

Link to comment
Share on other sites

Yes the box I bought is very tight. If you can get one approx. 5-10mm larger all round  you will have an easier time getting it all in :grin:

It's very satisfying seeing something you designed and created being used by someone else - thanks.

Edit: I'm not sure the cocktail stick is in my original design :grin:

Edited by tekkydave
  • Like 1
Link to comment
Share on other sites

Another one here! Many thanks Dave!

The focuser can also be controlled through the APT interface so it should be compatible with the upcoming automatic focus in APT 2.60

post-11453-0-99849500-1405528480_thumb.j

  • Like 2
Link to comment
Share on other sites

I'll be adding this in due course but I have a number of things to do first. eg. trying to find out why my laptop won't stay connected to the EQ8 for more than a few minutes :eek:

  • Like 1
Link to comment
Share on other sites

Another one here! Many thanks Dave!

The focuser can also be controlled through the APT interface so it should be compatible with the upcoming automatic focus in APT 2.60

attachicon.gifarduino .jpg

Yes, I have tested the focuser with APT and BYEOS and no issues. I need to implement the Ascom 'Halt' method at some point. Edited by tekkydave
  • Like 1
Link to comment
Share on other sites

Yes, I have tested the focuser with APT and BYEOS and no issues. I need to implement the Ascom 'Halt' method at some point.

Am I doing something stupid with APT? Unlike your UI it will not work in a negative position, so it will only move forwards from position 0 and back again.

Link to comment
Share on other sites

Am I doing something stupid with APT? Unlike your UI it will not work in a negative position, so it will only move forwards from position 0 and back again.

I noticed that. It must be a limit in APT. The Ascom driver handles negative positions no problem.

Link to comment
Share on other sites

I noticed that. It must be a limit in APT. The Ascom driver handles negative positions no problem.

Dave,

I asked Ivo about it and he got back with the following if it helps, I've posted a link to your project on the APT forum:

Thanks Matt!

I have checked the ASCOM standard's documentation and it is not designed for negative values. There is MaxPosition but there is no MinPosition because it is expected 0 to be the lower limit.

With two friends are finishing our own device project and have some experience 3.gif In the best case the controller should provide two features - position storage and park/unpark feature... Could you give a link to the project?

The main concern is that APT talks with different devices and any exceptions should be made carefully in order to continue working with the majority...

  • Like 1
Link to comment
Share on other sites

Dave,

I asked Ivo about it and he got back with the following if it helps, I've posted a link to your project on the APT forum:

Thanks Matt!I have checked the ASCOM standard's documentation and it is not designed for negative values. There is MaxPosition but there is no MinPosition because it is expected 0 to be the lower limit.With two friends are finishing our own device project and have some experience 3.gif In the best case the controller should provide two features - position storage and park/unpark feature... Could you give a link to the project?The main concern is that APT talks with different devices and any exceptions should be made carefully in order to continue working with the majority...

Thanks. Bear in mind the FocusAAF2 application provided with my driver is intended for testing not for regular use, although you could use it if you just want a stand-alone utility. I suppose the best way to use it would be to adjust the focus to one end of its travel before connecting. All values would then be positive (if you pick the right end).
Link to comment
Share on other sites

Thanks. Bear in mind the FocusAAF2 application provided with my driver is intended for testing not for regular use, although you could use it if you just want a stand-alone utility. I suppose the best way to use it would be to adjust the focus to one end of its travel before connecting. All values would then be positive (if you pick the right end).

Indeed, It's no biggy.

At the end of a session you'd only need to throw it slightly out of focus in a back position an you're ready to go next time.

Link to comment
Share on other sites

Dave in our project we store the position in the EEPROM storage, which makes the things much easier ;)

Because this memory has limited life, there is a timer that is started when you push the button and after a certain time it checks if you still hold the button, if not it stores the position. With the ASCOM driver it is easier. After the Go To command just write the position :)

One more trick is that after storing a position I read it back to be sure that it is stored correctly and if the memory is corrupted am starting to use a new one :) With 100k average "write" cycles and 2 bytes for position (0-65535) you can store 2.5 million position changes in just 50+2 bytes :D The two bytes are to keep the address where position is stored...

Park/Unpark feature is very handy and even easier to be implemented ;)

Edited by Yoddha
  • Like 1
Link to comment
Share on other sites

Dave in our project we store the position in the EEPROM storage, which makes the things much easier ;)

Because this memory has limited life, there is a timer that is started when you push the button and after a certain time it checks if you still hold the button, if not it stores the position. With the ASCOM driver it is easier. After the Go To command just write the position :)

One more trick is that after storing a position I read it back to be sure that it is stored correctly and if the memory is corrupted am starting to use a new one :) With 100k average "write" cycles and 2 bytes for position (0-65535) you can store 2.5 million position changes in just 50+2 bytes :D The two bytes are to keep the address where position is stored...

Park/Unpark feature is very handy and even easier to be implemented ;)

Very neat. Is your project documented anywhere? My simple test client just uses the ascom move and position calls. Ascom seems happy to handle negative positions so I hadnt really thought about it.
Link to comment
Share on other sites

The prototype was made with Ardoino Mega kit. We had plans to release a How-To-Do-It documentation, to publish the sketch and the ASCOM driver but none of us found the time :( Whoever I'll be happy to share all the information and experience you need ;)

In the ASCOM documentation there is no word about negative position, but in the same time it doesn't provide possibility to define the minimum position. It expects to be 0... From the client applications like APT is expected to provide safety for the hardware and not attempt to move the focuser to extreme positions because this can cause to hardware damage and the only feedback is the value of the position property...

Link to comment
Share on other sites

My application wasn't really intended to be a proper client just a test program to make troubleshooting the Ascom driver & arduino a bit more interactive. That said it was a useful exercise in getting to know how to create a client. I may introduce a minimum position as the negative positions are a bit strange to deal with. The main issue I have outstanding with the driver is getting the .NET setup project to auto-register the dll. Any advice there would be appreciated. It seems to work fine on my dev box but others have reported it doesn't work on their systems and manual registration is needed.

Link to comment
Share on other sites

My application wasn't really intended to be a proper client just a test program to make troubleshooting the Ascom driver & arduino a bit more interactive. That said it was a useful exercise in getting to know how to create a client. I may introduce a minimum position as the negative positions are a bit strange to deal with. The main issue I have outstanding with the driver is getting the .NET setup project to auto-register the dll. Any advice there would be appreciated. It seems to work fine on my dev box but others have reported it doesn't work on their systems and manual registration is needed.

Sorry, I didn't struggle with the driver setup yet :(

Link to comment
Share on other sites

Ok, my focuser is almost completed. It's only fastened with velcro but this works just fine, might keep it as is. Hehe.

Sent from Xperia Z1 using Tapatalk.

Nice one. That's 3 people using the tekkydave AAF Mk2. Any more? :grin:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.