Second time I write this. When I first pressed "Post New Topic" I got an "Sorry, you have been blocked. You are unable to access cloudynights.com" error, and lost all my work. Great.
Trying again.
I've been looking for a simple way to autofocus my lenses for astrophotography, and had issues with the solutions available to me:
- commercial solutions are overkill: they provide robust, overkill motors with lots of torque, and require 12V to run - this is necessary for heavy imaging trains. I'm tired of 12V, since I'm looking for a very portable setup that runs as much as possible on 5V, out of my computer USB port. And lenses focusing rings don't require much torque at all to rotate, the weight of the imaging train is irrelevant.
- commercial solutions are expensive.
- the Arduino based Arduino Ascom Focuser Pro v2 seemed a nightmare to get to work, with 100 pages of documentation and tons of sensors needed and....
I decided to try it anyway, and plot twist! It's actually easy. I got an Arduino starter set for 15 dollars, including Arduino Uno R3 board, ULN2003 control board, and 28BYJ-48 motor, along with some wires. And then I did the hardware setup. It was very easy!
- plug in the motor to the control board
- link the digital pins 4-7 from the Arduino to IN1-4 pins on the control board (just plugging in cables, no soldering!)
- link the Arduino 5V and GND pins to the + and - pins on the control board
- your hardware setup is done!
Then let's get to programming the Arduino board so we can control the motor:
- install the Arduino IDE
- connect the Arduino to the computer via USB
- in the IDE, under tools, select the correct board (Arduino/Genuino Uno) and port (COM4 for me)
- download the programming code from here
- Unzip it on the computer. Copy the contents of myFocuserPro2libraries to your documents\Arduino\libraries folder (for me it's C:\Users\Yannick\Documents\Arduino\libraries)
- next, from the Focuserv264_ULN2003 folder, open the Focuserv264_ULN2003.ino file in the Arduino IDE
- make sure the Arduino board is connected to the computer, and press the Arrow button (Upload) at the top of the Arduino IDE. Wait until it is complete.
- Done! No need to do that again (unless you want to change some parameters in the code later on).
Now we want software to control the motor directly:
- get the control software and install it (either mini or full, either works)
- select the correct COM port (make sure the IDE is not connected at the same time to avoid conflicts) and click connect
- try to move the motor, etc. You can now focus electronically thanks to this!
Next, let's get the ASCOM part done:
- download the ASCOM driver and install it
- open up your capture software (SGP for me)
- connect to the focuser by selecting the right port (make sure neither the IDE nor the Windows control software is connected to it at the same time)
- check you can move the motor, etc.
- Profit!
So with those steps, I have a motor with little but sufficient torque that can turn my focus ring, and requires only 5V from the USB port of the computer, nothing else! I just need a nice, permanent way to mount it!
Hope this can be useful!
Edited by cuivienor, 28 January 2018 - 02:11 AM.