Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Need help with first Arduino focuser project


Pat Warborg

Recommended Posts

Hi,

I'm trying to build my own version of the SGL focuser. I got an arduino nano, an easy driver and a 28BYJ-48 stepper motor. For other newbies, first a brief summary of initial hurdles taken already:

1. I did find out that the latest arduino IDE produces errors, when trying to compile the original sketch from Neil Chase (25-04-2014). I needed to uninstall the latest arduino and installed Arduino 1.0.6. With that it compiled.

2. Next, I found out that the cheap arduino nanos from big A are not supported by existing MS Win drivers (on my Win7 laptop) . So I had to download and install the required driver for the CH340/341 chips.

After that I was able to compile and upload. Now here comes where I need help: I can connect to my "focuser" with the SGL standalone focuser app. But the motor does not move at all. I just connected the two pairs of wires which come from the two coils as A (pink and orange) and B (yellow and blue) on the easy driver board (leaving the red middle one unconnected). This does not work. Apparently many people are using the heavy Nema stepper motors. Since many projects seem to work well with the 28BYJ-48 (and it's got an integrated gear box!), I decided to go for that one. I seem to remember that I read somewhere that these can be used for the SGL focuser as well, but can't for the life of me find back that quote and - even more important - any instructions to do so.

Can anybody give me a hand here, please? It's so frustrating to spend whole nights with trouble shooting rather than with actually building the project... 😐

Would be so great if anybody who (recently) succeeded in building the SGL focuser with a 28BYJ-48 could share their insights.

Thanks and best regards,

Pat

Link to comment
Share on other sites

 

Pat I think you need all 5 wires connected on motor, Have a look at photo and I have also attached Zip for elegoo stepper driver board with photo's I do not have the easy driver board pinout's you could do a google search for robert brown's my focuser with easy driver as he did one with this motor

https://sourceforge.net/projects/arduinoascomfocuserpro2diy/

Andy

 

 

28byj-48.png.cead23128000e6db93df94d884fa253d.png

Elegoo ULN2003 Stepper Driver Boards.zip

Motor%20Coils.jpg

EasyDriverV44_Pins.jpg

Edited by fozzybear
addition
  • Thanks 1
Link to comment
Share on other sites

Thanks Andy!

I've been looking into the FocuserPro project before. I found the many options a bit overwhelming, to be honest. The SGL focuser did just seem to do what I want: ASCOM or win app controlled focusing. It seems clear though from all the info you provided, that

i) I cannot run the 28BYJ-48 with the Easy Driver, because I have to explicitly address the 2 coils (4 pins), while the Easy Driver runs with pulses on only a single pin and a second pin defines the direction.

ii) If I want to use the SGL project (with ASCOM Driver and win app) with a 28BYJ-48, I will have to modify the arduino sketch, adding code to convert the single pin out put signals to series of signals to the 4 input pins of the UNL2003 driver board.

If anybody succeeded in doing this before, I would appreciate very much to get that code. If not, I will probably give it a try and report here.

Thanks again,

Pat

Link to comment
Share on other sites

Is there a URL to the project code ?

I use a 4883 driver from polulu which takes step and dirn inputs to drive the same stepper you are using quite happily.. you also have to check whether you want to operate in unopposed or bipolar modes,  the first uses 5(or 6) wires, the seconds uses 4.

M

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, skybadger said:

Is there a URL to the project code ?

I use a 4883 driver from polulu which takes step and dirn inputs to drive the same stepper you are using quite happily.. you also have to check whether you want to operate in unopposed or bipolar modes,  the first uses 5(or 6) wires, the seconds uses 4.

M

Thanks, M!

The URL is https://sourceforge.net/projects/sglfocuser/ . In the mean time, I got this link from Kevin at the SGL Focuser Yahoo-group: https://www.instructables.com/id/Arduino-Stepper-Drivers-Tutorial-22/ .

Seems like this is where I read initially about using the 28BYJ-48 with an Easy Driver... I will need to check some things. Will come back.

Thanks, Pat

Link to comment
Share on other sites

Good news. Got it moving. The issue was (actually still is) that the motor does not move in absolute mode. I can move it in relative mode, but the position in the win app is never updated. Guess I have to figure out what is going on there, next.

Any ideas where to start looking for this are welcome, of course!

Thanks Andy and M, you kept me going!

Pat

  • Like 1
Link to comment
Share on other sites

The Easy Driver can drive a unipolar motor (5 wire) in most cases. Isolate two pairs of the 5 as independent coils (phases) by testing for resistance. Infinite resistance means not a pair, and a few ohms means a pair. The usual common wire is not used. Attach these as pairs to the output locations on the Easy Driver. Full control by a Nano of either a unipolar or bipolar stepper is possible using that Easy Driver (within current requirement limitations).  

  • Thanks 1
Link to comment
Share on other sites

15 hours ago, theropod said:

The Easy Driver can drive a unipolar motor (5 wire) in most cases. Isolate two pairs of the 5 as independent coils (phases) by testing for resistance. Infinite resistance means not a pair, and a few ohms means a pair. The usual common wire is not used. Attach these as pairs to the output locations on the Easy Driver. Full control by a Nano of either a unipolar or bipolar stepper is possible using that Easy Driver (within current requirement limitations).  

Thanks,

I got it moving in the meantime! I also added some code to my astro-app to test it. I'm still stuck there. While I'm sure that most people are fine with the solutions provided by the developers, I'm always just missing something or have issues with parts of the projects. So I started to write my own driver. Let's see how far I can get. Never did that before, but seems like fun.

I will report back, when I have a working version of my "Pats_SGL_Focuser".

Pat

Link to comment
Share on other sites

On 16/07/2019 at 00:39, Pat Warborg said:

Thanks Andy!

I've been looking into the FocuserPro project before. I found the many options a bit overwhelming, to be honest. The SGL focuser did just seem to do what I want: ASCOM or win app controlled focusing. It seems clear though from all the info you provided, that

i) I cannot run the 28BYJ-48 with the Easy Driver, because I have to explicitly address the 2 coils (4 pins), while the Easy Driver runs with pulses on only a single pin and a second pin defines the direction.

ii) If I want to use the SGL project (with ASCOM Driver and win app) with a 28BYJ-48, I will have to modify the arduino sketch, adding code to convert the single pin out put signals to series of signals to the 4 input pins of the UNL2003 driver board.

If anybody succeeded in doing this before, I would appreciate very much to get that code. If not, I will probably give it a try and report here.

Thanks again,

Pat

Just to avoid that people are getting confused when following this thread:

The above conclusion is WRONG. You CAN run the 28BYJ-48 with the EasyDriver. It's indeed just a matter of connecting only the two coils (pink & orange and yellow & blue) as A & B on the EasyDriver board, leaving the common (red) untouched. For just a quick testing (without load on the motor) you can get the 5V for the EasyDriver from the arduino board (wired on a breadboard e.g.).

Another source of confusion for me, was the 'step size' parameter. Note that according to the ASCOM description, this gives the movement of the focuser per step of the motor (in microns). In the focuser apps I saw this parameter used to define how many steps the focuser motor rotates per button push (when in relative mode). So, obviously, when you set the step size to e.g. 0.35 microns (which is about what I calculated for my setup with all the gearing (in the motor + the belt and pulley drive, I use), you will never see any movement of the motor... Particular to the SGL focuser project was that I never was able to move my motor in the absolute mode, while it did move (in the end) in relative mode (with step sizes around a couple of hundreds). And then there were other issues (like arbitrary behavior of the app regarding displaying of com traffic and updating the position, etc.). I'm sure that most of this was due to my ignorance, but in the end, I decided to try to write my own ASCOM driver. I'm on this at the moment...

Will keep you posted.

Pat

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.