Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Astro Projects

  • entries
    16
  • comments
    1,180
  • views
    6,308

All Sky Camera Mark 7


Gina

26,285 views

This is my latest generation of all sky cameras and based on the ASI178MM followed by ASI185MC CMOS astro camera and a Fujinon fish-eye lens of 1.4mm focal length.  Although rated at f1.8, this lens lets a lot more light through than this would imply.  Image capture is provided by a Raspberry Pi 3 in conjunction with INDI software.  This is used with KStars/Ekos client software running on a Linux Mint desktop indoors.  Communication is via Wi-Fi.  The Mark 6 ASC has proved inadequate after being in use for some time. 

This blog will describe the problems of the Mark 6 and report my progress in developing this new version.

  • Like 1

654 Comments


Recommended Comments



Been inspecting the code for the PiFace INDI driver and found the stepper driver code is to suit the ULN2003 type stepper driver whereas the Astroberry Focuser is for the A4988 type driver.  If I were to use the ULN2003 stepper driver for all the steppers I might run out of RPi GPIO pins.  So it isn't just a matter of using the PiFace INDI drivers as that package won't do what I want.  OTOH I reckon that by comparing the code for the two systems I should be able to add extra controls to the Astroberry Board INDI driver.  Eventually I shall know what I'm doing :D

Link to comment

Been reading up on INDI and getting there - I think I may be able to work this out :)  There is a switch option of "one of many" ie. like "radio buttons" so that would form the control for the lens control motors.  viz.  All A B C.  So that's one point determined :D

Link to comment

I have succeeded in installing Ubuntu Mate on the RPi microSD card and set it up.  Installed INDI and other stuff and have SSH access from my Linux Mint desktop.  Now about to test the camera imaging then I can go on to installing the Astroberry drivers to use as a template to create what I want.

Link to comment

Camera works fine and using the different OS has cured the short exposure problem :) I can now get down to 32µs exposure so I shall be able to use the camera in daytime (when it stops raining!).  I have been trying to install the INDI drivers to drive the GPIO pins but getting errors which I have reported on the INDI forum where the author hangs out.

Link to comment

I have had a reply from the author of the Astroberry project, Radek Kaczorek, who has pointed me to an updated package and after editing as I require, now works :)  I have only done minor edits to the files to remove the unwanted drivers and change the labels for the Astroberry Board driver.  More serious edits will remove the unwanted 4th control and System Shutdown/Restart from the Astroberry Board driver and add motor selection control to the Astroberry Focuser, if I can manage it :D

5a1580ea37c1d_INDIControlPanel01.thumb.png.6843d3abb97e590029a92c028c52ac39.png

  • Like 1
Link to comment

I shall take these edits one at a time to avoid confusion.  I have edited the Raspberry Board header and cpp files (rpi_brd.h and rpi_brd.cpp) to comment out all references to the 4th control line which should remove this control from the driver (if I'm right).  This is the first time I have tried to remove a control.

Link to comment

It's worked :)  Now for the System control (the Restart didn't work anyway and I certainly don't want to shut down the ASC remotely as I'd have to power down and up again by going out to the observatory).

5a1599a31c58a_INDIControlPanel01.thumb.png.4edac65a6de399aef40e270030c1753d.png

Link to comment

I think I shall firstly try reinstating the 4th switch on the Astroberry Board but with 4 states corresponding with All A B C with one-of-many function.  Then if this works, transfer it to the focuser which is where it logically belongs.

Link to comment

With two state switches the switch is either ON or OFF but with the focus motor control it's one of four so setting one ON must turn all the others OFF.  In fact there are three control lines that go to the motor enable pins.  These want to be in one of four states :-

  1. LOW  LOW  LOW  = all on
  2. HIGH HIGH LOW  = Motor A on
  3. HIGH LOW  HIGH = Motor B on
  4. LOW  HIGH HIGH = Motor C on

The GUI wants 4 buttons as represented by the line numbers above and logic then controls the three output pins.  The last action is to read the three pins and set the lights on the buttons as appropriate.  If a rogue state occurs with two lines on an error state exists and the result light should be turned red and an error message given.  I have yet to find how to do this.  An interim measure might be to show all buttons OFF.

The code correspondence between the 3 pins and the 4 buttons is as follows :-

  • 000 All
  • 001 A
  • 010 B
  • 011 Error
  • 100 C
  • 101 Error
  • 110 Error
  • 111 Error

I think the easiest way of implementing this would be with an array.

Edited by Gina
Link to comment

In sorting this out I have also seen how to determine the state of the lens cover by reading the Hall switch.  I think I can probably dispense with the Arduino and do everything with the RPi.  Reading the state of a GPIO pin as input was much simpler than I expected :)

Link to comment

Here are the allocation of GPIO pins for the motor control lines :-

#define M0 RPI_BPLUS_GPIO_J8_15		// GPIO22
#define M1 RPI_BPLUS_GPIO_J8_13		// GPIO27
#define M2 RPI_BPLUS_GPIO_J8_37		// GPIO26

M0 controls Motor A, M1 Motor B and M2 Motor C.  I could have called them MA, MB and MC but numerical designations are more customary.

Link to comment

I've modified the code and recompiled etc. but the result is not quite right.  Strangely, the labels aren't coming out on the buttons properly.  And there's a logic fault in that the green light doesn't come on.  I think also that it could do with a fifth button of OFF to stop any possible focus shift once it had been set correctly.  Think I'll add that before moving the code to the Focus driver.

5a1708fc539da_INDIControlPanel03.thumb.png.01b38eaa29220da934d7983f476d5ab9.png

Link to comment

Done loads of code changes and additions with the result that the Astroberry Board driver doesn't work.  I've been meticulously over the code and can't see what's wrong.  I think I shall have to backtrack to where I had 4 buttons almost working - at least the rest of the driver was working, now it won't even connect.  One little error in hundreds of lines of code can stop things working.  Some errors are picked up by the compiler, others go through and just stop things working.  The Astroberry Board cpp file is over 600 lines long!  Low level coding can be very tricky!

Link to comment

Went through the code again and found some errors which I corrected but it still isn't working :(  Oh well...  I guess tomorrow is another day as they say :D

Link to comment

Decided to try eliminating a section of code that wouldn't stop compiling - 62 lines that i added that check that the actual logic levels on the pins.  This is only a check that th output is right.  But the error is not in that section of code.  Next thing I can try is to reduce the number of buttons controlling the motors.  This will mean editing a couple of lines, commenting out individual lines and commenting out a section.

Link to comment

Cut the number of buttons down to three and the driver connects.  I'll take it back up to four next.

Link to comment

Going up to 5 buttons stops it connecting.  Only a few extra lines of code are involved and I can't see anything wrong with these so I must conclude that the buttons are limited to 4.  I'll investigate further tomorrow but if I can't find any error I'll ask on the INDI forum.

Link to comment

I guess 4 buttons will suffice as the Focuser can be disconnected so shouldn't operate.  It's just that I like interlocks and "safety catches" :D  Of course, I could always provide an interlock another way.

Link to comment

The code for four buttons can be arranged that the motors are all off (disabled) until a button is pressed (clicked on) and with the focus driver putting the motors in SLEEP mode, there is the "safety catch" - motor(s) have to be ENABLED before the focuser will operate :)  Problem solved.  Now I shall try copying the code lines to the focuser driver.  Great care needed :D

Link to comment

Well that didn't work!  Surprise, surprise :D  Seems to be to do with scope rather than just a silly mistake and could take some resolving.  Might go back to having the motor control in the Board driver rather than in the Focuser where it logically belongs.  Oh well, it was worth a try.  It's only for me to use anyway - I doubt anyone else will copy this project though they are welcome to :D

Link to comment

I was hoping that if I transferred the motor control buttons to the focuser driver that I might get a clue as to why some of the button labels are wrong.  Maybe I can teach myself something by adding buttons to "simple device" in the tutorials.

Link to comment

Returning to where things at least compiled and the driver connected :-  Four buttons in the Board driver still with a couple of wrong labels and the Focuser driver returned to original.  The screenshot below shows the appearance at start-up with all buttons unselected.  Next I plan to edit the "Simple Device" driver code to add buttons.

5a18392894d82_INDIControlPanel04.thumb.png.056976d93395d5a3e5ad1220664959ee.png

Link to comment

Followed all the instructions for Simple Device but it doesn't work :(  That's just it as published - no editing or extra code.

Edited by Gina
Link to comment

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
×
×
  • 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.