Re: Stepper Drivers, MaxESP. A note of caution?

George Cushing

In 2007 Pololu Electronics put the Allegro A4988 IC on a break out PCB. There is no particular characteristic if the IC that dictated the output pin orientation., but the order they used, B-, B+, A+ & A- from the VMot end of the PCB down was copied with the TI DVR8825 driver was placed on the "Pololu" carrier.  

As far as the Sanyo LV8729 goes the layout of the carrier outputs follows the IC's pin assignments  Pin 1 is at the upper left when the IC is on the top of the carrier. Going across the IC we find pin 44. Pins 44 and 43 are A+ and pins 35 and 34 are A-. The b coil pin pairs are 33 & 32 (B+) and 24 &23 (B-). If you are using the Pololu output designations, coming down the right side of the IC the order is A1, A2, B1 & B2. Here the letter indicates the IC's output channel, i.e. Channel A and the number the pole of the channel. I prefer the "+" sign as I find it less confusing.

OK, some bright light decides that the Sanyo IC should be mounted on the bottom of the carrier's PBC for better heat sinking, forgetting that the LV8729 rarely has a heat problem. Now the IC's pin 1 is  in the lower left of the carrier as viewed with the VMot in still in the upper right. That also means that the IC's pins 44 & 43 (A+ or 1A, if you prefer) are in the lower right. Now if we read the outputs down from the VMot pin we get B2, B1, A1 & A2. Now if that sounds familiar, it's because that's the same order as you will find on the A1988, DVR8825, TMC2130 2208 & 2209. Here the TMC5160 deviates from this pattern with its A2, A1, B1 & B2 ordering, which puts the channels in the right sequence if reading down from Vmot. What about the ST820 with its outputs ordered, from the top, 1B, 2B, 2A & 1A? With any of the drivers mentioned above if you connect the motor cables in the order shown on the controller PCB's silk-screening it will run. So to with the ST820. It's output pins are ordered, from the top, 1B, 2B, 2A & 1A. But a glance a the datasheet shows the silk-screen got it wrong. It should have read B1, B2, A2 & A1. Basically the Pololu order with the channel poles reversed. 

In summary, if you connect any of these drivers with the assumption that the upper two outputs are for one driver channel that is to be connected to one stepper coil and the other channel to the remaining coil it should run. Maybe not in the right direction, but that's easily fixed by changing the rotation direction in the Config.h. The secret is to properly identify your motors coils.

Re: Sky Safari GOTO limits


For instance, if your latitude is zero, then everyone below polaris is basically below horizon. Have you checked what kind of general error is displayed in SWS when it refuzed to work?

Re: Sky Safari GOTO limits


In my case it looks like it counts 210 degrees from west most position CW and 210 degrees from east most position CCW which results in 8-16h. Minus/plus sign is just direction indicator and possible range (90-270) makes sense then. These are the data i came to by testing withy mount.
Maybe you didn't setup properly location or something like that.

Re: Stepping up to 24V

George Cushing

There are 2 voltage regulators on the D1 R32. The first is a MP1482 with 5V output, max input 18V. The second is a NCP1117 3.3V output max input 20V. so you are wise to keep the power in at 12V.

The screw terminal on the CNC3 is rated to 35V. To get power for the shield I've been tapping the mount lugs of the D1 R32's power jack.

Heating the lugs and giving the board a tap will clear the hole in them for connecting your leads. The leads can power your step up buck. This model seems to fit your needs and has screw terminals in and out.

Re: Simulate Alt/Azm movements in Equatorial mounts?

Khalid Baheyeldin

On Tue, Nov 23, 2021 at 01:13 PM, Howard Dutton wrote:
The only official support for doing this exists in OnStepX which is still beta (user testing phase.)

OnStep release-4.24 and earlier can NOT switch between GEM and ALTAZM unless you flash the firmware.
I am still confusing 4.24 with the now defunct 5.1.

OnStepX it is ... it coming along speedily enough ...

Re: Simulate Alt/Azm movements in Equatorial mounts?

Howard Dutton

On Tue, Nov 23, 2021 at 09:49 AM, Khalid Baheyeldin wrote:
With the new SWS, OnStep has this feature, and can change from GEM to Alt-Az.

Not exactly what Patrizio is talking about, but really close.
The only official support for doing this exists in OnStepX which is still beta (user testing phase.)

OnStep release-4.24 and earlier can NOT switch between GEM and ALTAZM unless you flash the firmware.

Success MiniPCB2 Focuser Using TMC2208

Charles Mendoza

I struggled trying to make the focuser work and I noticed that only a few people only ever post their success with it on the MiniPCB2. So here's mine.

I'm using a BigtreeTech TMC2208 and a 400 steps stepper motor (17HM15-0904S). Driver's Vref is set to 0.54V which means the motor is running at 60% of its max rated current of 0.9A (30-60% recommended). I slowly adjusted the Vref until the motor reached the point that it was not losing steps and it had enough torque. I'm running the motor at 1/16 microstepping by setting the MS1 and MS2 pins to HIGH (jump wires from driver's VDD pin to MS1 and MS2). The focuser is direct driven by the motor (1:1). More info on setting the TMCxxxx driver's Vref here and here.

AXIS4_STEPS_PER_MICRON is computed as follows:
Focuser shaft diameter (mm) * PI / Motor steps / Microsteps * 1000 = microns per step
4mm * 3.14 / 400 / 16 * 1000 = 1.963 microns per step
1.0 / 1.963 = 0.509 or 0.51 steps per micron
More Info here and here.


#define FOCUSER1                      ON
#define AXIS4_STEPS_PER_MICRON       0.51
#define AXIS4_SLEW_RATE_DESIRED       500
#define AXIS4_DRIVER_MODEL            OFF
#define AXIS4_DRIVER_IHOLD            OFF
#define AXIS4_DRIVER_IRUN             OFF
#define AXIS4_DRIVER_REVERSE          OFF
#define AXIS4_DRIVER_DC_MODE          OFF
#define AXIS4_LIMIT_MIN_RATE           50
#define AXIS4_LIMIT_MIN                 0
#define AXIS4_LIMIT_MAX                50

- Make sure that the stepper driver is well grounded
- If you are going to power the VDD pin of the driver with a voltage regulator (instead of Teensy's 3.3V pin), make sure to supply only 3.3V and NOT 5V! Feeding it 5V will make the motor erratic. Also, make sure that it is grounded to the OnStep board.
- Pin 31 and 32 on Teensy are under its board. Pin 31 is connected to the driver's Step pin and pin 32 on Dir pin.
- Connecting TMC2208's (BigtreeTech) ENable pin to the microcontroller is unnecessary, but you should connect it to the ground to make the motor work.
- You don't have to use a 12V voltage regulator to power the driver like in the MaxPCB2. You can even supply it with 18V from a laptop power supply as I did.
- Never disconnect the motor when OnStep is powered on as it might destroy the driver, microcontroller, or motor.
- If you don't see the motor moving when you press the Focus Out/In button, try holding the button for 5 seconds to make the rotation faster (it is best to use a SHC to quickly test the focuser). Otherwise, double-check your connections.
- If you plan to control it via NINA, install OnStep's ASCOM focuser driver first then set it up in the ASCOM device hub properties (setup both OnFocus and OnStep Focuser). In NINA, choose OnStep Focuser instead of OnFocus. I don't know why OnFocus was showing errors for me but choosing OnStep Focuser instead fixed it.

Re: Simulate Alt/Azm movements in Equatorial mounts?

Khalid Baheyeldin

On Tue, Nov 23, 2021 at 10:39 AM, Richard Shagam wrote:
On Mon, Nov 22, 2021 at 07:27 PM, Robert Benward wrote:
Rotate your RA axis to the vertical and you're all set.  Or get a Dob.  
The Skywatcher AZ-EQ6 Pro (and some other mounts) has this capability.  Essentially, you crank the altitude screw until the RA axis goes vertical. 
I had a Vixen GP-DX mount, and it had that same feature.
The previous owner made a small plug from a piece of wood that makes this easier, and shoved it on the base of the mount.

The handset for the mount, the Vixen SkySensor 2000 PC, had an option to change from Equatorial to Alt-Az, and it worked great.

With the new SWS, OnStep has this feature, and can change from GEM to Alt-Az.

Not exactly what Patrizio is talking about, but really close.

I am with Howard on this though: this is of limited utility and may/will confuse the applications interfacing to OnStep.

Re: Sky Safari GOTO limits

Robert Benward

Yes, I am aware of that.  But in this case, SkySafari is giving a set of coordinates to Onstep.  It is Onstep's job to move the scope there.  The question is: what are the limits representing?
Remember the message about the "Home" function?
If I want to change that default, I would add a define statement under "sensors":
#define AXIS1_HOME_DEFAULT   90   
#define AXIS2_HOME_DEFAULT   6

  • For a German Equatorial Mount (GEM) the counterweight should be down at |HA| = 6 hours
So there is a mix here in degrees and hour angles.  At 0hours the DEC shaft is horizontal.  So is that where zero starts for the degree limits?  It shows +/-180 as a default, but that would mean that at 0 to -180 the DEC axis would from horizontal, sweeping up, where the shaft and weights are pointing straight up, then back down to horizontal.  So default should look more like 0 and +180, that would make it from horizontal to horizontal (pointing to zenith, then meridian flip, to zenith again.

You show a trigonometric compass rose, for navigation, zero would be up.  But using your reference, +/-160 is a 320deg sweep, so that would be from approx 9:40AM to 8:20PM.  +/-180 would be from 9AM to 9PM.   +210 to -210 is overlapping.  With DEC at the horizontal (pointing at the zenith) HA =0.  So limits might look like 0HA & 12HA.  That would be DEC axis horizontal at both limits/extremes.  If we were talking about hour angles it would make more sense, and we also must differentiate hour angle in the home position(6hr) vs hour angle when the scope is point up (zenith=0hr).

Now, for the update.  It seems to be moving below the NCP.  I did not change anything, I even returned the values to +/-160 and it still goes below the NCP.  Weird.  I reset it (reboot) several times last night, so I know both the +/-180 and +/-160 values were in the program and re-initialize if that is required.

Regardless if it is working now, I am still not quite clear on where the limits are point to.  What does -180 "Minimum position" vs "Maximum position" +180 mean?

On the upside, the Onstep and the new motors are behaving quite well, and the interface between SkySafari and Onsteps seems to be working quite well also.  I think I might be ready to put hte mount back outside and do some full up testing.

Thanks for all your comments and feedback.

OnStep lite board for EQ 6 Pro

Roman Hujer

Hi all

Its is my new OnStep lite board for EQ 6 Pro

Because its previous OnStep version for EQ6, on the ESP32 platform has shown random signs of instability and freezing. She also sometime refused connect to ZWO ASiair via USB port. I decided to design another board, this time for the Teensy 3.2 platform.

I am very satisfied with the result - during the long November nights I did not notice any problems everything was OK

Wiring diagram and PCB are on EasyEDA.


Updated Wiki Page: SHC user manual #wiki-notice Notification <noreply@...>

The wiki page SHC user manual has been updated by Dave Schwartz <Dave.Schwartz@...>.

Reason: Add spiral search and auxiliary feature control options

Compare Revisions

Re: Simulate Alt/Azm movements in Equatorial mounts?

Howard Dutton

On Tue, Nov 23, 2021 at 01:12 AM, Patrizio Boschi wrote:
It's not a critic to any mount controller, I just don't understand why a similar basic function was never implemented by anyone in the world in any mount controller. It's the first thing people want to do when using a telescope - to move it reliably by hand around the human-undestandable reference points.
I don't see that I'd ever add this feature to OnStep.  I'd be more inclined to add code to (optionally) have Alt/Az guide on the equatorial coordinate system; wonder how PHD2 would react to that.

Re: Simulate Alt/Azm movements in Equatorial mounts?

Chris Whitener

"Turn Left at Orion"  is a wonderful book.  I understand the question.  I started writing code to work directly with hardware 50 years ago, but I picked up astronomy only a year ago and have been trying Astro photography for 6 months.  I started with a very popular up/left kind of mount from Celestron 8se.  It has to translate its up down left right movements to Equitorial.  I bought a wedge to try to understand the polar alignment thingy.  Then I lucked into some nice EQ mounts and then to Onstep.  After spending a fair amount of time with these systems I realize they are all doing the same thing.
Think of the mount as a peripheral to a computer system.  Like an astronomy camera, it does its specialty very well.  You could jam all the autofocus systems of a DSLR into it, but....

My feeling is that what you want is very reasonable and many manufactures have provided it.  Sky Watcher even makes mounts that can switch from EQ to Alt/Az.  However my suggestion is to do it in either a hand control or an attached system.  the mount needs to (for most purposes) be really good at tracking slowly to image the sky.  Translations of direction and coordinates are better in the User interface.  I don't typically issue serial commands directly. But a hand control like the ones from celestron, orion et.all. can and does offer all sorts of translations and even plate solving.  An app could easily figure out where "Orion" is and move left......

Re: Bluepill connecting


if you just use the onstep  blinky test prog it should end up saying

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 10]
Download in Progress:

File download complete
Time elapsed during download operation: 00:00:01.604

RUNNING Program ...
  Address:      : 0x8000000
Start operation achieved successfully

there is normally a power led ( red on mine)  on the bluepill and you should get a second LED ( blue on mine)  on for a bit then blink 5 times. this is still with the jumper in prog position bur reset wo'nt make it run again.
power off ( in my case the usb provides the power at the moment) move the jumper back to run position and prog will run on power on or when reset button is pressed.

in the case of the memory test nothing will happen at the end of programing.
power off change jumper power on and open the Arduino IDE serial monitor. Note the prog by default is 9600 baud and you can't open the serial monitor until the IDE has found your serial port. So, if like me, you power the test board from the serial adapter, it may have finished by the ime you can get the serial monitor open. thus not seeing the message. a press of the rerset should after a short time give you for the 64k test
Checking across 40000 bytes of memory...

Re: Simulate Alt/Azm movements in Equatorial mounts?


On Mon, Nov 22, 2021 at 07:27 PM, Robert Benward wrote:
Rotate your RA axis to the vertical and you're all set.  Or get a Dob.  
The Skywatcher AZ-EQ6 Pro (and some other mounts) has this capability.  Essentially, you crank the altitude screw until the RA axis goes vertical.  But it doesn't use OnStep, does it?  

Re: Sky Safari GOTO limits

Ken Hunter

Bob... Remember that EVERYTHING is SOUTH of the NCP.
You would move to an object "below" the NCP by moving East or West if your limit setup allows.

Re: Bluepill connecting


 forgot to add. I don't understand about the "but it won’t show up as mounted". I am using the arduino IDE are you? i didn't get anything when i plugged it in, but then i don't think i do for any arduino board.  i usually thing of the term "mounted" for external disc drives.

Re: Bluepill connecting


i hacve just started with a bluepill verson, 2 nights ago so new to me as well.
firstly i had to get the bits togeather in the arduino ide. there are 2 diiferent versions in the wiki depending which software you have. i had "OnStep 4.x and Later" so i did that.
there are some test files in the files section-
i tried to load the blinkey but got an error about the loader  not being there.

Please install it or add <STM32CubeProgrammer path>\bin' to your PATH environment:
found a reference to it in the thread firn july "
Help with flashing STM32 Blue Pill PCB"
i had to give an email address to get the stmloader from the link but that ran fine.
i could then load the blinky so i knew i had things set.  i had to load it then power off change the jumper and i also unpluuged and replugged the usb ( read somwher it helped rest somthing). i also changed the blink patter to check i could edit files .

i then loaded the 64k tester and that worked
loaded 128k tester that worked.
now waiting to get my clockchip connected so i can load and check onstep.
PS , still can't find the bit in wer i seem to keep changing text size accedently.


Re: Bluepill connecting

Peter Abbey

Sorry, I wasn’t clear i didn’t use the micro usb on the module, I connected it through the CP2102 and I did power it with an 18 volt  power supply via the DC-Dc converter, and I had the flash switch in the flash position.

On 23 Nov 2021, at 10:39 AM, Khalid Baheyeldin <kbahey@...> wrote:

On Mon, Nov 22, 2021 at 06:37 PM, Peter Abbey wrote:
We have tried connecting both the SHC and the main Onstep directly by USB the same as we did for the Wifi module, but it won’t show up as mounted. We are getting a little red light on the USB connection on either devise but that’s all.
You cannot flash the STM32 module from the microUSB on the module itself.
You MUST flash it through the CP2102 module on the PCB.
And there must be power applied, and the Flash/Run switch has to be on Flash.

Read the Wiki page carefully again, and follow the instructions.

Re: Hardcoded pulseguide limit?

Howard Dutton

On Tue, Nov 23, 2021 at 03:10 AM, vzr wrote:
I would still like to know why
It's been like that for so long I really don't recall exactly why other than about 16 seconds seems like a very long pulse-guide and I seriously doubted anyone would ever need more.

, and if it's safe to increase this value in the code becasue i need this for dithering with short FL (<=50mm).

I will not be patching OnStep for this but I will extend the command's time limit in OnStepX to the full int16 range.

5101 - 5120 of 43718