Contents

Controlling the rotator as a stand alone system using GPredict

The SatNOGS rotator is primarily designed to be used as a system component that is part of a SatNOGS ground station. There may be occasion when it is desirable to have a stand alone ground station that is removed from the SatNOGS network. This can be done using existing equipment but can also be simplified using off the shelf components.

The following information is to connect your Rotator controller DIRECTLY TO A PC. If you'd like to still use it with the Raspberry Pi then you must keep the RS485 protocol in place.

We will need slightly different hardware and modified software to achieve this, the main changes will be to remove the RS485 and watchdog parts of the firmware. We will be using the following items:

Hardware

SatNOGS Rotator V3.1 hardware

Arduino Uno R3

CNC Shield V3 with A4988 drivers

NEMA 17 Stepper Motors

2x microswitches

Suitable 12v power supply (The shield will accept between 12v and 36v)

Cables to connect the Arduino to the PC

Software

For the purposes of this article we will be using Windows software. The same result can be achieved with Linux or Mac OS but for clarity these options have been ignored for the time being. We will need:

A copy of the Arduino IDE (version 1.8.5 has been used as part of this tutorial)

Method

Hardware setup

We will not be using the custom SatNOGS PCB. Instead this set up uses an Arduino Uno and CNC motor shield. There is very little assembly required but depending on how and where you buy from will depend on the amount of assembly is required. Typically the Arduino will need no assembly, The motor shield will need two A4988 drivers (these can come as part of the package). These are used in the X & Y headers as per the photograph below. The drivers fit into the female headers, note that there are jumper headers below these drivers that are used for stepping control. We will also be attaching the stepper motor cables to the male headers to the left of the driver boards.

Photo of board

Pinout of the 4 headers is as follows starting from the top

Pin 1 - A

Pin 2 - A+

Pin 3 - B

Pin 4 - B+

This follows a convention so most steppers should plug directly into the header without any changes, but be aware that this is not always the case and that there may be some cases where pins are incorrectly noted and the steppers will drive in the opposite direction.

The setup is very basic but be careful not to bend pins as this can be easily done if too much pressure is put on the boards when things are no aligned. They aren't always perfect!

In the end you should have:

Azimuth Stepper Driver/motor connected to Y port on CNC Board

Elevation Stepper Driver/motor connected to X port on CNC Board

The End stop switch for elevation is connected to the X end stop on the CNC board (+ or -)

The End stop switch for azimuth is connected to the Y end stop on the CNC board (+ or -)

Software setup

Code modifications

For the time being there is no fork of the firmware in the repositories. This may change in the future but for the time being a small series of changes are required to achieve results. We will need to modify two elements of the firmware, easycomm.h and rotator_pins.h. These changes are necessary to stop their being conflicts with the communication between boards and PC as well as re-assigning pins to match the CNC shield. We'll modify the rotator_pins.h first. Note the use of comments (//) to remove lines of code. We have also changed pin designation to match the shield.

The next code edit will remove both the RS485 and watchdog elements from the easycomm.h code. This will allow the PC to talk directly to the Arduino and as such bypass the RPi. The edited code is below, note again the use of comments (//) to remove the lines

/*!
* @file easycomm.h
*
* It is a driver for easycomm 3 protocol as referred, in Hamlib.
*
* Licensed under the GPLv3
*
*/

Software to install

Final pieces to the preparation work are to install a couple of pieces of software. firstly Hamlib. This will be used to communicate between GPredict and the Arduino. Secondly we will install the main prediction software, GPredict. We will not be going into detail about setup of GPredict but assume that you have followed the installation guide and had a play around with it so you can understand what it is and how it works.

Install hamlib

Download the Hamblib software and follow the installation process. this may require you installing it with Administrator rights. using device manager find the port for the Arduino, for the purposes of this we will assume it is COM7

Using a text editor, like Notepad++, to create a file with the code below in it. Note where COM7 is and amend with your own COM port. Save as a batch file (i.e. with th extension .bat file in the same folder as rotctld (Usually found in C:\Program Files (x86)\hamlib-w64-3.2\bin )