Can I use SatPC32 with my SatNOGS rotor?

OK, I have built a SatNOGS rotor and have it working; that is, I can send serial commands and make the rotor go to commanded AZ and EL and PARK it, and so forth. Now I need to know what to do next.

  • Can I use the AMSAT program SatPC32 (I own a copy) to control this rotor? If so, which of the many rotor control protocols is right for the SatNOGS unit?

http://hamlib.sourceforge.net/manuals/hamlib.html#rotctld-protocol

I’m fairly new, someone please correct me if I’m wrong…
the SatNOGS rotor uses the HAMlib library for protocol/control language

I am controlling my rotor using Gpredict, on my windows PC (which looks very similar to your SatPC32 program)… It might be worth looking into the similarities between those two, but Gpredict was very easy to get working with the rotator.

Here are some additional things I have learned. The SatNOGS rotor controller actually responds to a set of rotor commands called easycomm. This is supported by Hamlib. So far, from everything I can tell, SatPC32 does not talk to Hamlib. However, I found a solution: SatPC32 publishes its data (such as satellite name, realtime AZ, EL and frequencies) using the DDE protocol. I found a C++ program which is able to connect to the SatPC32 DDE data feed and get the data (say once per second); with a little additional code, I believe I will be able to extract the data from the SatPC32 DDE telegram and send the necessary stuff to the SatNOGS controller thru the serial port. The easycomm protocol is very straightforward (the commands are all published and you can even look at how they work in the Arduino compiler).

That said, I certainly do appreciate the reference to Gpredict, and I will be looking at that program. (I’d just like to continue to use SatPC32 to support AMSAT if I can). -thanks!- Bill, AB4EJ

good to know! Once you’re at that point, you may have to make changes to easycomm.h to communicate directly over serial (or at least I had to). I recently edited easycomm.h to use serial commands instead of the RS485 protocol it normally uses to communicate with the Pi. basically replacing ‘rs485’ with ‘serial’ did the trick you can probably find the modified easycomm.h in my post history if need to reference.

Good Luck!

I am having a problem with my (almost completed) rotator. It is a V2 design (uses the older design with 2 stepper motors and 2 Pololu A4988 stepper drivers). I used the V2 PC board design, but I am using an external 12v power supply and external serial interface, because I had problems with the board build, so wired these in (having cut the traces to the original circuits on the board.) I have used all the parts specified in the V2 hardware BOM.

Help!

When I power up the system, it successfully homes (although it usually takes a couple of tries unless it was powered off in the home position). Using the putty serial terminal I can send commands to the Arduino and see the result on the screen(like status, version, AZ-EL position).

I can send azimuth and elevation commands (AZnn and ELmm); the rotator tries to comply but something goes wrong somewhere. For example, let’s say the rotator is in home position and I send AZ90. The azimuth moves to about 20 degrees and stops for several seconds (with the stepper motor making a loud high-pitched hum), and then moves to about 45 degrees… or maybe 90. Then I send AZ0. It tries to come back, again stopping part of the way back and screaming for a few seconds, and comes back to about 15 degrees (not all the way back to home).

Some things that occurred to me (first I need to tease out if this is a hardware or software problem)

  • H/W maybe the 12v power supply I have is not able to supply enough current to reliably move the motors at full speed.
  • H/W maybe I have the max current setting pots on the stepper driver cards set wrong.
  • S/W maybe there is a configuration or setting I need to make so that the Arduino sends the right pulses to the steppers, and/or has a different max speed or pulse width. (Examples: the Pololu stepper says it supports up to a step resolution of one sixteenth step. The firmware V2.2 has a variable MICROSTEP of 8. Maybe wrong? Firmware also has MAX_SPEED=3200 steps/sec, Steps per revolution=1600, MIN_PULSE WIDTH=20 microsec.; I suppose that any one of these being wrong could cause these symptoms).
  • S/W maybe the firmware I have is for a later version of the hardware that has a different gear ratio (seems unlikely)
  • S/W maybe it is insane trying to control this system using manually supplied commands, because it needs a bunch of config items to be sent by hamlib before it will move correctly (seems unlikely)

Any ideas on where I should debug first?

I have noticed a very similar issue with mine. isuspect it is because mine is not using the correct stepping (i.e. not using microstepping) Trouble is for me at the moment is that I don’t have enough jumpers floating about. Some are in the post. Is this a similar situation?

Lovely noise isn’t it :wink:

Hey!

Move stepper motor without load (unscrew the pulley of motor).

Tune the current of stepper motor driver

Tune max speed and acceleration,

Are you using this firmware?

1 Like

Very similar. Did you also notice that the axis goes to the wrong position? (See further discussion below)

Move stepper motor without load (unscrew the pulley of motor).

This rotor has no pulley. A worm gear drives the axis directly.

Tune the current of stepper motor driver](Pololu stepper driver board - RepRap)

I will try this again.

Tune max speed and acceleration,

I will try this and post result.

Are you using this firmware ?

No. I am using firmware from the following. The firmware you refer to seems to be written in c. The firmware I’m using is Arduino.
https://gitlab.com/librespacefoundation/satnogs/satnogs-rotator-firmware

According to wiki this firmware hasn’t been tested in v1 board. So you can try the suggested firmware and if all the system works, try to port this firmware to v1 board.

According to wiki this firmware hasn’t been tested in v1 board.

Well, now it has! I have tested it. And here is what I found…

The firmware works fine with this V1 board, except that you must tune the settings, just as azisi suggested.

Setting / Original Value / New Value
MICROSTEP / 8 / 16
MIN_PULSE_WIDTH / 20 / 20 (unchanged)
MAX_SPEED / 3200 / 1600
MAX_ACCELERATION / 1600 / 1600 (unchanged)
SPR (steps per revolution) / 1600L / 200L

The post from g7kse (which showed same symptoms as mine) suggests that the max speed is set higher than the stepper can handle, so reduce max speed. The whining cry from the motor is it telling us that it is getting steps at a higher frequency than the motor is designed for.

My unit was also going to the wrong locations - rotating much more than desired. This was because the steps per revolution was way off.

Now the device goes to where it is supposed to go, and without hanging up. I do notice that the stepper controller heat sinks get very hot - may be normal… I will still go back and check the current settings.

Anyway, I am working on a utility that will allow you to use the AMSAT SatPC32 satellite tracker (which does not, by itself, support hamlib or easycomm) with the SatNOGS rotor; I will post something about this when it is working. -thanks & 73- Bill, AB4EJ

1 Like

Nice! It would be great to update the wiki with above steps! :beers:

1 Like

When I look more closely, I see I am wrong about something - the PCB I have is apparently V2 (see post by g7kse about additional V2 boards being available - I got my PCB from him). So, I did not update anything in the wiki. I did have to change some of the pin assignments from the firmware to match the pin wiring on the board. (There may be other issues, as I have not seen values other than zero coming from the temperature sensor on the PCB, but I am fuzzy on the purpose of that anyway). Will keep u posted…

Major progress to report here. I have my program running under Windows which gets the DDE tracking feed from SatPC32 and sends easycomm-compatible commands to my SatNOGS rotor controller; so I can now track the amateur radio satellites. (If you are a Linux-only kinda guy, you won’t care anything about this.) I have ordered an Arrow II dual band antenna, and will adapt this to the SatNOGS rotor. (Note for future improvement: I need to add another servo to rotate the antenna on its own access to compensate for the attitude of the antenna on the satellite. There is a very nice example of how to do this here. I For a complete system, I would also need to add the capability to dynamically adjust the transceiver frequencies from SatPC32 also, but that is a project for another day…

Further progress… now I have the RTL-SDR (temporarily connected to a vertical VHF antenna) and Raspberry Pi 3 running the SatNOGS package. It has been able to copy signals from several satellites and upload to the SatNOGS database, and I can see the results in my account. Today, I configured the RPi to do rotor control and the completed rotor came to life on schedule and tracked OSCAR-7 ! Looks like it followed the right track, as the realtime rotor angles appeared to match the AZ-EL computed on PC using SatPC32. What’s remaining: I am waiting to receive a tripod I plan to mount the rotor on, and an antenna. This will be a phase 1 antenna based on the Arrow; later, will upgrade with the homebrew helical.

1 Like

Hello,
did you get a solution to connect SatPC32 via hamlib/rotctld via SatPC32-DDE? I am very interested in this, because I would like to use a rotator, which understands rotctld. Thanks a lot!
regards,
Suitbert, DF2PI