We are building a SatNOGS Rotator v3.1 with cnc shield with respect to Quartapounds SatNOGS Rotator. All of the electronic parts are tested, and they work well. However, there is a firmware issue which is not solved yet. Libraries are uploaded into the arduino correctly from here. When arduino gets power, motors start to turn. I think they are trying to reach their initial positions. After that, we are trying to send comments by hamlib(rotctl) and Gpredict. Actually both of them reads position of motors differently. They took comments and change angles. That change can easily followed from windows. In real, motors do not turn. Programs thought motors are turning but they aren’t. How do we solve this problem?
I wish I could help… it’s quite strange that it moves and controls the motors when you reset the arduino, but not when you send commands… I never had this issue. all I can say is… I’m trying to get a different version of software working right now too. mine works great with my setup, but it has the meridian pass issue. I am trying to get the meridian pass software working right now (so far without success)
In summary I have the same issues like @UTAA-Astro and I can’t move my stepper motors neither ‘rotctl’ command neither GPredict. I haven’t any errors but nothing happens.
rot_init called
initrots3_easycomm called
rot_register (201)
rot_register (202)
rot_register (204)
rot_token_lookup called
rot_confparam_lookup called
rot_set_conf called
rot_confparam_lookup called
rot_set_conf: timeout='500'
frontrot_set_conf called
rot_token_lookup called
rot_confparam_lookup called
rot_set_conf called
rot_confparam_lookup called
rot_set_conf: retry='0'
frontrot_set_conf called
rot_open called
serial_open called
serial_setup called
rig_strstatus called
Backend version: 0.4, Status: Beta
When I start GPredict and engadged to the rotor system, the next messages are added to the console:
Connection opened from localhost:55692
rotctl(d): p ‘’ ‘’ ‘’ ‘’
rot_get_position called
easycomm_rot_get_position called
easycomm_transaction called: AZ EL
serial_flush called
write_block called
write_block(): TX 7 bytes
0000 41 5a 20 45 4c 20 0a AZ EL .
read_string called
read_string(): RX 18 characters
0000 41 5a 2d 31 38 34 2e 37 20 45 4c 2d 31 38 30 2e AZ-184.7 EL-180.
0010 30 0a 0.
easycomm_transaction read_string: AZ-184.7 EL-180.0
easycomm_rot_get_position got response: AZ-184.7 EL-180.0
rotctl(d): P '180,00' '45,00' '' ''
rot_set_position called
easycomm_rot_set_position called: 180.000000 45.000000
easycomm_transaction called: AZ180.0 EL45.0 UP000 XXX DN000 XXX
serial_flush called
write_block called
write_block(): TX 35 bytes
0000 41 5a 31 38 30 2e 30 20 45 4c 34 35 2e 30 20 55 AZ180.0 EL45.0 U
0010 50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58 P000 XXX DN000 X
0020 58 58 0a XX.
rotctl(d): p '' '' '' ''
rot_get_position called
easycomm_rot_get_position called
easycomm_transaction called: AZ EL
…
The only diference is I’m using DRV8825 drivers instead of A4988. All the hardware components are working fine as I’ve used them in a CNC control machine too without problems.
Hi again,
I modify my stepper_motor_controller.ino without success as follows:
#define SAMPLE_TIME 0.1 ///< Control loop in s
///#define RATIO 108 ///< Gear ratio of rotator gear box default 54
#define RATIO 1
///#define MICROSTEP 8 ///< Set Microstep
#define MICROSTEP 1
#define MIN_PULSE_WIDTH 20 ///< In microsecond for AccelStepper
///#define MAX_SPEED 3200 ///< In steps/s, consider the microstep
#define MAX_SPEED 800
///#define MAX_ACCELERATION 1600 ///< In steps/s^2, consider the microstep
#define MAX_ACCELERATION 200
///#define SPR 1600L ///< Step Per Revolution, consider the microstep
#define SPR 200
#define MIN_M1_ANGLE 0 ///< Minimum angle of azimuth
#define MAX_M1_ANGLE 360 ///< Maximum angle of azimuth
#define MIN_M2_ANGLE 0 ///< Minimum angle of elevation
#define MAX_M2_ANGLE 180 ///< Maximum angle of elevation
#define DEFAULT_HOME_STATE LOW ///< Change to LOW according to Home sensor
#define HOME_DELAY 12000 ///< Time for homing Deceleration in millisecond
Some commands I run
rotctl -m 202 -r /dev/ttyACM0 -s 9600 -t 10
The stepper motor drivers are connected in correct pin and are defined correct in firmware? When the controller is powered up press the endstops. Then communicate again with controller.
I’ve connected X+ and Y+ endstops with green and black connectors as the picture shows.
The pin connectors are defined as original rotator_pins.h without changes:
/*!
* @file rotator_pins.h
*
* It is a header file for pin mapping.
*
* Licensed under the GPLv3
*
*/
#ifndef ROTATOR_PINS_H_
#define ROTATOR_PINS_H_
//#define M1IN1 10 ///< Motor 1 PWM pin
#define M1IN1 2 ///< Motor 1 PWM pin
#define M1IN2 5 ///< Motor 1 PWM pin
#define M1SF 7 ///< Motor 1 digital input, status flag for DC Motor Drivers
#define M1FB A1 ///< Motor 1 analog input, current/load feedback for DC Motor Drivers
#define M2IN1 3 ///< Motor 2 PWM pin
#define M2IN2 6 ///< Motor 2 PWM pin
#define M2SF 7 ///< Motor 2 digital input, status flag for DC Motor Drivers
#define M2FB A0 ///< Motor 2 analog input, current/load feedback for DC Motor Drivers
#define MOTOR_EN 8 ///< Digital output, to enable the motors
#define SW1 11 ///< Digital input, to read the status of end-stop for motor 1
#define SW2 9 ///< Digital input, to read the status of end-stop for motor 2
#define RS485_DIR 2 ///< Digital output, to set the direction of RS485 communication
#define SDA_PIN 3 ///< I2C data pin
#define SCL_PIN 4 ///< I2C clock pin
#define PIN12 12 ///< General purpose I/O pin
#define PIN13 13 ///< General purpose I/O pin
#define A2 A2 ///< General purpose I/O & analog pin
#define A3 A3 ///< General purpose I/O & analog pin
#endif /* ROTATOR_PINS_H_ */
The stepper motor drivers are connected and defined correct.
Remove the previous block of code from void setup() and from rotctl send a command IP1 and IP2 to read the end-stops.
commenting these lines now I can work with the stepper motors and I can move them into command line and GPredict. However I realize that motors are consuming even when they stopped so it’s not very effective.
When I push end-stops before the controller starts does nothing.
At all I see that I have to tune the end-stops a bit in the code.