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.

Recommended Posts

From my other post, you all should realize 2 things about me.  1: I can't leave well-enough alone.  and 2: I like to fiddle around with things. In my last thread, I got setup with my goto telescope and managed to control it remotepy with KStars or Stellarium and even got my CCD working so I can sit inside in comfort while stargazing.....ALMOST.  I still have to run in and out to turn the focus knob.  So....

There is a raspberry pi running the INDI server pointing the scope and managing th CCD.  I have a nice little geared motor and a HAT board that I know how to connect and control with the pi to make the motor go fast or slow, or forward and backward.  I can manage the machine work to create a connection to the focus mechanism for the motor.  What I need to know is if there is already a DIY-ish or configurable driver for INDI.  And yes, this probably is a post for INDI forum, but for some reason I can't get a login there.  So, if anyone knows or has done this, thank you in advance for any information you are able to provide.

 

Share this post


Link to post
Share on other sites

Moonlite is a well documented protocol + Robert Brown's Myfocuser - both have indi driver's and ascom!

But they re for Stepper motors and Arduino.

Gina on SGL has done RPI plus hat focuser plus indi driver i think

Share this post


Link to post
Share on other sites
4 minutes ago, stash_old said:

Moonlite is a well documented protocol + Robert Brown's Myfocuser - both have indi driver's and ascom!

But they re for Stepper motors and Arduino.

That probably won't make a difference as far as the INDI is concerned.  It will just be using some protocol over a USB connection.  But it does make me wonder if I've interpreted the OP correctly.  Are you specifically looking for an INDI driver that controls focuser hardware that is directly connected?  Or do you just need an example of a focuser driver to use as as a reference or template that  you can drop your own motor controller code into?

James

Share this post


Link to post
Share on other sites

I think you will find what you want in this thread. Kevin wrote a driver for a Waveshare HAT and motor for INDI

https://www.cloudynights.com/topic/688855-building-myself-a-stellarmate-gadget-any-advice/?fbclid=IwAR1JzM0L1agNdF7NavsCPY7hG-9U2tT49pR9FTNRurAi1cQX_Ja7JDrWYlM

The driver is here

https://github.com/k-ross/indi-wmh-focuser

"INDI focus driver for Waveshare Motor HAT stepper motor controller board. This allows controlling a stepper motor directly from a Raspberry Pi, with no external controller necessary. Additionally, the HAT can power the Raspberry Pi, so only a single 12V power connection will be needed, instead of a 12V and a 5V connection."

Edited by Vox45

Share this post


Link to post
Share on other sites

Thanks a heap!  That'll get me started.  As to what the question was, I'm not sure myself.  The GOAL is not to have to run in and out of the house tweaking the focus knob and running back to look at the computer screen.  I have some hardware and am already pointing and driving the CCD with a Pi4, so adding another computer (such as the Arduino) seems redundant. Though, I already know where to get the hardware and software for that solution and it isn't expensive.  If I say the rules are KStars->WiFi->Pi->INDI_Driver->HAT->StepperDriverMotor, I suppose that is the project.

From what I can tell from your kind replies, there's stuff out there I can scavenge.  I just need to look around more.

Edited by JonCarleton
  • Like 1

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.

  • Similar Content

    • By Fred_76
      Hi all,
      I proposed at Cloudynights a thread with some tricks to improve the accuracy of the Sky Watcher mini equatorial wedge that many of us use for their mini tracker.
      Here is the thread : https://www.cloudynights.com/topic/700024-skywatchers-small-equatorial-wedge-improvement-solution/
      Those tricks are quite straightforward and greatly improve the wedge's behaviour.
       
      Fred
       
    • By Gregely
      Hi SGL
      I popped this topic on CN too but noone seems to know anything.

      I came by an old Celestron Ultima 8 pre-PEC. I really like the scope and the mount it may be that I have read too much of Uncle Rod's and other's praise that I feel this scope has some intangible personality and charm.
      Anyway...
      Circuitry in the base seems to work fine even though the batteries don't hold charge but drive the Ra axis . I have 2 replacement on its way to me.
      Now my issue: It didn't come with a hand controller. I know it is not needed for tracking, and I don't have a Dec motor but I find it would be useful for centering in RA and D.A.R.V. method drift alignment.
      I was on the verge of making a crude controller out of veroboard and 4 momentary switches that I thought to be correct from the info on various sites, but then I came across an Ultima 8 project that clearly showed the hand controller for my scope.
      The pic attached is the one.
       
      I am looking for help on how the dial and buttons are wired in and/or photos of the innards of the hand controller or if anyone knows what else is inside the handbox.
      The sources I was going on so far is a combination of the following 3 links:
      https://www.cloudyni...ding/?p=8015749
      https://onstep.group...in/message/6300
      https://github.com/garlick/ultima8/blob/master/base/README.md
       
      These of course don't include drive rate rotary switch in the middle and if I could I would really like to to restore the full ability of this mount without spending too much  on electronics. Plus I don't want to spend time and effort on wiring something that doesn't work.
       
      Oh and lastly I have no background  or experience in electronics just own a soldering station and a whole lot of determination.
       
      Thanks in advance
      Greg

    • By Andy_ZH
      Hello all,
       
      this is my first post at SGL, and it will be quite long. I am not native a English speaker, so please excuse any mistake.
       
      I have quite some plan with my telescope mount and its goto control, and I am looking for some feedback and comments. If somebody else did a similar project, please let me know. And please feel free and encouraged to make suggestions, ideas, critics, etc.
      The story in a few buzzwords: Raspberry Pi Zero → direct control of TMC2209 stepper drivers via the Pi's Uart serial interface to drive my telescope mount. I am writing a software (optionally: open source?) to control the mount. The language will NOT be C, as typically used for Microcontrollers (I know for instance OneStep)
      I am using Kotlin, which is a more advanced JVM language.
       
      I think this should be enough information to filter the readers who are interested in reading the rest of my post.
       
      Now the long and detailed story:
      My professional background: I am a physicist, and did a PhD in EE (Power Electronics). Later, I became software engineer. Besides being fascinated by Astronomy, I am a tinkerer (Reprap 3D printer, electronics, …). I did grind my first mirror (a 6'' Schiefspiegler) when I was 15 years old, and I built the cookbook CCD cameras in the 90's.
      After many years without a telescope (study time, relationship, ... ), I settled down with my family, and I started to get back to Astronomy.
      Recently, I did by a quite a massive second hand mount: the “Vixen New Atlux” from another other stargazer in Switzerland. My opinion is that the New Atlux' mechanical design is superb. It has (had...) internal wiring, the counterweight bar can be hidden in the mount for transport, good polar alignment screws, it has an excellent polar finder with a dimmable LED.
      But on the other hand the electronics: two weak servo motors in combination with the incredible Starbook 5.... Seigh... the starbook...(!) it is, well... the mount is just superb, and no more comments about the starbook game boy, which shall rest in peace at the garbage dump.
      I removed the servos and all electronics, and I put 2 stepper motors into the mount, which are coupled to the gear with a timed belt. My original plan was to put an Arduino into the mount in order to control the steppers. I have an old goto Celestron cg-5 with Starsense, and it would have been quite easy to mimic - with the Arduino as interface – the servos of the old cg-5 and translate the Starsense control signals to my New Atlux. I can write C, and there is even an open source project called OneStep, which uses a Microcontroller in a similar way as I do.
      But I don't like to write C code anymore. In the 3D printer community, people need to use real time electronics to control the printer steppers. Due to the real time requirement, C with a real time microcontroler (Arduino & similar) are the only option for 3D printers.
      Do we need real time for our telescope? No. We don't need to control a lot of Motor accelerations and high speed control. For the telescope, we need to set the Motors speed precisely, and we need to drive to any position in an accurate and controllable and slow way.
      Then, there are new stepper motor drivers available with as much as 256 microsteps. The TMC2209 stepper driver , which is very well know in the 3D printer community, is not vibrating at all. It runs just smoothly, also at very low speeds. I do drive my motor with 0.25 rpm (sideral speed). In case of a slew, I can accelerate to 1500x sideral speed, which also would allow me easily to track the ISS. Wonderful.
       
      The current status of my project is:
      The mount is equipped with the two new motors The TMC2209 drivers are connected to the Raspberry pi GPIO Interface, and I can control them via Software. Theoretically, I could attach up to 4 motors with a single Uart interface (1 wire protocol). For instance, a focuser or a filter wheel could be attached. I selected Kotlin as language. Java also would have been possible, but I think for a new project, Kotlin will lead to a much more readable code. The TMC drivers can be driven via a chip-internal clock signal. Different to what the 3D printer community is doing (they use the step / dir pins, and create every single microstep with the microcontoller), I can send a “speed” signal from the Raspi via UART to the 2209 chip, and it will execute this speed for me without any further action. The only time critical issue was that I need to precisely count the steps that the 2209 stepper drivers executed. This is done via a GPIO pin, receiving its index signal (a pulse for every 2209 fullstep). Here comes the pain with Linux (non real-time) and the Pi: For user programs, it is impossible to guarantee that every pulse from the stepper drivers will be registered. But I cannot afford to have a step count drift over time. The solution was that I wrote a Linux kernel module in C. I wrote that I don't want to write any C code. Well, a few lines for the kernel module were indeed necessary. I can live with that, having in mind that the rest will be written in Kotlin. The only task of the Kernel module is to count every registered step at the Pi's GPIO input pins. This kernel module output is then mapped to a character device file in /dev/ for every stepper. In Kernel space, it is possible to register and count interrupts without missing even any one of them. From a hardware point of view, this is indeed everything we I need. The project cost so far: 2x10€ for the stepper drivers, 2x10€ for the motors, 2x20€ for the tooth belts and pulley, 10€ Pi Zero plus some peripheral expenses: Micro SD card, USB charger, and 1200 € for the used Vixen new Atlux mount. And a lot of time.
      I have so many ideas on how to extend the ecosystem of my software, but these ideas are for the longer term (maybe years from now on):
      Multi-star alignment. The alignment should be able to be updated continuously during an observation night. With a set of stars, it should be possible to calculate the quality of the aligment points, and e.g. drop them if they are errorneous. PEC correction (should be easy on the Pi) End-Stop support The polar alignment routines of today's goto scopes are quite good. But what I would like to have is some audio-feedback when I move the alignment screws into the right direction. Possibility to pre-plan an observation night (e.g. the mount could tell you that the Jupiter moon shadow will be on Jupiter in a few minutes). Record the telescope movements during the night in order to be able to tag any picture. The TMC drivers have much more capability than what I am using currently. For instance, they could be current controlled for slews in order to set the stepper current exactly to the value that it needs without stalling. This saves a lot of energy. The TMC drivers have a feature called “Stall Guard”. This could be used instead of endstop switches (for 3D-printers, this is done frequently). Advanced options for tracking: siderial, solar, moon speed, ISS speed. Tracking in both axis (e.g. to compensate polar misalignments of atmospheric refraction) or just in right ascension. Commercial mounts do not allow much customization here. With slow slew speeds, 5V input via a USB-C cable is sufficient for the Pi + Motors. Usb-C and newer usb battery packs allow to output a higher voltage via USB. With an “USB-trigger”, the input voltage can be selected to my needs. Higher voltage allows higher slew speeds, but consumes more power. Autoguider support, or even better: simply connect a webcam via the Pi's USB connector and do the guiding on the Pi The Raspberry Pi touch screen could be used for telescope controlls Advanced German mount limits and meridian flip control (e.g. a warning about a necessary flip when driving to a specific goto target). An Android App, connected via WiFi to the Pi could be used as display alternative Language control (have a look at Mycroft, an open-source artificial intelligence). "Hey mount, please slew to the whirlpool galaxy!" Control the mount via SkySafari and Stellarium The Pi has a built in camera interface. How about an open source auto align? The Pi could look at the stars to align itself, which makes a lot of sense. I did already order a long focal length lens and monochrome camera from Arducam in order to do some experiments (the standard Pi camera has 3.5 mm focal length and is not really usable, although star imagining is possible). My first observation site is my balcony. And there, the real Starsense does not work at all. It always spin-loops on 2 alignment positions where the sky is covered by the roof – how silly is that?. This can be done better. Further, Starsense is doing only a initial alignment. It should update its position and accuracy over the time! I think I could do this better.  
      Besides all my ideas, the first and most important focus of the software will be:
      Readability (therefore my choice of Kotlin), extensibility and open source. I like to have the Maths of the internal mount model clearly visible and understandable in the software. The calculations that are done within all our goto mounts are no rocket science. I admit, I am the nerd guy who wants to go the hard way and implement this from scratch.
      I am looking for a good project name, do you have any suggestions? How about QuickStep? this is possibly too close to OneStep and would offend the creators of OneStep?
      Does anyone of you have interest in joining my plan? Doing such a project in a small group would be more encouraging then just doing it for myself. And of course later on, I would appreciate if other stargazers would update their old mounts with my software.
       
      Any comments on my project plan are welcome!
       
      Clear Skies!
      Andy
       

    • By Stargazer33
      I've finally got around to making my flats box.
      I decided to go for a cylinder rather than the normal square as I thought it would maximize the amount of reflected light and limit any 'dead' areas. I could also use the Celestrons dust cap retaining pins to lock the flats box onto the 'scope.
      I purchased some of the craft board that has a thin foam sheet sandwiched between two sheets of thick paper/thin card. In order to bend the card into a cylinder, I creased the board every 20 mm by pressing the edge of a steel ruler into the board. It took two of the sheets to make a cylinder big enough to fit my C9.25, with only a couple of cm trimmed off.
             
       
      I then made a reinforcing ring/defuser holder from two strips of the foam board; this time creasing them at 15mm intervals. I stuck these level to the bottom edge so the joins were 90° to the main cylinder joins. These strips were cut wide enough to ensure that the diffuser cleared the secondary housing.
        
       
      The cylinder was designed to lock into the C9.25s dust cap retaining pins so next I cut two keyways into the bottom outer side. They looked a little weak so I reinforced them with some Christmas chocolate reindeer plastic packaging!
       
       
      Although the foamboard is quite shiny, I wasn't happy with all the grooves, so I lined the inside with white A4 paper. The Perspex sheet was cut to shape and hot glued into place onto the ledge.
        
       
      Next, starting at the top, I notched the edge of the cylinder to run the LED string lights cable through and then started to spiral the LEDs around and down the cylinder.
        
       
      The top cap/reflector was made from two discs of foamboard. One to go inside the cylinder and one to sit proud of the edge. They were glued together before being hot glued onto the top of the cylinder. The LED light string that I bought has an integrated on/off button as well as both up and down brightness buttons with a 3M sticky pad on the back, so I stuck this to the top cap.

       
      As I had previously made myself a 'scope mounted power distribution box with aircraft sockets for power, I removed the 3 pin UK plug/ac-dc converter and soldered on an aircraft plug to match my 12 volt DC supply socket.
        
       
      The lightbox illuminated.

       
    • By x6gas
      Astroberry (strictly speaking Astroberry Server) is a fantastic operating system for the Raspberry Pi that allows control of your astromony kit and even better it's free!
      However, while there is a lot of useful information on SGL and elsewhere on the web, I had some trouble understanding how to set everything up and I couldn't find a beginners step-by-step guide.  I don't have much experience of the RPi or Linux or indeed any operating systems other than windows but after some trial and error I've got things working so I thought it might be useful to chronical the steps that hopefully will get you up and running.
      Astroberry uses INDI Library - an Open Source Architecture for Control & Automation of Astronomical Devices - you can think of this a bit like ASCOM.  Astroberry is also really flexible and there are multiple ways to do most things so what follows is just ONE way to get you up and running.
      So let's get started.  When I say 'computer' I mean your main computer and I use RPi when referring to the Raspberry Pi (that's a computer too, of course, but just to differentiate between the two).
      The Astroberry homepage is at https://github.com/rkaczorek/astroberry-server.  You'll need a Raspberry Pi, of course, (apparently Astroberry works with any RPi; I was using an RPi 3), an SD card of at least 16GB, and a computer with a suitable SD card slot (the RPi 3 needs a microSD card; most microSD cards come with an adapter that allows you to use a standard SD slot in your computer), and access to the internet.
      Firstly download the Astroberry Server image file from https://www.astroberry.io/distro/ (the image file is the operating system that will run on your RPi).

      Unzip this file into a folder on your computer.
      Then download balenaEtcher from https://www.balena.io/etcher/ - you'll use this to write the image file of the Astroberry operating system to your SD card; this process is known as 'flashing'.
      Once you've installed balenaEtcher, run it and select the Astroberry Server image file (when I did this the file was called astroberry-server_2.0.0.img) from the folder where you unzipped it.  Insert your SD card into the SD card slot on your computer, select this card from the 'Select target' button on balenaEtcher and then select 'Flash!'.  The process takes a little while but will show progress as the file is copied and then verified.  Make sure the flashing process has completely finished before removing the SD card from your computer.
      [Note, as the author of Astroberry @RadekK states in a comment below it's actually possible to set everything up without a monitor, mouse or keyboard.  To do that, insert the newly flashed SD card into your RPi and power it on.  After a few moments a wifi network 'astroberry' should be available.  Connect your computer to that network and point your browser to http://astroberry.local or http://10.42.0.1 (which is the default IP address assigned by Astroberry).  You should be able to everything via this remote connection.  Astroberry is also able to use a remote desktop app called VNC (icon is in the top right) so you can play with that too once you're well acquainted with Astroberry.] 
      Insert the newly flashed SD card into you RPi, connect a display, keyboard and mouse to your RPi and power it up.  You should see the Astroberry operating system load up.  Answer the questions and set your localisation options.
      Astroberry will create its own wifi network called 'astroberry' that you can use to connect to your RPi (very useful for use 'in the field') but this won't be connected to the internet.  We're not going to use the astroberry network for now.  Instead we are just going to have your RPi connect to your home network / internet.  To do this, click on the icon in the top left corner of the screen, select 'Preferences' and then 'Advanced Network Configuration'.

      Use this to add your wired or wifi network. 
      When you boot up your RPi, Astroberry should now connect it to your home network in preference to the Astroberry HotSpot.  If for some reason that doesn't work and Astroberry is connecting to it's HotSpot instead then you can do the following:
      Click on the icon in the top left corner of the screen, select 'Preferences' and then 'Advanced Network Configuration', select your home wifi network from the list and then click on the cog icon in the bottom left of the Network Connections window.   Click on the 'General' tab ensure that the 'Connect automatically with priority' has a tick next to it, and set the value to 1.  Close the editing window.# Then select 'Astroberry HotSpot' from the list, click on the cog icon in the bottom left of the Network Connections window again this time to edit the settings for Astroberry HotSpot.   Click on the 'General' tab ensure that the 'Connect automatically with priority' has a tick next to it, and set the value to 0.  Close the editing window, and then close the 'Network Connections' window.  These steps will mean that when your RPi is switched on it will connect to your home network if it can, and if it cannot it will start up its own wifi HotSpot called 'astroberry'. At this point, you should be able to connect to your RPi from your computer.  Open a web browser, type or copy http://astroberry.local/desktop/ in the address line and press enter.  You should see a screen asking you to connect to Astroberry Server (which is running on your RPi).

       
      Click on the connect button; the password is astroberry (in fact, if in doubt try astroberry as the password for everything - it usually is!)  If this has all worked correctly, you should now be able to control you RPi remotely so you can disconnect the display, mouse and keyboard from your RPi.
      You'll see some other icons in the top left corner of the Astroberry desktop including one for PHD2 but don't go there yet!
      Before we do anything else we need to start the INDIserver service - this will load the drivers etc that you need to run your kit.  On the left of the screen is a blue-grey tab that will expand to show some buttons.  Click on the telescope icon which brings up the INDI Web Manager window.  You can go through and select the drivers for your equipment.  Click on the 'Start Server' button at the bottom of the INDI Web Manager window which starts INDIserver - this is like starting ASCOM.  Once you've done that, type a name in the 'New Profile' box and save it.  You can then select it from the 'Equipment Profile' box; delete the simulator profile if you like.  There are check boxes under the 'Equipment Profile' box that allow you to automatically start INDIsever select a particular profile and connect to your devices - so long as the devices are connected and powered on.  If you check these boxes you don't need to repeat the step of selecting your profile etc.
      This should have you more or less ready to go.  If you experience connection problems with kit that gets its electrical power from USB (e.g. the QHY5L-II guide camera) then use a powered USB hub as the RPi USB ports don't provide enough electrical power to properly power some equipment.
      There are icons for some astronomy programmes in the top left of the Astroberry desktop.  PHD2 is familiar to me and you can test that your kit is connecting in that.
      KStars (the telescope icon next to the left of the PHD2 icon) is planetarium software that also allows you to launch Ekos (Tools>Ekos or ctrl K) and this allows you to set up equipment profiles and run imaging sequences.
      Hopefully this guide will enable you to get things set up and your kit connected.  I haven't yet explored Kstars or Ekos much, nor much of the rest of the desktop but hopefully it will be fairly intuitive.
      I've written most of this guide from memory so if a step doesn't work then please let me know and I'll try to correct it.
      Hope this helps and huge thanks to the Astroberry developer, @RadekK, for making this software available to the community - I'm sure it took a huge amount of work.
      Clear skies, Ian
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.