Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Mountings and Controls For Widefield Imaging Rig


Gina

Recommended Posts

No doubt this will get resolved in time...  Meanwhile, I could use the third circuit for rotation and leave zoom until the solution to the middle section problem is found.  Anyway, I haven't got a rotation rig made yet that will take a zoom lens.

I can connect the NEMA17 stepper motor to the third output and use the focuser driver for testing.  Then I can create a duplicate driver with a new ID to use for the rotation and edit the normal focuser driver back to the focuser GPIO pins.

Link to comment
Share on other sites

  • Replies 345
  • Created
  • Last Reply

Rotation is working :)  Changed the code for circuit three which I have now assigned to the rotation control, recompiled etc. and connected NEMA17 rotation stepper motor.  900 steps (called ticks in the focuser driver) turns the cage by 180 degrees as expected, all-be-it rather noisily, in about 4s.

Link to comment
Share on other sites

Having proved the circuitry for focus and rotation, I can now finish the control and power box and install it on the dovetail bar.  Then I shall need to edit the driver code to produce a new instance of the focuser, with new ID, for the rotation.  Later I can produce a dedicated rotation driver with much simpler code than that required for the focuser with more appropriate GUI.

Link to comment
Share on other sites

Been "playing" with code.  As always a tricky job with great attention to detail needed - one little error will stop it all working.  Mostly the compiler comes up with a meaningful error, including the line number in the file causing the error and a marker showing where the error is along the line.  But each error is likely to stop compiling at that point so with multiple errors you have to fix each one in turn and recompile each time.

One thing with Linux is that it matters whether a letter is upper or lower case and with some data types it matters whether the name starts with a lower case or upper case letter - get it wrong and compiling fails.  Anyway, I've now found and fixed all my errors in hundreds of lines of code, the code has compiled and the new INDI rotator driver actually works :)

I now have separate focus and rotation drives working independently :)

This is the current GUI control panel for the rotator still using most of the controls from the focuser it was copied from.  Next I want to change the controls and labels to show the appropriate functionality.  Also, to change the computation code to work in degrees rather than ticks.  In this case degrees need multiplying by 5 to get steps - no problem :)

Rotator GUI 01.png

 

Link to comment
Share on other sites

Now to look at what is wanted in the control panel.  On the Main Control tab I don't think the complication of relative rotation is wanted - that function can just as easily be done by the Position controls, either in the text box directly in degrees or using the slider.  And without relative movement, the direction becomes redundant.

One thing I don't like is the number in the text box shown to 3 decimal places - I think that's ridiculous but I have yet to see if I can alter it.  It might be inherited.

Link to comment
Share on other sites

I have found the piece of code that handles the up/down control, just need to sort out what works.  I'm gradually learning how the INDI protocol works :)  I'm gradually sorting stuff out at the code level but I think I need to read up on the overall structure and which controls and functions are in which classes.  A lot of stuff is inherited in the focuser code that I've been using as a template.

I've ordered a couple of books about RPi coding - one intermediate and one advanced.

Link to comment
Share on other sites

Found the definition of IUFillNumber - the up/down box etc.

Screenshot from 2017-02-20 11-06-20.png

This is the code line for the focuser - which has MAX_STEPS set to 10000, so step size is 100 ticks.

IUFillNumber(&FocusAbsPosN[0],"FOCUS_ABSOLUTE_POSITION","Ticks","%0.0f",0,MAX_STEPS,(int)MAX_STEPS/100,0);

For the focuser the MAX_STEPS is 180 and I set the step value to 1, which ought to work but doesn't!  The control reverts to just a text box.

Link to comment
Share on other sites

One thing I've noticed - I can change the format to %u - an unsigned decimal number instead of the floating point format.  Thought... I wonder if that affects the type of control.

Link to comment
Share on other sites

Doesn't work :(  Compiles but controls are wrong.

Screenshot from 2017-02-20 11-56-02.png

This is my code line

IUFillNumber(&FocusAbsPosN[0],"FOCUS_ABSOLUTE_POSITION","Degrees","%u",0,MAX_STEPS,1,0);

 

Link to comment
Share on other sites

I suppose I could use fifths of a degree as the step size in the control.  Pity I couldn't manage an 18:1 gear ratio as that would be 0.1 degrees/step.  OTOH since I have oodles of torque with full-stepping I could change to half-stepping and use 0.1 degree resolution.  Hmm...  Don't like that - one degree resolution would be fine and ideal really.

I've tried again to register for the INDI forum but the registration still isn't working.  I wonder if anyone on here is a member and could mention it in the forum :)

Link to comment
Share on other sites

I'm gradually discovering more about the IUFillNumber control.  This defines the whole line in the GUI viz.

Screenshot from 2017-02-20 12-18-54a.png

This is the code that produced this control in the GUI

IUFillNumber(&FocusAbsPosN[0],"FOCUS_ABSOLUTE_POSITION","Degrees","%02d",0,MAX_STEPS,2,0);

The format code "%02d" determines the format of the middle box and has no control over the number format in the up/down box.  I presume the format for that is set in the code for the class this is inherited from.  That is a whole new "ball game" as they say!  I guess I can put up with the 3 decimal places but if I were to publish this as a working system I would want it right.

Seems the step size for the up/down box has to be greater than one - a value of one changes the appearance to a plain text box - I presume this is intended.  I have used 2 above but I think I'll use 5 as steps of 5 degrees makes sense for the rotation.  If finer control is wanted, the number in the box can be changed directly.

Link to comment
Share on other sites

Think I've sussed it :)  Put the format back to "%0.0f" and step size to 5 and it works.

IUFillNumber(&FocusAbsPosN[0],"FOCUS_ABSOLUTE_POSITION","Degrees","%0.0f",0,MAX_STEPS,5,0);

Screenshot from 2017-02-20 13-54-13.png

Link to comment
Share on other sites

Without accessing the INDI library source this is as far as I can go.  I guess at this stage it might make more sense to build my own INDI driver from scratch rather than modifying present drivers.  I can at least use the present Rotator driver as long as I'm careful not to use the unwanted controls.

Link to comment
Share on other sites

I have the cage assembled with camera, EFW and lens and now looking for all the USB cables etc. that will fit in.  I think the focus stepper motor wires will want extending.

Link to comment
Share on other sites

Proceeding slowly but surely :)  Sorting out the run of cables etc.  I've done the extension to the focuser motor wiring, found the best route for it and run the power for the camera from fuse and earth to camera (plug).  I'll post a photo or two shortly.

Link to comment
Share on other sites

A couple of photos showing the run of the cables.  Because I needed USB cables with right angle plugs for the camera, to avoid sticking out past the end of the cage and could not get short enough ones, I had cable to "lose" somehow.  I didn't want lots of loose cables outside the rig flapping about and possibly catching up when rotating so I've coiled them up inside the space between the camera and the end of the cage. 

Cables connecting from inside the cage to the control box are brought out through the end between the spokes of the gear.  These were secured to the fixed end bracket.

Also in view is a screw in the end gear which acts as a stop in the anti-clockwise direction by butting up to the support bracket.  Since I have yet to arrange any electronic Homing system, the plan is to turn the cage to the stop before powering up.  This will then act as the Home or zero degrees position.  The software prevents rotating further anti-clockwise or more than 180 degrees clockwise.

Cabkes 01.JPGCabkes 02.JPG

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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