Date   

Re: how to program onstep into arduino mega 2560

George Cushing
 

OnStep.ino is a sketch most of the other files, libraries and sketches run inside or are called by OnStep.ino. So yes,  OnStep.ino is opened in the Arduino IDE. The IDE has to be able to find the supporting files and sub-directories.

You can get OnStep with the GitHub app or download the zipped file. I'm not sure that you can just copy and paste the file structure.


Re: Problem with SHC

George Cushing
 

I REPEAT, 95% of electronics problems are in the connections and modular connectors are worth the penny they cost. (plugs anyway)


Re: Problem with SHC

George Cushing
 

Yup, worked too late one night on a MaxESP3 and installed two 100µF 50Vs and a 100µF 35 ass backwards. When I went down with my coffee in the morning and powered the board I three loud bangs, flying aluminum casings and paper innards all over.


Re: G11 Dual Axis & G8 Single Axis Configration #configuration

"Guilherme Vênere
 

My G8 runs with direct drive steppers and since I bought my Onstep kit with the steppers and brackets ready to install on the G8 I never cared about trying a reduction before.

But as George said the resolution in this case is very close to be a bother especially for astrophotography. I had many issues with this mount before (not related to OnStep) so only now i'm starting to check how this low resolution could affect my images, but it does seem to have an effect.

If you're starting from scratch i'd recommend looking at using reduction as suggested. 

Btw my imaging setup is a 102 F7 scope with an ASI1600 which gives me close to 1.1" per pixel so the resolution above is very close to my limit.

Guilherme


On Tue, May 4, 2021 at 3:33 PM George Cushing <stm32bluepill@...> wrote:
Yes, 1/4 looks reasonable. But the Losmandy SAIA steppers are not 400 steps. I think they are 24 step, 15° angle and the gear head reduction is 120:1. They were made in India.

Then there's the power issue, 83 Ohms means what, 150mA? 

Direct drive with 400 0.9° step angle and 64 µsteps may get you 0.91 arc-seconds a second resolution. But the same motor with a 3:1 GR1 and 32 µstep is 0.39 arc-seconds a second resolution. I'd work on getting some belt and pulley set up figured out. 


Re: Problem with SHC

John Petterson
 

On Tue, May 4, 2021 at 04:37 PM, Dave Schwartz wrote:
The 12.5Hz tone on pin 3 is coming from the controller, not generated by the SHC (it only does that on pin 6 100% of the time).
Umm, no.  The SHC provides both pin 3 and pin 6 12.5 hz signals.  It looks for the much higher rate clock on pin 4 from the OnStep box, then shuts off the pin 6 tone and uses that line for its TX data.  Here is the code that does the send tone on both RAe and RAw (3 and 6).
void shcTone() {
  static volatile boolean tone_state=false;

  if (tone_state) {
    tone_state=false;
    digitalWrite(ST4RAe,HIGH);
    if (millis()-SerialST4.lastMs>2000L) {
      digitalWrite(ST4RAw,HIGH);
    }
  } else  {
    tone_state=true;
    digitalWrite(ST4RAe,LOW);
    if (millis()-SerialST4.lastMs>2000L) {
      digitalWrite(ST4RAw,LOW);
    }
  }
}

So until the controller sees the SHC's 12.5Hz tone on pin 6, responds with its own tone on pin 3 and then turns it off some seconds later and reconfigures its use of the data lines, the SHC will not be successful on sending any commands to the controller on pin 3.

OnStep actually has to see BOTH of the SHC tones before it will set up the link. It does that by starting the clock on pin 4, at which time the SHC turns off the tone on pin 6 and uses that for TX data.  Again, here is the code that detects the SHC is present:

  if (st4e.hasTone()) {
    if (!shcActive) {
      if (st4w.hasTone()) {
        pinMode(ST4DEs,OUTPUT);    // clock
        pinMode(ST4DEn,OUTPUT);    // send data
        digitalWrite(ST4DEs,HIGH); // idle
        shcActive=true;
        SerialST4.begin();
        VLF("MSG: SerialST4 mode activated");
      }
      return;

 

So its not a real cause-and-effect (the SHC is not waiting for it to go off) its just that it will not be successful at sending any commands into that noise until is gets switched off by the controller.

This is true, although it is the SHC itself that is obliterating its own send data until it sees the clock.

I can show you the dual trace oscilloscope output that prove this sequence if anyone want to see them.


Re: G11 Dual Axis & G8 Single Axis Configration #configuration

George Cushing
 

Yes, 1/4 looks reasonable. But the Losmandy SAIA steppers are not 400 steps. I think they are 24 step, 15° angle and the gear head reduction is 120:1. They were made in India.

Then there's the power issue, 83 Ohms means what, 150mA? 

Direct drive with 400 0.9° step angle and 64 µsteps may get you 0.91 arc-seconds a second resolution. But the same motor with a 3:1 GR1 and 32 µstep is 0.39 arc-seconds a second resolution. I'd work on getting some belt and pulley set up figured out. 


Re: how to program onstep into arduino mega 2560

Chris Lambert
 

OK, so I downloaded 3.16, but upon opening the folder, it has multiple other files inside, (see attached pic)
Do I just click on the file that says onstep.ino and load that?  What are the other files for? 


Re: Problem with SHC

George Cushing
 

You'll notice I have female headers on this SHC.
SHC Mule.jpg

I use this SHC to test the ESP32 modules before I solder them to a PCB. I've just received some of these "bare" boards;

bare board.jpg
The ESP32S will be mounted on the bottom and the pins aren't soldered. So these can be mounted under the board in female headers. 


Re: Problem with SHC

Dave Schwartz
 

The 12.5Hz tone on pin 3 is coming from the controller, not generated by the SHC (it only does that on pin 6 100% of the time). So until the controller sees the SHC's 12.5Hz tone on pin 6, responds with its own tone on pin 3 and then turns it off some seconds later and reconfigures its use of the data lines, the SHC will not be successful on sending any commands to the controller on pin 3. So its not a real cause-and-effect (the SHC is not waiting for it to go off) its just that it will not be successful at sending any commands into that noise until is gets switched off by the controller.

On 2021-05-04 5:08 p.m., John Petterson wrote:
On Tue, May 4, 2021 at 10:38 AM, Dave Schwartz wrote:

Well, I have to believe my own eyes.

So on further checking, the tones are separate from the send/receive exchange and display of the message on the SHC screen we were talking about.  The tones have to be there in order for the OnStep to look for data signals on the receive data line (otherwise it expects to simply debounce those lines and look for button pushes from a basic hand controller).  However, the tones themselves do not turn on the SHC - it is trying to get that first message to the onStep and get a response to tell it what coordinate mode to use.  Since the receive data line (to the SHC) is the same line that the SHC transmits its second tone on, it has to be turned off in order for the SHC to see any responses from the OnStep.  I am not sure exactly what it uses to turn that off, perhaps seeing the clock signal start to come in from the OnStep? In any case, from reading the code it appears that the messages and screen display are asynchronous to the tones on the lines that you are seeing, and they are both required for the link to come up.


Re: how to program onstep into arduino mega 2560

George Cushing
 

Go to the Wiki for RAMPS  & MKS Gen L. Not sure about the latest Beta, but v 3.16 should load. Get the Mega and the RAMPS 1.4 friendly first before diving into the rest of that Instructable. Good luck


Re: Problem with SHC

Dave Schwartz
 

The ESP32 itself (the bit with the square silver metal shield that comes from Espressif Inc. a.k.a. the MCU) is a 3.3V device but the carrier (the 'development kit C board') it is mounted on is built to operate from 5V. This is because of the 5V sourced from the USB port  which is not part of the MCU. The USB 5V can be used to run the MCU. The 5V from the USB is put through a 5-to-3.3V regulator and both those voltages are used to operate the cp2102 (yes, it has one of those) and MCU subcomponents.

When you are not operating the MCU from the USB power, external power can be supplied to either the 5V pin (which runs to the input of the 5-to-3.3 regulator (the same as from the USB) or by providing 3.3V on that pin which is normally the output from the regulator (but you will not have USB functionality because the cp2102 won't be getting its 5V reference).

Since 5V is the standard for the optional voltage on an ST4 connector that's why the power for the DevKitC module is taken from there.

The official DevKitC board uses an NCP1117 regulator which, in its 3.3V version says that the input needs to be between 4.75V and 5.3V.

So for any ESP32 SHC, if the voltage measured at the 5V pin is lower than 4.75 volts, possibly due to voltage loss in a connector or the cable) then it is not guaranteed to operate. If by some miracle it were to operate below this range, the ncp1117 regulator is only rated to supply 10ma at the best of times and therefore any button use (which by definition is shorting a pulled-up GPIO to ground and thus consuming some current) is highly likely to brown out the regulator when running with an out-of-spec input. That may be why your MCU is resetting when you hold down a button.

While the ESP32 is not rated for 5V on the GPIO lines, nearly everybody who's used one says that it is 5V-tolerant so that's why we can get away with pulling it up to 5V. And since we do it through a 2.2K resistor, the current that can be supplied to the GPIO is limited to below its 28ma 'letting the smoke out' rating anyway.

The SHC itself does not pull up the 4 signal lines - that's done on the controller. For similar reasons as above, the ESP32 will be OK with those lines being pulled up to 3.3V or 5V because the pull-up resistors there also limit the current.

Similar situation on the OnStep controller MCU on the other end of the signal lines... even if the GPIO lines there are not rated to be 5V-tolerant (all STM32's are) the current is restricted to below their 'let the smoke out' limit.

The signal voltages don't have to go between exactly 0 and 3.3V to be logic high or low. All MCUs will have a similar spec but for the ESP32-WROOM-32, 'low is anything below .25xVdd and 'high' is anything above .75xVdd (when Vdd = 3.3V, low <= 0.825V and high >= 2.475).

The diagnostics sketch is in the assembly document: https://docs.google.com/document/d/1Yqapj0lpiI2ryzUzsBS99wqcaYcddTj4RX0LUBaBIEE/edit#heading=h.aewrbh38x497

On 2021-05-04 3:12 p.m., Ken Hunter wrote:
// Switching the probe to pin 3 on the next session, a 12.5Hz square wave appeared there shortly after OnStep started. This waveform persisted for about 15 seconds and then disappeared. The SHC display going from // 'Establishing connection' to the main information display coincided with the 12.5Hz waveform on pin 3 going away. I see the intermittent square waves until I press the joystick for 2 seconds then ALL GOES AWAY, nothing after that. One thing I noticed is that I do not have 5 volts on Pin 1 or pin 3. It is more like 3 volts p/p.

Still some of the SHC's work, some don't.

Where is the "button Test" sketch hiding?

Ken


Re: Problem with SHC

John Petterson
 

On Tue, May 4, 2021 at 10:38 AM, Dave Schwartz wrote:
Well, I have to believe my own eyes.
So on further checking, the tones are separate from the send/receive exchange and display of the message on the SHC screen we were talking about.  The tones have to be there in order for the OnStep to look for data signals on the receive data line (otherwise it expects to simply debounce those lines and look for button pushes from a basic hand controller).  However, the tones themselves do not turn on the SHC - it is trying to get that first message to the onStep and get a response to tell it what coordinate mode to use.  Since the receive data line (to the SHC) is the same line that the SHC transmits its second tone on, it has to be turned off in order for the SHC to see any responses from the OnStep.  I am not sure exactly what it uses to turn that off, perhaps seeing the clock signal start to come in from the OnStep?  In any case, from reading the code it appears that the messages and screen display are asynchronous to the tones on the lines that you are seeing, and they are both required for the link to come up.


Re: Blue Pill Upgrade: RobotDyn F303CC

George Cushing
 

So, $10.50 plus VAT, shipping and the cost of the original board. Pretty soon you could buy a Teensy. Or half a dozen ESP32s. I don't think I'll be rushing to buy any ST32 boards in a hurry.

I have 30 of Roman Hujer's ESP R3-Shields that I will be selling assembled and tested for $25 without the RTC and Wifi and $32.50 with. The shield replaces the CNC 3 Roman rerouted the pin assignments to get more functions out of the board. It supports goto, guiding, RTC, WiFi, BT, SHC, PEC, and your choice of OneWire, buzzer, reticle port Or status or 2 on Aux 8.

UNO-r3.jpg

Only one power supply/connection is needed and I believe it supports TMC drivers. The advantage of the STM32 was it's low cost and good feature support. As it pushes toward $45 to build one the ESP3 R3/Hujer PBC becomes an attractive replacement and it is easy enough to build that I hopefully can keep up with demand. I regretted having to turn away folk who wanted to do OnStep but didn't feel that they could. 




Re: how to program onstep into arduino mega 2560

Chris Lambert
 

ok, so i didnt realise it was a very old version i was trying to use. 
so if i just downloaded say the beta version and loaded that into it, should that work? or would i need additional files etc. 
is there also a way to see if my arduino already has files loaded into it?


Re: how to program onstep into arduino mega 2560

Chris Lambert
 

im using the mega 2560 as mentioned in my 1st post


Re: recommended board etc.

Martin Chapman
 

Thanks for the info, John, the ISS thing is just an idea, something to do with the other mount, though, I could always sell it to fund more stuff, I guess.
Cheers.
Mart.

On Tue, May 4, 2021 at 4:41 PM John Petterson <j.petterson@...> wrote:

Martin,
The advantages other boards like the S6 would have would mostly show up in slewing speed. I started with MKS based OnStep and now have all FYSETC based devices,  It is faster and the programming is pretty simple.

I recently sold a Celestron 9.25" scope to someone who wanted it to capture the ISS as his other scopes were not doing that job well.  He paid to ship it to the middle east near the Suez Canal, and I have seen the pictures he took with it.  I am not sure how well a standard camera lens is going to fare with that job, it will be interesting to see.


Re: Problem with SHC

Ken Hunter
 

From the CNC3 WIKI instructions...


ST4 interface:This is enabled by setting ST4_INTERFACE  ON in the configuration file.  If the ST4_HAND_CONTROL ON option is used additional capabilities become available, read the configuration file for more information.  The order of most pins match those of the RJ12 jack they should be connected to (search eBay for "RJ12 breakout"):

Pin 1: +5v or NC
Pin 2: Gnd
Pin 3: RA- (I34)
Pin 4: Dec- (IO18)
Pin 5: Dec+ (IO4)
Pin 6: RA+ (I35)

Note: you MUST add 2k pull-up (to 3.3V) resistors to each ST4 line (RA-, Dec-, Dec+, RA+.)  You can how one user added the pull-up resistors here.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is after removing the resistor because the ESP32 is NOT a 5 volt device...

Could the "Borderline" operation be due to this?


Re: Problem with SHC

Ken Hunter
 

// Switching the probe to pin 3 on the next session, a 12.5Hz square wave appeared there shortly after OnStep started. This waveform persisted for about 15 seconds and then disappeared. The SHC display going from // 'Establishing connection' to the main information display coincided with the 12.5Hz waveform on pin 3 going away.

I see the intermittent square waves until I press the joystick for 2 seconds then ALL GOES AWAY, nothing after that. One thing I noticed is that I do not have 5 volts on Pin 1 or pin 3. It is more like 3 volts p/p.

Still some of the SHC's work, some don't.

Where is the "button Test" sketch hiding?

Ken


Re: G11 Dual Axis & G8 Single Axis Configration #configuration

Khalid Baheyeldin
 

On Tue, May 4, 2021 at 07:20 AM, Kokoro San wrote:
another one is G8 with 180 teeth + gear reduction 150:1
That is your problem: extremely high gear reduction.

I also have a mount with a 180 worm wheel (Vixen SXD), and use 200 step motors
with 18:1 gear reduction.

My spreadsheet is like this:

200 step, 1/32, 18:1, 180 = 57600 steps per degree.

This is close to the 61,200 recommended limit.

For you to get that, you need:

200 step, 1/4, 150:1, 180 = 60000 steps per degree.

If you use a TMC StepStick it will do interpolation of microsteps, and 1/4 may work.

So the TMC5160 should work, in theory.

But per the spreadsheet, at 3 deg/sec slewing, the motors are doing 13,500 RPM, and
would most likely stall at this speed. Reducing the slewing speed to 1 deg/sec makes
it 4,500 RPM. Maybe that would work.

But you are certainly better off with less reduction. Somewhere between 10:1 to 15:1.


Re: New in the group

Mike Ahner
 

On Tue, May 4, 2021 at 06:00 AM, andrea tasselli wrote:
You would still need to use 4.24 Master
The one feature in v4.x that I like and use regularly is the spiral search, especially during alignment and at other times when the object just isn't in the field of view.
-Mike

1561 - 1580 of 34576