Firmware issues. We are halfway working! But in need of help

I am a newbie and have managed, somehow, to get to some of the final steps of making the rotator. I have been working on getting the firmware up and running. I struggled through these steps and did not get them all to work perfectly. I used a buspirate and FTDI. I got to the point of uploading the code with the FTDI.

I did have success using the arduino IDE. Would only upload with “Arduino Pro Mini” selected as the board:thinking:. Code does not upload when the SatNOGS board is selected. I have added some Serial.print lines to try and help debug. When the arduino is disconnected things work fine. The serial monitor is showing my print commands when 19200 is selected. As soon as the board is connected to the PCB the serial monitor is scrambled at all baud rates. However the homing sequence does start for the motor 2. When the homing switches are disconnected the serial monitor acts differently and is slightly less scrambled.

I have the PCB soldered for UART and full steps (nothing on R4/7 or JP1-6). I am using stepper motors and mechanical homing switches. I have tested the motor pins with an oscilloscope and am getting square waves at 12v.
Other notes that might be relevant. During the homing sequence the rotator is going in what I would think to be the wrong direction. It binds the homing switch that I have installed in the same way described. Motor wires have been connected as seen here.
Stepper motor drivers seem to be creating significant heat. The controls on these have been tested as well.
“Pre-Fight Check” of voltages came back fine. With arduino connected VCC was checked on the board to be 5V.

Hope this is enough information!

1 Like

Hey! Have you burn to Arduino pro micro the optiboot bootloader? Is it the correct board,
Arduino pro-mini 5V - 16MHz clock? Also, do you have the results of the commands as
referred in troubleshooting in wiki.

In order to change the direction, swap the pair of two cables.

Adjust the current limit as referred in wiki.

I do have the correct board. I can not send serial commands as the troubleshooting tips state when the Arduino is on the PCB. It does work when it stands alone as mentioned.

I ran into a lot of issues with the bootloader directions. I believe that I did burn the bootloader but since the code only uploads when “Arduino pro mini” board is selected and not the “SatNOGS” makes me think that it did not work as I had thought now. Would the code still compile and upload with the standard bootloader?

With some help I have worked my way though this. Seems the Arduino pro mini (from sparkfun 5V/16MHz) pin assignment was different so we changed this in rotator_pins.h library.

#ifndef ROTATOR_PINS_H_
#define ROTATOR_PINS_H_

#define M1IN1 6 ///< was 10 Motor 1 PWM pin
#define M1IN2 5 ///< was 9 Motor 1 PWM pin
#define M1SF 7 ///< Motor 1 digital input, status flag
#define M1FB A1 ///< Motor 1 analog input, current/load feedback

#define M2IN1 11 ///< Motor 2 PWM pin
#define M2IN2 3 ///< Motor 2 PWM pin
#define M2SF 6 ///< Motor 2 digital input, status flag
#define M2FB A0 ///< Motor 2 analog input, current/load feedback

#define MOTOR_EN 8 ///< Digital output, to enable the motors

#define SW1 9 ///< was 6 Digital input, to read the status of end-stop for motor 1
#define SW2 4 ///< 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 baud rate also needed to be changed in easycomm.h library.

#define BAUDRATE      57600

Hey!

According to the wiki, maybe you have an unreleased version of the board (the board that has fuse holder), in community post you can find pin configuration file.

This issue is same with this Serial communication between Arduino UNO and Rasp Pi3 [Help needed].

1 Like

Hello again, another issue I seem to be having. The rotator seem to be working with the FTDI when using the Arduino IDE serial monitor and when I used the screen through the raspberry pi terminal. Yet when using the rotctl commands on the raspberry pi I can not get movement. I am a bit stumped. It is working at 19200 baud rate on both the IDE and screen on the pi.