I dont think this is just a SGP bug, as it seems to occur with the sharpsky client as well.
IN SGP
Using focus control in there, focuser currently set to zero position.
If I tell it to step out 32,768 steps. No movement occurs. Position is set to 32,768.
If I tell it to step in 32,768 steps. No movement occurs. Position is set to 0.
If I tell it to step out 32,767 steps. No movement occurs. Position is set to 32,767.
If I tell it to step in 32,767 steps. Movement occurs and Position is set to 0.
I cant get an outward movement to occur at a number higher than 32,761 (though that number is due to backlash setting i believe.)
In Sharpsky Client,
If i step out 32768 no movement occurs and position does not change.
If i step in 32768 no movement occurs and position does not change.
If i step out 32767 no movement occurs and position is set to 32,767.
If i step in 32767 movement occurs and position is set to zero.
It seems the movements outwards at 32767 are incremented by 32767 even if no movement occurs.
Im not sure if it was all these big movement testing causes it or just happening. but I got the PIC error again. It clears up after a bit, i think maybe its waiting to complete a large movement that doesnt actually cause a movement before it starts communicating again, as bringing up the ascom setup dialog and trying to set position to zero, asks you to wait for the motor to halt before setting position (even though its not moving and halt has been clicked)
Currently the max increment is limited to 50,000. So you can move by 50,000 steps in one single movement. This value is passed to the client so SGP should not allow you to move by more than this limit.
Do you want to move by more than 50,000 in one go ?
Current imaging train takes ~97,000 steps to get to focus point, so the ability to be able to use the SGP GOTO position to go to 97,000 would be nice, Im not sure if this should be a SGP thing to just do multiple moves based on maximum single move.
Yep, I am getting the same behaviour above a total including backlash of 32767 .... ie (2^15)-1. The position offset interface is 16bits so I suspect there is a sign bit issue.
Crumbs, if you want ~97,000 steps then obviously 16bits is not going to be enough even unsigned. Leave it with me and I will look to extend the range.
Almost 2am here so probably not a good time to start.
First up - Happy New year fellow imagers from down under ! Hope everyone had a fun time and there are not too many sore heads ?
I have been working on modifications to allow you to perform your monster focuser moves Nick. I'm happy that everything is completed and working well. Essentially I have made modifications in three areas as follows :
1. Modified the SharpSky driver to deal with a maximum focuser range of 150000 steps and a maximum single jump of 150000 steps
2. Modified the PIC firmware to deal with the extra step range by internally increasing the microprocessor dynamic range 16->24bits and also the USB message sizes.
3. Modified the SharpSky client to deal with the extra step range
The driver also has a new function which allows you to pre-set the displayed absolute position value to anything you like. So say you can zero the displayed position at some arbitrary physical position. The SharpSky client has a 'setup' tab added allowing the Properties dialogue pane to be opened at any time.
Ok, so here is what you need to do :
1. Download the bootloader PC application from the web-site and also the revised firmware (SharpSky.hex). The bootloader section is found at the very end of the web-site and there are instructions on how to re-flash the microprocessor over the USB. It's quite straight forward and only takes a few seconds to actually flash.
2. Uninstall the current driver being careful to make sure all ASCOM applications are shut down !
3. Download and install the new PC driver V3.11 from the web-site
4. Download the new SharpSky client if you use it V1.13
If you use the new driver with the old firmware things will still work just fine but the driver will warn you that you are using an out of date firmware version and then automatically reduce the maximum step value from 150000 to 30000. It will not warn you again once the reduction has been made.
I hope you get on ok with the changes, please let me know how it goes.
Yes, that is the correct link. If I click on the link in your post I get the HEX file. To save the HEX file you need to right click the link and hit Save As ... and then put the HEX file somewhere locally.
oh I love software ! No matter how much testing gets done there is always something that slips through. I like the -5 position issue with SGP. I did most of the testing with MaxIm DL and set position to zero and up to 150000 to test. Clearly didn't perform the same test with SGP !
Luckily, that's a simple one to catch and fix - negative position
Have you managed to get the HEX file ok now ?
I will fix the issue with the negative position upsetting SGP later today, don't have SGP on my work machine.
yep dave, got the file on the focuser and all appears happy but that. bugs always get trhoguh, the nature of things. closed a mozzie in the scope earlier by accident
I should imagine your Aussie Mozzies resemble small birds to !
We have had sooo much rain here I think I am going to need a small boat of some description just to get to my gear at the moment !
I will post an update later to clear up the -position issue. That is a problem that has been lurking in the wings since day one I think. My client & I suspect MaxIm clearly trap -position. Although it only makes sense to transfer positive values the ASCOM API uses an type INT so it's perfectly possible to transfer negative values across the API ..... as you have just discovered. Whenever a new (to the driver) client comes along such as SGP there are always little oddities that need ironing out.
It is now not possible, via PC control, to move the position to a value larger than the Maximum value set in the driver or less than the Minimum set in the driver. This also applies to setting an initial position and hitting 'set position'
Notice it is possible to move the focuser past the driver limits using the manual hand control. I figured you might want to fine tune scope side without being blocked by the PC driver.
Hi Dave,
Rather than continue our recent correspondence on email, I feel inclined to make the following comments via the forum for the purpose of a broader (involvement in the) discussion:
The functionality of sharpsky would be enhanced by including a data (usb) and power distribution hub. It would be a fair guess that the majority of end users will have at least 1 item at the focal plane that would otherwise need to be routed away from the mount ie) CCD camera, focal plane rotator, guiding CCD... etc) all of which require cabling that is best avoided if at all possible.
Having USB ports available at the position of the OTA would also enable the end user to connect such things as humidity/temperature (dew point) sensors. From there it would be relatively straightforward to use a software based PID controller to drive PWM outputs for the optimum and efficient operation of fans & heater tapes.
Another idea that may be worth considering is a wireless dongle or cat5 connection for those that have their telescope located some distance away from their computer.
Finally had a chance to test the latest driver Dave, can confirm that it will happily deal with numbers bigger than 16bit It'll get some more testing tonight as its finally cloud free
Hope you had a good imaging session Nick, I am more than slightly envious that you had a nice clear evening. Here in the UK we are currently stuck in a bit of a cold snap with a few inches of snow and freezing temperatures - typically the country has fallen to its knees and ground to a halt. Just for all you down under cooking in an Aussie summer and for fun attached is a picture of my back garden
Interesting comments Clive. The integrated USB hub concept has come up more than once and seems a popular idea. I have had a scout about and found suitable USB controller chips that would allow expansion of up to eight USB ports. Your comments have got me thinking so I'm going to wander off to my workshop with a pencil and have a think about what can be done.
So what we need is a focuser, dew control, USB hub & power source system. But I am thinking modular so you don't have to get the whole solution but just the parts you are interested in .....
Any input for anyone very gratefully received, always very interesting to hear what is really required !
The issue is the horizon to horizon thick white cloud. Scope is out and running, but obviously not imaging - running some cold weather focuser tests just to make sure the electronics can deal with the cold & frost.
Would be nice to get some data at the same time ....
Hi Dave
Your focuser has been great, but unfortunately I will not be using my telescope for while. We are moving house. Big pain in the neck and lower down. As I was packing up telescopes and my little workshop I come across small-geared stepper motor with PCB, ULN2003 driver, header and four LED’s that I got some time ago from eBay for couple bucks and penny dropped. It should be fairly easy to modify your kit to drive two focusers. You already got buffered header to drive three or four LED’s (can not remember if it is 3 or 4 I did not connected it on my kit) so it would be to sacrifice LED indicators for second focuser motor. I may be talking complete rubbish as I’m out of electronic game for about ten years and only PIC’s I been using were OTP type.
There are multiple ways to skin the multiple focuser cat
The current SharpSky LED outputs are not suitable for driving a motor as the LEDs are driven directly from the PIC which can easily source 20mA per I/O. The motor is driven from the Darlington driver which is good for about 500mA continuous per output and is so good for motors with windings in excess of around 30ohms.
The good thing about PIC projects is the hardware is relatively simple. However, the detail then sits in the software both embedded code and driver code. Adding an extra motor ripples all the way up the software chain including the client. The standard ASCOM driver & API is only dimensioned for control of one focuser. There are two options to get around this. We could use a server to handle multiple focuser instances. Or we could generate two separate drivers, say main & guide scope . These two drivers look like two independent focusers to the client. We could then multiplex the two bidirectional command streams over one USB connection to a single piece of dual motor hardware but that means everyone has to pay for a two motor solution when the vast majority only want one. So the other option is to have a generic single motor controller that the user can configure as main or guide scope. So in the driver you tell the focuser hardware whether it is to be a main or guide controller and it is then configured with a unique USB identifier so the two controller can be addressed independently - I have tested this and it works well.
Crumbs, sorry about that got all carried away .....
I thought I would share the efforts of Alex from Bucharest. Alex ordered a SharpSky focuser kit from me at the end of last year and has been busy building & fabricating since. I was particularly impressed with the mechanical design of his telescope bracket. Alex has gone to some considerable effort but I think you will agree the result was worth the time invested.