Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Finally built my focuser - kind of... lol


Dazzyt66

Recommended Posts

Well, finally I did it. Built my DIY Astroberry Focuser using a Nema17 Stepper with Waveshare controller. 

Obviously this is prototype 1 while I await better brackets etc. But, it works!!! Hoping for a clear night so I can try it with Ekos autofocus!! Oh, and it cost me about £50...

 

 

4E5EB815-407E-4575-A6F3-3A7CA1562234.jpeg

  • Like 2
Link to comment
Share on other sites

48 minutes ago, MHaneferd said:

Thats quite cool and impressive!

And….how many hours did it take from starting the build, trial and error, to end? 😊

Building was easy - a few hours start to finished product. Getting it to work with Ekos drivers probably half a day due to rubbish instructions for the Waveshare board and the stepper motor combined - there was A LOT of trial and error. In the end it worked with the Astroberry Focus Driver - so all in all about a day and a bit to get it fined tuned... and a LOT of swearing lol!

  • Like 1
Link to comment
Share on other sites

Apparently my phone didn't post my earlier comment. What algorithm did you select? Are you using a backlash number, and how did you arrive at it?

Polynomial is certainly quick, but occasionally fails for my rig, so I go with slow-but-sure Linear for unattended work. I put in a backlash number that I measured by successive reversals and observing the motion, but it would probably work fine without it. Certainly Linear is generous in its overshoots every time it has to reverse direction.

Link to comment
Share on other sites

Is than an Arduino board and are you using the INDI Arduino driver?  I have a similar setup that uses the Waveshare Motor HAT for the Raspberry Pi  with the indi_wmh_focuser driver, but I have always wondered how the Arduino driver compared.  I have considered moving the focuser off of the Pi, as it runs =everything= on the scope and occasionally has power issues.  If I ran the Arduino HAT on a separate Arduino board with power supply, that'd remove that load from the Pi.

IMG_20210531_165130262.jpg

  • Like 1
Link to comment
Share on other sites

5 minutes ago, JonCarleton said:

Is that an Arduino board and are you using the INDI Arduino driver?  

 

No, its the Waveshare HAT for the Pi. I run 12v to the HAT though which powers the Pi too. I couldn't get the indi_wmh_driver to work with it though (although thats probably just me and my knowledge of the Pi) - I was beginning to think it wouldn't ever work, but on a whim I updated the Astroberry software and on then tried the Astroberry Focus Driver - apart from me changing the pin numbers on the setup it worked first time. I'm really pleased with it - even using a Bahtinov I couldn't get my stars as pin sharp as they are now! Really pleased!

  • Like 1
Link to comment
Share on other sites

just for your info there is an indi driver for the waveshare hat if you want to have a look at albeit you have yours working with @RadekK astroberry focus driver, If not already seen.

https://indilib.org/forum/focusers-filter-wheels/6038-indi-focuser-driver-for-waveshare-stepper-motor-hat-for-raspberry-pi.html?start=0

Great job done by the way

Andy

  • Thanks 1
Link to comment
Share on other sites

I'm glad the Astroberry Focus Driver works for you, that's interesting.  I use the indi_wmh_focuser with good success on both my scopes.  The trick is to download it from github and compile per the instructions there, but the compile puts it in the wrong place on your machine.  It installs the executable in /usr/local/bin instead of /usr/bin, where the rest of the indi drivers live.  The easy solution is to just put a symbolic link to the compiled program:

sudo ln -s /usr/local/bin/indi_wmh_focuser /usr/bin/indi_wmh_focuser

If that isn't the issue, get back in touch with me and I can help you sort it out.

You can get away with running the Pi from the  WaveShare 12V HAT port =if= it is a Pi3.  It will boot a Pi4, but you'll get perpetual low-voltage alerts and it can fail on occasion.  I run my scopes with Pi4 8G boards, and it just won't work.  The USB ports are underpowered to start with and cameras will fail if I don't provide solid 3 amp power to the main power port.  I seem to remember when I was sorting the power issues out that I had to turn off the HAT "supply power to Pi" switch as well to get things to stabilize.

Edited by JonCarleton
Link to comment
Share on other sites

1 minute ago, fozzybear said:

just for your info there is an indi driver for the waveshare hat if you want to have a look at albeit you have yours working with @RadekK astroberry focus driver, If not already seen.

https://indilib.org/forum/focusers-filter-wheels/6038-indi-focuser-driver-for-waveshare-stepper-motor-hat-for-raspberry-pi.html?start=0

Great job done by the way

Andy

Thanks Andy. This was indeed the driver I started with - I just couldn't get it to work with my stepper. I do think that was probably me though as I learned a lot as I went along. The main thing I couldn't do with it was to see it in the dropdown unless I used the indi web server (which I guess is because the driver is not in the right directory for Ekos to see it). The Astroberry driver however was already there and is working great. I am really pleased with how its turned out and how its working! 😀

  • Like 1
Link to comment
Share on other sites

13 minutes ago, JonCarleton said:

I'm glad the Astroberry Focus Driver works for you, that's interesting.  I use the indi_wmh_focuser with good success on both my scopes.  The trick is to download it from github and compile per the instructions there, but the compile puts it in the wrong place on your machine.  It installs the executable in /usr/local/bin instead of /usr/bin, where the rest of the indi drivers live.  The easy solution is to just put a symbolic link to the compiled program:

sudo ln -s /usr/local/bin/indi_wmh_focuser /usr/bin/indi_wmh_focuser

If that isn't the issue, get back in touch with me and I can help you sort it out.

You can get away with running the Pi from the  WaveShare 12V HAT port =if= it is a Pi3.  It will boot a Pi4, but you'll get perpetual low-voltage alerts and it can fail on occasion.  I run my scopes with Pi4 8G boards, and it just won't work.  The USB ports are underpowered to start with and cameras will fail if I don't provide solid 3 amp power to the main power port.  I seem to remember when I was sorting the power issues out that I had to turn off the HAT "supply power to Pi" switch as well to get things to stabilize.

Hey Jon this is interesting - the install location was indeed wrong which I figured may have been causing me the issues I had - I may revisit it now that I know its all working OK - and I'll try the symbolic link.

I'm using a 4gb Pi4 - I haven't had any power issues yet so I'll keep that in mind. I am only using my Canon 1100D and the mount from the Pi and I dont believe either need much power in that respect? If needed though I assume all I would need to do is turn the Pi power off on the HAT and then just power the pi as usual (as well as the HAT at 12v obvs)?

I know little to nothing about the Pi, although I am pretty computer savvy, so everything is a learning curve for me in that respect.

Cheers

Daz

 

 

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

2 minutes ago, JonCarleton said:

I just looked at my notes from back then.  Another issue with that driver is the need for the stepper delay to be set at least at 50 us.  Any less and it won't turn.  

I definitely going to give it a try again then.

And then I might have to create a 'dummies guide' for others as reading through some of the install/build stuff needed a degree in engineering to understand - and I actually DO have a degree in engineering and still didn't always understand! 😂

  • Haha 2
Link to comment
Share on other sites

7 minutes ago, Dazzyt66 said:

Hey Jon this is interesting - the install location was indeed wrong which I figured may have been causing me the issues I had - I may revisit it now that I know its all working OK - and I'll try the symbolic link.

I'm using a 4gb Pi4 - I haven't had any power issues yet so I'll keep that in mind. I am only using my Canon 1100D and the mount from the Pi and I dont believe either need much power in that respect? If needed though I assume all I would need to do is turn the Pi power off on the HAT and then just power the pi as usual (as well as the HAT at 12v obvs)?

I know little to nothing about the Pi, although I am pretty computer savvy, so everything is a learning curve for me in that respect.

Cheers

Daz

 

 

+1 i'm following you

  • Like 1
Link to comment
Share on other sites

2 minutes ago, Dazzyt66 said:

I definitely going to give it a try again then.

And then I might have to create a 'dummies guide' for others as reading through some of the install/build stuff needed a degree in engineering to understand - and I actually DO have a degree in engineering and still didn't always understand! 😂

join the club

 

  • Haha 1
Link to comment
Share on other sites

@Dazzy:

I live in NW Georgia.  Nights are hot in the summer, and heat kills a Pi4, even with a fan and often is robs power.  Then too, I load mine up with tasks and gadgets, but I had issues even with minor loads with the temp warning coming on after about an hour on both scope setups.  And yes, just turn off the switch on the HAT board and provide 5v @ 3A to the main board.  Two supplies, as you still need 12v to the HAT to power the motor.

Also, and you could check the Astroberry Driver to see if it does this....The original WaveShare HAT driver turned the motor on whether it was in use or not.  It got really hot (not so good).  Later versions turn the motor off on INDI connect and on then off for each move.  That keeps things nice and cool.

Edited by JonCarleton
Link to comment
Share on other sites

There is a thread on INDI Forum where we worked through all this stuff after Kevin wrote the driver.  It is a lot to muddle through, but it contains the details:

https://indilib.org/forum/focusers-filter-wheels/6038-indi-focuser-driver-for-waveshare-stepper-motor-hat-for-raspberry-pi.html#45918

 

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

3 minutes ago, JonCarleton said:

Gad!  Sorry for all the edits.  I apparently have lost any typing skills I once had.

😂 I feel ya! Same here. So, I've just tried the Waveshare driver again and whilst I can now select it from the dropdown I get a 'driver has crashed' error - I'm just rebooting the Pi to see if that fixes it. I did read through A LOT of the thread on the indi forum before I started to lose the will to live! 😂 

Link to comment
Share on other sites

..and another thing (and yes, someone just needs to tell me to hush)..

In EKOS, there is a method for listing "unfound" drivers.  It is a bit "twitchy" but basically works .  It is called "Custom Drivers" and is the button in EKOS just right of the "-" button for Profiles.  It is "twitchy" because you have to add the driver info, then quit Kstars/EKOS, then restart KSTARS and the driver "should" appear in the list.  I have had to repeat the process of adding the driver and restarting on occasion to get a Custom Driver to appear (as I said, "twichy").  You -may- be able to add a path in the executable field, but I haven't ever tried this, as the symbolic link always seemed a better idea....more "UNIX-ish."

Link to comment
Share on other sites

Well, I'm giving up on the Waveshare driver (again). It still crashes on startup (which is weird cos it didn't do that before). At some point I may do a full reinstall and read through everything but for now, Ive got a working focuser and thats good enough for me... 😀

Link to comment
Share on other sites

Best way to test stuff like that is to load the driver at the command line:

indiserver -vv indi_wmh_focuser

then manipulate it via a python program called indigui with which you can fiddle with the parameters and move it back and forth independent of any real client program.  It comes as part of  CCDciel, but is a stand-alone program.

  • Thanks 1
Link to comment
Share on other sites

Just now, JonCarleton said:

Sorry you are having an issue.  Contact me if you have questions.

Not your fault at all. I think I will revisit it at some point as the tips you've provided have already helped - plus its in my nature to find out how to get it to work 😊

  • Thanks 1
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.