Thank you for the information and recommendations.
Upon visiting the Terrans website, I came across an interesting discovery regarding the firmware for the pro version. It seems that it is not in binary format, which led me to perform a comparison with the official OnstepX firmware. The pinout information should be discernible in it.
I downloaded the necessary files from the following URL:
As you previously mentioned, there is a parameter in the "GUIDING BEHAVIOR" section with the line "#define GUIDE_TIME_LIMIT 10." This appears to explain the issue of the slewing stopping prematurely. If my understanding is correct, it is possible that this behavior is also related to the polar alignment problem.
I have configured the Arduino IDE and plan to attempt flashing the ESP32 with a different time limit.
I updated the firmware on my controller, modifying the #define GUIDE_TIME_LIMIT value to 40, and it seems to have resolved the issues with slewing and polar alignment. However, I'm not sure if the values for #define AXIS1_STEPS_PER_DEGREE and #define AXIS2_STEPS_PER_DEGREE are correct, so I obtained them from the web interface. I plan to conduct some tests to verify the accuracy of these values.
Thank you, this is at least a prove that flashing is possible with their source code.
Concerning AXIS1_STEPS_PER_DEGREE and AXIS2_STEPS_PER_DEGREE,
it a value that is calculated based on:
motor STEPS (most probably 400)
chosen µSTEPS (usually 32)
gear RATIO (depends on your mount, is the ration between motor and worm)
and WORM (depends on mount, is the number of rotations of the worm for 360°)
STEPS_PER_DEGREE = (STEPS * µSTEPS * RATIO * WORM)/360 (in spreadsheet)
@Andrew, @ Denis, @Ettore
It seems Spas did at least solve the slewing issue .
When it come to share the procedure to flash a firmware to the "Terrans" controller there are several things to say:
1) The Procedure to set the jumpers on the "Terrans" controller is described by "Terrans" (see their Download page)
2) The procedure to flash is also described by "Terrans" in the same location
3) The procedure on howto modify the sources, compiling and flashing is out of the scope of this forum.
4) People willing to learn howto about onStep are invited to read the Wiki at onstep.groups.io/g/main/wiki/15166
// GUIDING BEHAVIOUR
#define GUIDE_TIME_LIMIT 0 // 10, n. Time limit n=0..120 seconds. Use 0 to disable. Adjust
#define GUIDE_DISABLE_BACKLASH OFF // OFF, Disable backlash takeup during guiding at <= 1X. Option
And try as soon as possible.
INDI/KStars on Raspberry Pi 4, 4gb
Raspberry Bull 64bit
Mipi IMX462 raspberry autoguide
The firmware update procedure is straightforward. As far as I know, the board is nearly identical to the MaxESP Version 3, so we can use its instructions. I will outline my procedure below. I have only tested the mount control and guiding since I don't plan to use the focuser and rotator capabilities.I tested the procedure only on Terrans Pro board!
I've placed all the necessary files in the following link: drive.google.com/drive/folders/1-4CYK5T9...nSzOEJJKWHxmAypjo3_N
If something goes wrong, we can restore the original firmware using the ESP32 flash download tool, which is located in the same folder. I've tested this process many times without any issues but use it at your risk!
To update the firmware via the Arduino IDE, follow these steps:
1. Install Arduino IDE.
2. In the Arduino IDE, go to File > Preferences, and add the following URL to the "Additional Boards Manager URLs" box: raw.githubusercontent.com/espressif/ardu...age_esp32_index.json
3. In the Arduino IDE, navigate to Tools > Board > Boards Manager and install the ESP32 support. I installed version 220.127.116.11.
4. Go to Sketch > Include Library > Add .ZIP Library, and browse to install 'DFRobot_SD3031-master.zip,' which is responsible for the RTC module.
5. Download and unzip 'OnStepX_1.zip.'
6. Open the Arduino IDE, go to File > Open, and select the 'OnStepX' folder. Then, open 'OnStepX.ino.'
7. In the 'Config.h' file, make the following modifications according to your preferences:
// I'm not sure if this is necessary
#define SERIAL_B_ESP_FLASHING ON
// Obtain these values from the Web Server before flashing:
#define AXIS1_STEPS_PER_DEGREE 3840
#define AXIS1_DRIVER_MICROSTEPS 16
#define AXIS2_STEPS_PER_DEGREE 3840
#define AXIS2_DRIVER_MICROSTEPS 16
#define GUIDE_TIME_LIMIT 40
#define TRACK_AUTOSTART ON
8. In the Tools menu, select the following options:
Boards: ESP32 Dev Module
CPU Frequency: 240MHz
Partition Scheme: Huge App
Port: Choose the device's USB serial port (the one that appears only when you plug in the USB cable going to the controller.)
9. Click the "Verify" button (the green checkmark icon).
10. If there are no errors, click "Upload."
11. When the "Connecting.............." message appears, hold the ESP32 button and briefly press the EN button. After the procedure completes, release the button and restart the device.
12. Connect to the board via INDI and verify communication.
BTW I had the opportunity to test the upgraded CG5 mount and controller from my balcony, and I'm very pleased. The ONSTEP project is truly amazing!
I captured numerous 120-second frames with my Celestron C8 using a Starizona x0.7 reducer (1430mm focal length), and all of them had rounded stars. The RMS ranged between 0.45 and 0.7. I guided the setup with a 50mm guider. I achieved similar results with my ZWO AM5 mount:).
Thank you very much fro your effort and really detailed report.
That will hopefully help people to solve some issues with the "Terrans" controller by themselves.
You are right, OnStep is a great job and we can thank you Howard and all the active members on
It required quite a lot of skills starting from electronics to software development and mechanics and many others.