Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Astro Projects

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

All Sky Camera Mark 7


Gina

26,378 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



For the focussing control I think I'll stick with the four buttons in a row - it's more logical and needs less editing.  I don't think I need a reminder of which way I was going ?

Seems like the light only needs two of the four conditions.  Yellow for BUSY which moving the focus and off (grey) for IDLE.  (It could go green after the motor has run, for a second or so and then go off - indicating OK then IDLE.  That would show that something has happened if the fine focus is so quick that the yellow light doesn't show.)

Link to comment

Added code to simulate the way the focus buttons are supposed to function but it's not right yet.

Link to comment

Found the error and corrected it - simulation now working.  Next to add the motor code.

Link to comment
Gina

Posted (edited)

Some code snippets :-

#define FineTicks 100;    //  100 ticks for fine focus
#define CoarseTicks 500;  //  500 ticks for coarse focus
    // motor wake up
    bcm2835_gpio_write(SLEEP, HIGH);
    // OUTWARD
    bcm2835_gpio_write(DIR, LOW);
    // INWARD
    bcm2835_gpio_write(DIR, HIGH);
    // process targetTicks
    int ticks = FineTicks;  // or CoarseTicks for the COARSE controls

    for ( int i = 0; i < ticks; i++ )
    {
        // step on
        bcm2835_gpio_write(STEP, HIGH);
        // wait
        bcm2835_delay(STEP_DELAY/2);
        // step off
        bcm2835_gpio_write(STEP, LOW);
        // wait 
        bcm2835_delay(STEP_DELAY/2);
    // motor sleep
    bcm2835_gpio_write(SLEEP, LOW);

 

Edited by Gina
Link to comment

Added all the motor control code and after removing a rogue character, it compiled OK.  Next thing will be to plug the micro SD card into a unit with focus motor driver and connect a stepper motor.

Link to comment

Drat!!  That doesn't work

gina@Mint-Desktop ~ $ ssh gina@asc2
ssh: connect to host asc2 port 22: No route to host
gina@Mint-Desktop ~ $ 

It shouldn't make any difference which sample of RPi it's in (should it???).  I'll try another RPi...

Link to comment

Back to the original RPi and it works.  Looks like it's dependent on the MAC address of the WiFi chip.

Link to comment

OK - swapped the RPi set up for WiFi for the one in the telescope focuser and it all works fine.  Think I need fewer ticks though.  OTOH this test setup may be set for full steps and the ASC for 16x micro-stepping.

Link to comment

Rather than having to keep editing the code to get the resolution alright for the coarse and fine focussing I could make these variable and save the values in the Configuration file.  This would enable the settings to be set remotely from the INDI Control Panel and saved.  It would be a useful exercise in coding too, involving a couple more control types.

Link to comment
bool FocusRpi::initProperties()
{
    INDI::Focuser::initProperties();

    IUFillNumber(&FocusAbsPosN[0],"FOCUS_ABSOLUTE_POSITION","Ticks","%0.0f",0,MAX_STEPS,(int)MAX_STEPS/100,0);
    IUFillNumberVector(&FocusAbsPosNP,FocusAbsPosN,1,getDeviceName(),"ABS_FOCUS_POSITION","Position",MAIN_CONTROL_TAB,IP_RW,0,IPS_OK);

	IUFillNumber(&PresetN[0], "Preset 1", "", "%0.0f", 0, MAX_STEPS, (int)(MAX_STEPS/100), 0);
	IUFillNumber(&PresetN[1], "Preset 2", "", "%0.0f", 0, MAX_STEPS, (int)(MAX_STEPS/100), 0);
	IUFillNumber(&PresetN[2], "Preset 3", "", "%0.0f", 0, MAX_STEPS, (int)(MAX_STEPS/100), 0);
	IUFillNumberVector(&PresetNP, PresetN, 3, getDeviceName(), "Presets", "Presets", "Presets", IP_RW, 0, IPS_IDLE);

 

IUFillNumber(&PresetN[0], "Preset 1", "", "%0.0f", 0, MAX_STEPS, (int)(MAX_STEPS/100), 0);

IUFillNumber(&CTicks, "Coarse Ticks per step", "". "%d", 10, 10000, 10, 0);

Definitions :-

Quote
void IUFillNumber ( INumber np,
    const char *  name,
    const char *  label,
    const char *  format,
    double  min,
    double  max,
    double  step,
    double  value 
  )    

Assign attributes for a number property. The number's auxiliary elements will be set to NULL.

Parameters
np pointer a number property to fill
name the number name
label the number label
format the number format in printf style (e.g. "%02d")
min the minimum possible value
max the maximum possible value
step the step used to climb from minimum value to maximum value
value the number's current value

 

Quote
void IUFillNumberVector ( INumberVectorProperty nvp,
    INumber np,
    int  nnp,
    const char *  dev,
    const char *  name,
    const char *  label,
    const char *  group,
    IPerm  p,
    double  timeout,
    IPState  s 
  )    

Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.

Parameters
nvp pointer a number vector property to fill
np pointer to an array of numbers
nnp the dimension of np
dev the device name this vector property belongs to
name the vector property name
label the vector property label
group the vector property group
p the vector property permission
timeout vector property timeout in seconds
s the vector property initial state.

 

Link to comment

I think that rather than setting the coarse and fine focussing resolutions I shall set one and set the ratio between them.  The latter is unlikely to want changing.  A ratio of 5x or 10x would seem about right.  Though once focus is set it doesn't vary significantly.  Still, it's good practice in coding ?  These controls will go in the Options tab together with Configuration - Load Save Default.  Actually, the tab would be better caller Configuration.  I know how to change the name now.

Link to comment
Gina

Posted (edited)

1m exposure, 4m delay and gain at 144.  Camera temperature -7°C with full cooling on.   Moon's starting to show so that's it for tonight.

Light_040.thumb.png.867173dcdad39366a0f06bea7188fbff.png

Edited by Gina
Link to comment
Gina

Posted (edited)

Having thought about focussing some more, I've concluded that a standard linear control to set focussing resolution is far from ideal.  This is really a logarithmic scale.  So although a standard number inputing control would be easy enough, I don't think it would be very good to use.  It's a rather fussy control IMO anyway - I like to keep things simple and logical.  Hence I propose a series of buttons - one set as a tens multiplier viz. x1 x10 x100 x1000 and another for x1 x2 x5.  These would be standard button sets "one of many".  Not sure which way round though.   Maybe 1  10  100  1000  and then  x1  x2  x5.  Alternatively - 1  2  5 and  x1  x10  x100  x1000.

Edited by Gina
Link to comment

Added the controls and after fixing a few errors it compiled and installed but the buttons are not appearing.  Maybe look at this again later when it's cooled down a bit.

Link to comment

Can't seem to add any controls but can modify the ones I already have.  An earlier versing of the Astroberry Board source files for the ASC where I had buttons to select 3 motors, individually or all three, compiles and installs and works.  I managed to move the focussing buttons to a Focus tab but when I tried to add another control it didn't work.  I've been through the code with a fine tooth comb but can't find the reason - I'm simply copying sections of code and altering them to make them a bit different, which has always worked in the past.  I can alter the labels etc. no problem.  Now I'll see if I can change the number of buttons in the control.

Link to comment

Changed number of buttons from 4 to 6 and it has worked except that it's changed to a drop down list which is alright.  I guess there's a limit to the number of buttons across the page.  I could use this system if I combined the resolution multipliers ie. 1 2 5 10 20 50 100 200 500 1000 making 10 items in the list.  Or maybe 1 3 10 30 100 300 1000 would do.

This still begs the question of why I can't add extra controls.

Link to comment

This is taking far too long and has got completely out of hand!!  I think I'll just set a fixed resolution for focussing and if I find it't too far out I'll bring the control box indoors and change the code.  Setting up focussing resolution will only want doing once or if preset should only want changing once if it's wrong.  I've been editing and recompiling code dozens if not hundreds of times and I'm not exactly making any progress.  Anyway, I'll sleep on it.  Had enough for today anyway.

Link to comment
Gina

Posted (edited)

Removed code for all the controls that weren't working.  Brought ASC control box in from the observatory and swapped RPi boards.  Checked operation of camera cooler and dew heater controls and corrected a logic error in the dew heater control.  Then shut down and took unit back out to observatory.  Put unit back in place and connected up except for Ethernet cable as now have WiFi.  Back indoors and connected successfully by WiFi and camera working fine.  Tried the focussing but nothing seemed to be happening.  Then tried the camera cooling and cooling seems to be working having waited several minutes to see what's happening to the camera temperature.  No way of telling what the dew heater is doing as there isn't any dew.

CONCLUSION :-  WiFi is working fine but Astroberry Board controls do not seem to be controlling the focus, Camera cooling control seems to be working.  I shall have to bring the control box back indoors again and carry out more tests. 

EDITED to correct results.

Edited by Gina
Link to comment

Taken the control box down and brought it indoors.  I can see immediately why the focussing isn't working - the SLEEP line is on the wrong GPIO.  It's different between the two HATS!  Changed the code to the right GPIO line and a connected stepper motor works.  It looks like the right amount of shaft movement too.  Now to reinstall it back out in the observatory...

Link to comment

Hooray - focussing works, though it's a bit coarse.  I'll bring the card indoors and edit the source file.  Or maybe use nano to change it remotely.

Link to comment

Reduced the focussing resolution by 5x (20 ticks fine and 100 ticks coarse) and now it seems a bit fine but that isn't a problem.  Can't really tell until I can focus on the stars.  From what I've seen of the stars I was covering some 4 pixels with the width of a star which isn't bad.

Link to comment

I think that's pretty much it.  May want more dew heating in the winter but for now it's FINISHED!  Hooray!!!  ?

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.