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.

tekkydave

Arduino Ascom focuser Mark2

Recommended Posts

oh wait... i'm using ascom 6.0...

downloading 6.1 now

Share this post


Link to post
Share on other sites

Not sure why the driver is not registered. I'll have to investigate but it may take a while. I'll have to build a clean windows 7 vm to test with.

As you have probably noticed I'm new to developing on windows and also ascom. There may be a way of manually registering the dll.

Share this post


Link to post
Share on other sites

no joy on 6.1 either

well, no rush as i don't have pulleys yet.

Share this post


Link to post
Share on other sites

Its something to do with the driver not being registered by the installer. Its difficult to test on the pc you are developing on as Visual Studio auto-registers the driver when you build it.

Share this post


Link to post
Share on other sites

Ahhh microsoft... trying to be smart but ending up being a pain in the butt...

  • Like 1

Share this post


Link to post
Share on other sites

I have a temporary workround to manually register the driver:

You need to open a windows command window as administrator.

The only way I have found to do this is click the Start button then in the 'Search Programs and Files' box type:

cmd

now hit Ctrl-Shift-Enter instead of Enter.

In the command box type:

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319  (the driver needs the .net v4 framework)

regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"  (or wherever the driver was installed. It should be here if you didn't change the location when you installed it)

You should get something like this:

C:\Windows\Microsoft.NET\Framework\v4.0.30319>regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"
Microsoft .NET Framework Assembly Registration Utility version 4.0.30319.17929
for Microsoft .NET Framework version 4.0.30319.17929
Copyright © Microsoft Corporation.  All rights reserved.

Types registered successfully

I'll look into a way of getting the installer to do this step correctly. Let me know how you get on.

Dave

  • Like 1

Share this post


Link to post
Share on other sites

I have a temporary workround to manually register the driver:

You need to open a windows command window as administrator.

The only way I have found to do this is click the Start button then in the 'Search Programs and Files' box type:

cmd

now hit Ctrl-Shift-Enter instead of Enter.

In the command box type:

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319  (the driver needs the .net v4 framework)

regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"  (or wherever the driver was installed. It should be here if you didn't change the location when you installed it)

You should get something like this:

C:\Windows\Microsoft.NET\Framework\v4.0.30319>regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"

Microsoft .NET Framework Assembly Registration Utility version 4.0.30319.17929

for Microsoft .NET Framework version 4.0.30319.17929

Copyright © Microsoft Corporation.  All rights reserved.

Types registered successfully

I'll look into a way of getting the installer to do this step correctly. Let me know how you get on.

Dave

great, i'll try that when i get home...

just messing about with a self tensioning bracket (ok, it's a hinge and a spring :grin: ) to attach the stepper box to my ota. it'll apply enough tension to the belt without going too far. also means i can whip the belt off at any time for manual focusing

just need to hammer the bottom flat plate of the bracket (cough, cough, hinge) into a bit of a curve to sit nicely on the tube.

IMG_20140703_123603_zpsjfna6ebf.jpg

  • Like 1

Share this post


Link to post
Share on other sites

I have a temporary workround to manually register the driver:

You need to open a windows command window as administrator.

The only way I have found to do this is click the Start button then in the 'Search Programs and Files' box type:

cmd

now hit Ctrl-Shift-Enter instead of Enter.

In the command box type:

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319  (the driver needs the .net v4 framework)

regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"  (or wherever the driver was installed. It should be here if you didn't change the location when you installed it)

You should get something like this:

C:\Windows\Microsoft.NET\Framework\v4.0.30319>regasm "C:\Program Files (x86)\AAF2\AAF2\ASCOM.AAF2.Focuser.dll"

Microsoft .NET Framework Assembly Registration Utility version 4.0.30319.17929

for Microsoft .NET Framework version 4.0.30319.17929

Copyright © Microsoft Corporation.  All rights reserved.

Types registered successfully

I'll look into a way of getting the installer to do this step correctly. Let me know how you get on.

Dave

I  have also discovered that if you run the installer as Administrator it registers the driver correctly so it must be a privileges thing.

Share this post


Link to post
Share on other sites

i'm now in all out war with windows xp which is refusing to install usb2.0-serial drivers  :mad:

i really hate microsoft...

Share this post


Link to post
Share on other sites

after much hair pulling and leaping about messing with pids, inf files and beating windows xp with a large 'I HATE YOU' stick, i got it working  :grin:

Edited by Dave_D
  • Like 2

Share this post


Link to post
Share on other sites

I couldn't help so I had to try this arduino focuser aswell and just right now I just got the stepper motor running. Had a few USB issues and bad performance of the motor. It all turned out to be 2 bad solders, that sorted it all now works.

Now I "just" need to make things look nice and keep the electronics from the dangerous outdoors and order some pullies and belt - after I measured things 10 times, I'm a notoriosly bad with measuring and tools.. haha.

Still, a fun project to follow and try out for myself!

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Baffa. The Ascom driver works but I haven't got the installer working 100% yet. See previous post on workround to register the driver manually.

  • Like 1

Share this post


Link to post
Share on other sites

Version 2.1.0 uploaded to Sourceforge site https://sourceforge.net/projects/arduinoascomfocuser/

Main change is to the FocusAAF2 test utility. Buttons now show the number of steps up/down they action and a bit of colour added.

I still can't get it to auto-register the driver COM object. I think I'll create one using the Installer Generator that Ascom provice with the developer tools and ditch the VS setup project. Watch this space.

  • Like 1

Share this post


Link to post
Share on other sites

I've been having some trouble. The Arduino doesn't appear in the Ascom drop-down and I get an error message when trying to register the driver. Screenshot attached. Windows 8.1.

It's probably something stupid I'm doing, if anyone could point me in the right direction it would be appreciated.

post-11453-0-89203300-1404750185_thumb.j

Share this post


Link to post
Share on other sites

Is the dll definitely installed in the directory you have specified and Ascom platform 6.1 installed? Apart from that it may be a Windows 8.1 'thing'. I have only tested on Win 7 32-bit.

Share this post


Link to post
Share on other sites

Is the dll definitely installed in the directory you have specified and Ascom platform 6.1 installed? Apart from that it may be a Windows 8.1 'thing'. I have only tested on Win 7 32-bit.

Yes for both. I see you're 32 bit, could it be a 64 bit thing?

Share this post


Link to post
Share on other sites

Not sure. There is a 64-bit regsrv64 but I think the drivers are always 32-bit. Maybe someone with more Ascom knowledge will step in.

Share this post


Link to post
Share on other sites

Almost there...

IMG_20140708_183444_zpshvkscedb.jpg

and a big thanks to the excellent Mr ChrisLX200 for the timing pulleys, which are a perfect fit  :grin:

  • Like 1

Share this post


Link to post
Share on other sites

I have just released V2.1.1 to the sourceforge site https://sourceforge.net/projects/arduinoascomfocuser/

The Installer and Arduino sketch are in the Files section (https://sourceforge.net/projects/arduinoascomfocuser/files/Mark2/Software/V2.1.1/)

Hopefully this fixes the issue with the Ascom driver not being registered on installation.

As far as I can see the problem was due to the property ComVisible not being set to true in AssemblyInfo.cs

That may mean more to a hardened Ascom developer but changing it worked for me :grin:

It works ok on my Dev box but any feedback will be appreciated.

Share this post


Link to post
Share on other sites

Today I finally got round to attaching the control box to the cork mounting block. This will be a temporary mounting method until I come up with a better mounting method.

Rear view showing mounting holes with M4 screws recessed inside

post-28249-0-62642000-1405189571_thumb.j

Front view. A hole has been made in the side of the case to allow the USB connector to plug into the nano.

post-28249-0-32787200-1405189588_thumb.j

All assembled into case. Its a bit tight. The nano is soldered onto a piece of veroboard to allow easy mounting into the case slots. The battery compartment is a tad tight but it just squeezes in. There is a piece of card to prevent it shorting any of the nano pins. I probably could have done with a slightly larger case but it was hard to find one with the correct dimensions.

post-28249-0-34285800-1405189603_thumb.j

Mounted on scope. The size of the cork block was made just right so the toothed belt has sufficient tension but is not so tight it can't be removed.

post-28249-0-64492400-1405189615_thumb.jpost-28249-0-12021700-1405189629_thumb.j

That more or less completes the hardware side of the project. I still need to do more work on the driver but that's for another day.

Share this post


Link to post
Share on other sites

I have just released V2.1.1 to the sourceforge site https://sourceforge.net/projects/arduinoascomfocuser/

The Installer and Arduino sketch are in the Files section (https://sourceforge.net/projects/arduinoascomfocuser/files/Mark2/Software/V2.1.1/)

Hopefully this fixes the issue with the Ascom driver not being registered on installation.

As far as I can see the problem was due to the property ComVisible not being set to true in AssemblyInfo.cs

That may mean more to a hardened Ascom developer but changing it worked for me :grin:

It works ok on my Dev box but any feedback will be appreciated.

Dave,

Just to let you know your update to the installer appears to have fixed my Windows 8.1 driver registration. I still had to do the registration manually but all is up and running.

I just need to pull my finger out and fit it to the telescope now, no time today unfortunately.

Many thanks, Matt.

Share this post


Link to post
Share on other sites

Dave,

Just to let you know your update to the installer appears to have fixed my Windows 8.1 driver registration. I still had to do the registration manually but all is up and running.

I just need to pull my finger out and fit it to the telescope now, no time today unfortunately.

Many thanks, Matt.

Thanks Matt that's some improvement anyway. Could still be a Windows 8 thing in your case. Ideally I need someone with Win7 32-bit, and someone with Win7 64-bit to give it a test.

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.