Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Arduino Ascom focuser Mark2


tekkydave

Recommended Posts

1 hour ago, ChrisLX200 said:

I'm sorry Dave - confession time... I'm NOT using your program, I;ve got my sources confused and the one I'm actually using is that of Robert Brown! So I'm posting in the wrong thread myself I guess... ;-(
There are so many different versions/projects  - which is really a good thing, but confusing! I did start out playing with the 28BYJ-48 motor plus NANO, but then looked for a more powerful motor with suitable driver board - that led me to using a NEMA17-PG5 + L293D Shield. Somewhere along this path I obviously swapped projects and authors!

ChrisH

Ha ha. Easily done mate :D

 

Link to comment
Share on other sites

  • 1 month later...
8 hours ago, Shand359 said:

I just received my scope back after a friend assembled one of these focuser motors for me.... Works like a charm and looks a lot neater than I must admit I thought it would........

Can you post a picture. I'm interested in how it is mounted to the scope. Thanks.

Link to comment
Share on other sites

  • 1 month later...
On 17.2.2016 at 14:16, tekkydave said:

Thats a nice print calli. One question - when you tighten the central optical section (cant remember the correct name for it) down on your printed part does the tube section still turn. I tried a similar method to mount my focuser and it wont tighten even if the print is only 2mm thick. The tube section that the diagonal fits in is still loose and flopping about.

Just need to come back to this: YES my visual back was just stuck and came loose in the middle of a iSS solar transit session... I fixed it with two cable tie zips. Just for now. And it stays now that way since... months.... :-)

Carsten

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I decided to have a go at interfacing the focuser using bluetooth. I bought a couple of HC05 modules and set them up as master & slave devices and paired them to each other. When powered on they will now auto-connect to each other.

bt_modules01.jpg

bt_modules02.jpg

Then I breadboarded up the focuser as it exists at the moment and added the HC05s. The master is connected on 2 spare pins and accessed from the sketch using the SoftwareSerial library. The slave is just connected to another COM port via a USB to serial converter.

bt_breadboard01.jpg

bt_breadboard03.jpg

bt_breadboard04.jpg

I modified the sketch to enable it to use the native USB port or the HC05 for its serial connection to Ascom. Tested with my FocusAAF2 utility and it all works beautifully. I now need to decide how to package it all up. I need to make a few further changes to the sketch to make it backward-compatible with the existing focusers then I'll release it on the SF site.

I also want to look at using a USB bluetooth dongle plugged directly into the PC rather than using 2 HC05s but it needs some testing as a virtual COM port will need to be used. I have been playing with a utility called TCP2COM/COM2TCP that creates virtual COM ports and routes them to a TCP connection (e.g. 10.20.30.40 port 8000). I have it working with a WiFi XBEE device Im trying to interface to my mount but bluetooth is a different kettle of fish.

 

 

  • Like 2
Link to comment
Share on other sites

44 minutes ago, Gina said:

Very interesting Dave :)

Thanks Gina. I was prompted to do this by the prospect of all the cables I would have to run from my obsy/shed to the pier. If I can get the Celestron mount Wi-Fi working the only cables I will need is 12V power and USB for the camera (ZWO ASI120MC or Canon 1100D). If I get the Wi-Fi working I'll start a separate topic for it.

  • Like 1
Link to comment
Share on other sites

2 hours ago, tekkydave said:

I also want to look at using a USB bluetooth dongle plugged directly into the PC rather than using 2 HC05s

I only can encourage you to test it. It works like a charm here from Android or PC. And NO silly "change the port chamge the COM" game anymore.

BTW: There is a tool which lets you FIX the COM Port to a specific adapter. Plug in your USB2Ser adapter in any port and it will still get the same COM! Look here: http://www.uwe-sieber.de/comportman.html

Cheers,

Carsten

  • Like 2
Link to comment
Share on other sites

7 minutes ago, calli said:

I only can encourage you to test it. It works like a charm here from Android or PC. And NO silly "change the port chamge the COM" game anymore.

BTW: There is a tool which lets you FIX the COM Port to a specific adapter. Plug in your USB2Ser adapter in any port and it will still get the same COM! Look here: http://www.uwe-sieber.de/comportman.html

Cheers,

Carsten

Thanks, that looks really useful. The com2tcp and tcp2com utilities I used for the wifi project allows you to define a virtual com port of a set number. I was using COM10 just as an arbitrary value. Do you have a BT dongle that presents itself as a COM port? Mine appears in the device manager as a network adapter.

Link to comment
Share on other sites

Just now, tekkydave said:

Do you have a BT dongle that presents itself as a COM port? Mine appears in the device manager as a network adapter.

Yes, it is the build in of my laptop. Yes it works as COM port. I think it is just a matter of the driver (or so). BT can work as network (e.g. for sharing a internet connection from a mobile) or serial. This is just a matter of the choosen profile: https://developer.bluetooth.org/TechnologyOverview/Pages/Profiles.aspx

Maybe you can just add a COM port to your Dongle. My BT is under network adapters (as PAN and RFCOMM) and COM/LPT.

Carsten

 

  • Like 1
Link to comment
Share on other sites

6 minutes ago, calli said:

Yes, it is the build in of my laptop. Yes it works as COM port. I think it is just a matter of the driver (or so). BT can work as network (e.g. for sharing a internet connection from a mobile) or serial. This is just a matter of the choosen profile: https://developer.bluetooth.org/TechnologyOverview/Pages/Profiles.aspx

Maybe you can just add a COM port to your Dongle. My BT is under network adapters (as PAN and RFCOMM) and COM/LPT.

Carsten

 

Thanks, I'll do some testing with that.

Link to comment
Share on other sites

I personally would stay away from WLAN. It may work for your place with Routers etc. But as soon as you need to span a network "in the wild" it gets complicated. BT made for point 2 point connections works much more reliable in such environment.

My 2 cents

Carsten

  • Like 2
Link to comment
Share on other sites

10 hours ago, calli said:

I personally would stay away from WLAN. It may work for your place with Routers etc. But as soon as you need to span a network "in the wild" it gets complicated. BT made for point 2 point connections works much more reliable in such environment.

My 2 cents

Carsten

As someone who has done both Bluetooth and Wifi (ESP8266) implementations for a focuser, I think that I have some experience both theoretical and actual to be able to comment.

Whilst BT may be working at slow speeds or even up to around 57600, the short distances involved with BT are critical, as are bandwidth (other nearby Wifi-BT devices operating nearby). BT is not, by nature, an error free protocol. and error-recovery is limited. BT-4 is not yet widely available which can extend the range to 200m but is expensive and has a much higher overhead. BT is more suited to larger data exchanges rather than the very short messages (packets) that are sent and received by a focuser and its control application (read ascom driver or windows app)

So hows does Wifi using an ESP8266 stack up against BT. Using TCP/IP as the underlying protocol means error free guarenteed transmission. Retries are automatic, all send data is acknowledge or resent. Range is well, limited by Wifi, but by some smart programming and use of something like DuckDNS you can control the focuser from the other side of the world. What about delays. Yes, if local operated, short, if long distance (through a number of routers) they can increase, but no that much that it becomes detrimental. After all focusers do not operate at blistering speeds and the real factor here is what sort of timeout delay is implemented in the focuser software before it times out or thinks the focuser is not connected.

I have tested BOTH BT (since Jul 2015) and Wifi (since Feb 2016) options for focuser projects and think there is a place for both. I prefer to use Wifi now due to its error free guarented delivery and can use much higher serial speeds if required than BT which starts to decay once the speed is increased or the local wireless neighourhood bandwidth is becoming saturated (lI have around 19 local wifis in the neighbouthood as reported by Advanced IP Scanner).

BT can be implemented cheaply if the computer already supports BT. For about $5 and some code time.

Wifi around $10, and use the local network interface of the computer (does not have to be wifi if the focuser wifi controller is programmed to connect to a network at the focuser end). And if done right, another bonus - OTA (over the air) firmware updating....... error-free

 

Cheers

Robert

  • Like 4
Link to comment
Share on other sites

11 hours ago, tekkydave said:

Thanks, I'll look into that. I bought the xbee a while back out of curiosity so decided to do something with it. They are a bit pricey though.

I don't know what an xbee is but the esp8266 modules I looked at were only a couple of pounds plus postage.

  • Like 1
Link to comment
Share on other sites

On 27/06/2016 at 22:44, russellhq said:

Dave, for wireless control, have you looked into the ESP8266 module? It's a dirt cheap serial WiFi module that runs Arduino IDE code.

Here's an example of one being used to control a stepper motor;

http://www.instructables.com/id/Running-a-Stepper-Motor-from-an-Adafruit-HUZZAH-ES/

I've ordered one to have a play with :D

http://www.ebay.co.uk/itm/401020862739

 

  • Like 2
Link to comment
Share on other sites

I dont have a definite plan for the final look of the wireless focuser, just trying different things at the moment. I dont intend to use it away from base and if I use wifi it will have its own dedicated AP to connect to.

 

Link to comment
Share on other sites

The ESP8266 module looks interesting :)  I have a Raspberry Pi 3B I plan to use for WiFi control of my ASC amongst other things perhaps which has built-in WiFi but this module may be better as it covers "n".  I also have a Pi 2B which doesn't have WiFi that I may want to make use of maybe for remoter 3D printer control.

Link to comment
Share on other sites

I have tested the latest version of the AAF2 sketch and it looks ok to me. I have created a new release on the SF site at:

https://sourceforge.net/projects/arduinoascomfocuser/files/Mark2/Software/V2.5.0/

Note that only the Arduino sketch AAF2.ino has changed. Here is the relevant part from the readme.txt:

Changes in Version 2.5.0
This version integrates a HC05 Bluetooth module. This provides remote connection via Bluetooth and therefore the focuser does not need a
permanent USB cable attached. Only the Arduino sketch has been changed.
This sketch is backward compatible with the current Ascom driver and is supplied with the Bluetooth option turned OFF.

To enable it uncomment the line

//#define BLUETOOTH_COMMS                                   // Use Bluetooth Comms - if commented out defaults to USB Serial Port

in the sketch prior to uploading. You will need to connect your HC05 as per the updated diagram, AAF2_V2.5.0_crop.png in the Files area.
If you use different pins on your Arduino then update the following lines in the sketch accordingly:

  #define BTSERIAL_PWR_PIN                2                // Bluetooth serial Power Pin
  #define BTSERIAL_MODE_PIN               3                // Bluetooth serial Mode Pin
  #define BTSERIAL_RX_PIN                 4                // Bluetooth serial RX Pin
  #define BTSERIAL_TX_PIN                 5                // Bluetooth serial TX Pin

The HC05 is configured automatically by the Arduino at start-up. This assumes it is already set to the slave mode which it will be by default.
The default device name and password are set to 'Focuser' and '9999' but can be changed by amending these lines:

 

  const String BT_NAME = "Focuser";                        // Bluetooth Device Name
  const String BT_PWD  = "9999";                           // Bluetooth Device Password (Pairing Code)

 

As ever let me know if you encounter any issues with the new release or connecting up your HC05.

Here is the updated schematic. The 2N3906 is a general purpose PNP transistor and any equivalent device will do.

AAF2_V2.5.0_crop.png

This of course assumes you have a Bluetooth capability in your laptop or PC. If not a USB Bluetooth dongle should work.

 

Edited by tekkydave
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.