School Amateur Radio Club Network

☰ Menu

Related Information

Please try this: New Mini Satellite-Antenna Rotator Release 4 Software

Mini Satellite-Antenna Rotator

This project is a portable device used to automatically point a directional antenna towards an orbiting satellite. It takes all the effort out of little kids holding the antenna and figuring out where to point it. It allows students to talk through Amateur Radio satellites or download weather satellite images.

Here is the whole SARC crew out on the playground at lunchtime with Julie and Mr. Michael Day, their principal. They are using our solar-powered, portable, amateur radio satellite receiving station to communicate through AMSAT FO-29. Let's see what they've got going:

  • 20W solar panel
  • 10A MPPT Solar Charge Controller
  • 12V 7AH SLA Battery
  • 12V-USB Power Converter
  • Raspberry Pi, running Gpredict and Hamlib rotctld/rigctld
  • LCD Monitor, Mouse and Keybaord
  • Dual-band Arrow antenna
  • FT-817 transceiver
  • Our Mini Satellite-Antenna Rotator

SARC Satellite Receiving Station SARC Solar Powered Satellite Receiving Station


Here is the draft of our original article which appeared in the May 2016 edition of Amateur Radio magazine.

Parts List (Standard Version)

Parts List Standard Version

Parts List (Value-Engineered Version: Requires Version 5 Software)

Parts List Value Engineered Version

Project Status (Updated 20 November 2107)

Please update your status by e-mailing us.

Latest Software - Release 4

Release 1: Original release

Release 2: Added support for hamlib 3.0.1. Added debug mode.

Release 3: Improved calibration and operation

  • Added a low pass filter to the sensor data to improve calibration.
  • Reinitialised the I2C bus and sensor prior to each read to avoid I2C lockups caused by power glitches
  • Changed Serial to Serial1 for RS-422 operation

Release 4: Improved calibration and operation

  • Fixed a bug reading the EEPROM calibration data on some versions
  • Made the SerialPort configurable to support both the MkI (USB) and MkII (RS422) rotators
  • Added a speaker output to help with the calibration process
  • Removed the overshoot inherent in the anti-windup algorithm
  • Initialised the sensor filters at start up
  • Added a pause command, as requested
  • Added a help menu, as requested
  • Clarified sensor axis definitions, which were confusing

Release 5: COMING SOON. Changes to support value-engineered version

  • Added support for either the original LMD18200T or the cheaper L298N DC Motor H-Bridge Driver Boards
  • Added compiler option to set the board type and the pins used
  • Note: Only PWM pins 3, 5, 6, 9 or 10 can be used for PWM output
  • Added two different drive() functions
  • Added support for either the original LSM303D or the cheaper LSM303DLHC Accelerometer Magnetometer

Download the latest software here.

Status reported by builders

  • Total number of reported builders: 120
  • The following is a list of builders who have reported completing the rotator:
    1. Brian VK2XTC
    2. Adrian VK4KL
    3. Roger VK4YB - Built it for Owen, VK4FADW and the kids at the Caboolture Historical Village. Good job Roger! Here is the result:


    1. Frank VK2FRW - Well done Frank. Had a problem with one motor gearbox. Frank reports it works OK with HRD. Here is a photo:


    1. Colin VK3VGB - "I have completed your Mini Satellite - Antenna Rotator project and it’s just the best !!"

Colin VK3VGB's rotator in his livingroom.

    1. Keith VK3VKS Sadler: "I purchased all the material for the MkI rotator and am now interested in the MkII."
    2. Warren VK6HM Walker "I have previously built your first rotator and enjoyed it immensely."
    3. Mark VK3ZQ - "Just building a version of the Mk2 electronics to mod my original Mk1."
    4. Robbie VK3FAMT - "Great to see it working!" Robbie demonstrated his working rotator at Moorabbin and District Radio Club. It is shown here with the new piezo speaker connected.


Problems experienced by some builders (and our comments in bold)

  1. Original version of software assumed the EEPROM was initialised. Fixed.
  2. The m command does not work: The m command won't work properly until the calibration is completed. Try the b command instead.
  3. Ordering the wrong parts on eBay: 2 motors (reordered). Oops!
  4. eBay parts dead on arrival: 1 motor, 2 driver boards (reordered). That's a worry!
  5. Trouble finding a satellite antenna: We use the Arrow II 146/437-10W from here:
  6. Motor bushes misaligned. Not good, but sometimes expected with inexpensive Chinese imports.
  7. The 6mm hub is closer to 6.5mm. Yes, frequently 1/4" is sold as 6mm and vice-versa.
  8. The I2C cable: We tried shielded cable and it didn't work. Spikes from the motor commutators, coupled via the shield, reset the sensor!

Suggestions provided by some builders (and our comments in bold)

  1. Better serial monitor support: A help command. A stop and start command. Motor test command. Command error handling. All good ideas!
  2. We have found that the soft-brass shaft coupler wears out after repeated assembly/disassembly. It seems it is never tight enough: The rotator wobbles from side to side and at high elevation angles the lift arm hits the tripod upright. We have tested the following 4-screw shaft coupler from eBay and can highly recommend it.

Shaft coupler

In the news

  • AR Magazine, June 2016. SOTA and Parks News by Allen Harvie VK3ARH. VK3 Show and Tell - Sunday 17 April 2016 - Brisbane Ranges National Park: "... Another highlight, among many, was provided by Joe VK3YSP. Joe set up his Portable Satellite gear, complete with mini computer controlled rotator for a demonstration earlier in the day and was ready and waiting for an early afternoon pass of amateur satellite designated FO-29. Right on cue, FO-29 came over the horizon and Joe completed what is believed to be the first WWFF contact from an Australian VKFF Park via Satellite. Joe exchanged greetings from the Park, the Park designator and name, and a valid signal report with Geoff VK2ZAZ. This was an effort by Joe and enjoyed by all present."

Rotator Demonstration

  • We presented and demonstrated the Mini Satellite-Antenna Rotator at GippsTech 2016 on July 9th & 10th 2016.

Hardware Build Notes


  1. The hardest part of the build was precision-marking and drilling the motor mounting holes. We recommend sticking adhesive paper labels to the diecast box, scribing construction lines on them using a digital vernier caliper, center-punching and drilling pilot holes first. A drawing of the motor mounting holes can be found in the motor datasheet here. Check three times - drill once.
  2. Countersink the motor shaft holes on the inside of the rotator case and slip 5mm o-rings over the motor shaft before assembly for ingress protection.
  3. Add two flat washers to the AZ motor mounting bolts on the side near the lid to counter the chamfer in the rotator case.
  4. Install a cable gland on the bottom of the rotator case for the PC/Battery and Sensor cables.
  5. Install the Arduino Pro Micro against the case wall using two layers of double-sided tape on its flat side.
  6. Connect a small piezo speaker to pins 10 and 16 of the Pro Micro. Secure the speaker with double-sided tape.
  7. Install the Motor Drivers to the case using countersunk bolts and stand-offs.
  8. Make absolutely sure the rotator and antenna assembly can turn freely on the tripod. A centre-post with no snags, longer than the lift arm is required. You will need an Extra Heavy Duty Speaker Tripod for this. Try Jaycar CW2860 (out of stock) or Altronics C0524.
  9. Attach a 6mm bolt to the top of the tripod using a pipe cap, fixing screws, 6mm bolt, nuts, locking nuts and large flat washers. If this mounting flexes in any way you will be disappointed with the result.
  10. Attach the lift arm to the EL motor shaft using the 6mm hub. The lift arm can be a length of 30x30x3mm aluminium angle.
  11. Attach a counterweight to the lift shaft. This can be a 101x51x25mm diecast aluminium box: Altronics H045. Filled with lead.
  12. Attach the tripod to the AZ motor shaft using the 6mm coupler. Replace the hex grub screws with large pan-head bolts to obtain the torque required.
  13. Enclose the sensor in heatshrink tube using liquid PVC tape or silicon to seal the ends. Mount the flat side against the boom with velcro. See the following diagram showing the sensor orientation. Keep the sensor away from the VHF driven element to avoid RF interference to the sensor. Use ferrites on the I2C lines if necessary.
  14. Attach the Arrow antenna to the lift arm using Velcro for quick release and hand-held operation if required. It is not very solid, but it doesn't have to be because the sensor is attached to the boom.
  15. Here is an extreme close-up of the enclosure showing assembly details:

Rotator Case

Sensor OrientationSensor orientation: Attach the flat side of the sensor to the top flat side of the antenna boom. The Y axis of the sensor should point along the antenna bore sight. With the antenna held horizontally, pointing North, the X axis of the sensor should point East and the Z axis of the sensor should point up.

This is a 10 Degree-Of-Freedom sensor. It measures the earth's absolute magnetic and gravitational fields and gyroscopic rates, all in 3D. There is also an absolute barometric pressure transducer. All transducers are Micro Electro Mechanical Systems. Pretty amazing for $11.

The following clarification is required to rationalize the vector diagram and sensor axes shown at left and in the original article with the actual LSM303D device axes.

The LSM303D device axes (x', y' and z') are not the same as the (x, y and z) axes shown at left or in the vector diagram.

x' points along the boom, y' points to the left, z' points up. So: x = -y', y = x' and z = z'.

Also, in the steady state, the gravity field vector g is the opposite of the device acceleration vector a: Acceleration points up, gravity points down. There is no difference in the magnetic field vector m: It points from the Earth's South magnetic pole to the North.

Therefore the following transformations apply: mx = -my', my = mx', mz = mz', gx = ay', gy = -ax', gz = -az'.


  1. Solder the four 6-way headers on to the top of the Arduino Pro Micro.
  2. Crimp hookup wires into the housings. You will only need 3 housings. Link the Pro Micro VCC pin to the RST pin.
  3. Connect Pro Micro SDA, SCL, GND and VCC to the Sensor SDA, SCL, GND and VIN pins via a long flexible cable. We use flat telephone cable.
  4. Connect Pro Micro pins 4, 5, 6, 7, 8 and 9  to the Motor Drivers terminals (AZ BRK, DIR, PWM and EL BRK, DIR, PWM respectively).
  5. Connect Pro Micro GND to each Motor Driver GND terminal (The one on the same terminals as BRK, DIR, PWM).
  6. Connect Motor Driver OUT1 and OUT2 terminals to the Motor terminals (be prepared to reverse these during testing as the motor pins are not polarised).
  7. Connect Motor Driver V+ and GND terminals to your 12V supply via a cutoff switch and fuse (Caution: Don't connect until safe: The motors may move)
  8. Connect Pro Micro USB port to the PC USB port. Cut a standard micro USB cable in half and re-terminate it. This port powers both the Pro Micro and Motor Driver electronics.

Rotator Schematic Diagram

Testing the Arduino Pro Micro stand-alone

  1. Install the Arduino IDE from
  2. Connect the Arduino Pro Micro via a micro USB cable to the PC USB port. Note: Give the drivers ample time to install.
  3. Open the Arduino IDE
  4. Select File | Examples | 01.Basics | Blink
  5. Select Sketch | Verify/Compile (Ctrl+R). You should see "Compiling sketch..." followed by "Done compiling"
  6. Select Tools|Board: Arduino Leonardo
  7. Select Tools|Port: COMnn (Arduino Leonardo)
  8. If you don't see COMnn (Arduino Leonardo) you may have to determine the virtual serial port used by the controller:
    1. On Linux start a terminal window and type: dmesg | grep "USB ACM device" Make a note of the tty device. 
    2. On Windows start device manager and look under "Ports" for "USB Serial Device" or "Arduino". Make a note of the "COM" number.
    3. Select Tools | Port and the COM port number you noted earlier.
  9. Select Sketch | Upload (Ctrl+U). You should see "Uploading...". The Arduino Pro Micro green and yellow LEDs will flash 3 times. Then "Done uploading".
  10. If you can't upload. May we suggest: Closing the IDE. Disconnecting and re-connecting the controller. Starting the IDE again and repeating steps 4 onwards.

Compilation Instructions

  1. Open the Arduino IDE.
  2. Select File|Preference to find out your sketchbook location.
  3. Unzip the file above to your sketchbook location.
  4. Select File|Open|Rotator. You should see three files open in the IDE: Rotator, Lsm303d.cpp and Lsm303d.h
  5. For the Arduino Pro Micro please select Tools|Board: Arduino Leonardo.
  6. Select Sketch Verify/Complile (Ctrl+R). You should see "Done compiling" and no errors as below.

Compiling the Rotator Sketch

Set to work instructions (Part 1)

  1. Connect the Mini Satellite-Antenna Rotator controller USB port to a PC or Raspberry Pi or whatever, but do not connect the 12V motor supply.
  2. Start the Arduino IDE and open the rotator sketch
  3. Press Upload to reboot the Arduino and start up the IDE Serial Monitor (button at top right). Select "Carriage return" from the dropdown box.
  4. Type b<Enter>
  5. You should see the raw sensor data (six numbers) as shown below. If you see "nan" or "ovf" there is a problem with the sensor or sensor connection.
  6. Type a<Enter> to abort debug mode.
  7. You now have to run the calibration procedure at least for the first time before you can proceed. 

Debug window

Calibration Instructions

A workable calibration can be achieved by just holding the sensor in your hand and turning it around to point precisely in 12 different directions. The a small piezo speaker stops beeping you when you have completed each point. The more care you take with the procedure the better the calibration will be. Once you have done the calibration properly it will not need to be repeated unless your magnetic declination or the magnetic conditions near the sensor change.

  1. First go on-line to calculate the magnetic declination in your area. Go to Enter your country and city. Press "Add Lat/Lon" then press "Calculate" to get your magnetic declination. Say it is 11 degrees, 40 minutes, East. Convert this number to decimal degrees by dividing the minutes part by 60 and adding it to the degrees part, so that's 40/60=0.7 plus 11 equals 11.7. Use a negative number (-11.7) if it says West instead of East.
  2. Make sure the 12V motor supply is disconnected. Connect the PC to the rotator using the USB cable.
  3. Start the Arduino IDE and open the rotator sketch.
  4. Press Upload to reboot the Arduino and start up the IDE Serial Monitor.
  5. Type in e11.7<Enter> to enter the magnetic declination (make sure you type in your own value). Then s<Enter> to save it.
  6. Now start the calibration process by typing c<Enter>.
  7. You can abort the process at any time by typing a<Enter>.
  8. When you have completed the calibration process, properly, just type s<Enter> to save the calibration data to non-volatile memory.
  9. To calibrate the sensor you have to move it around very, very slowly. Don't bump it or even think about changing hands.
  10. It helps to tape the sensor and the sensor cable to the back of plastic or wooden ruler and hold the ends of the ruler in each hand.
  11. Move the sensor around. The speaker will beep and you will see the 3D magnetometer (M) and accelerometer (G) errors and scaling factors changing on the screen.
  12. You can pretty much keep moving the sensor all around until the speaker stops beeping or the data stops changing, but there is a trick to doing it properly.
  13. Think of the sensor as a cube with six faces. You need to point each face in the direction of the Earth's magnetic field and again in the direction of the earth's gravitational field. The gravitational field points straight down, while the magnetic field points up (in the Southern hemisphere) to the North at an angle of about 70 degrees to the horizontal. There are 12 directions and you have to move the sensor a little bit around each point until the speaker stops beeping or the data stops changing.
  14. For extra fun have someone video the whole process and then play it back at high speed!
  15. Don't forget to type s<Enter> when you have finished.
  16. You can then type r<Enter> to reset the controller and reload the stored calibration data.

Calibration window

Set to work instructions (Part 2)

  1. Once calibration data is saved to the flash memory you can continue to set the rotator to work.
  2. Make sure the 12V motor supply is disconnected. Connect the PC to the rotator using the USB cable.
  3. Start the Arduino IDE and open the rotator sketch.
  4. Press Upload to reboot the Arduino and start up the IDE Serial Monitor.
  5. In the IDE Serial Monitor type m<Enter> to enter the monitor mode.
  6. You should see the rotator data as shown below, comprising: Current AZ and EL, Setpoint AZ and EL, AZ windup angle, AZ windup state, AZ and EL error.
  7. Verify the Current AZ and EL numbers reflect the sensor true azimuth and elevation
  8. Make sure the lift arm is disconnected. Connect the 12V motor supply.
  9. Observe the IDE Serial Monitor display and observe the motor movement while looking directly at the motor shafts.
  10. Point the sensor North East. The first number should be between 0 and +90. The AZ motor should turn CCW.
  11. Point the sensor North West. The first number should be between 0 and -90. The AZ motor should turn CW.
  12. Point the sensor 45 degrees Down. The second number should be between 0 and -90. The EL motor should turn CW.
  13. Point the sensor 45 degrees Up. The first number should be between 0 and 90. The EL motor should turn CCW.
  14. If a motor moves in the wrong direction, reverse the motor wires by swapping the OUT1 and OUT2 connections on the appropriate Motor Driver board.
  15. Disconnect the 12V motor supply. Attach the rotator to the tripod. Attach the lift arm to the rotator. Attach the sensor along the boresight of the lift arm.
  16. Disconnect the USB cable.
  17. While carefully monitoring the lift arm, ready to disconnect the 12V motor supply if something goes wrong. Connect the 12V motor supply - there should be no movement.
  18. Connect the USB cable. The lift arm should swing around to 0 degrees AZ/EL and stop.
  19. Turn and tilt the tripod. The rotator should restore the lift arm to this home position.
  20. In the IDE Serial Monitor type 30 45<Enter>. The lift arm should swing around to approximately 30 degrees AZ and 45 degrees EL.
  21. If everything is working properly you may like to repeat the calibration procedure more carefully if you wish. 

Monitor window

Installing Gpredict and HAMLIB

Windows Installation

  • Download the latest Gpredict for windows installer from:
  • Download the latest HAMLIB for windows installer from:
  • Plug the mini satellite-antenna rotator into a USB port. Use Windows Device Manager to find out the COM port number of it.
  • To start HAMLIB so you can control the rotator from Gpredict, create a windows batch file called rotctld.bat containing the following lines (make sure you insert the rotator's COM port number from the last step):
    • cd \Program Files (x86)\hamlib-w32-3.0\bin\
    • cmd /k "rotctld -m 202 -r COM6 -s 9600 -T -t 4533 -C timeout=500 -C retry=0 -vvvvvvvv"
  • if you want you can also plug in your FT-817 via a Yaesu CT-62 CAT cable into a USB port. Use Windows Device Manager to find out the COM port number of that too.
  • To start HAMLIB so you can control the rig's frequency/doppler etc from Gpredict, create a windows batch file called rigctld.bat containing the following lines (make sure you insert the rig's COM port number from the last step):
    • cd \Program Files (x86)\hamlib-w32-3.0\bin\
    • cmd /k "rigctld -m 120 -r COM15 -s 38400 -T -t 4532 -vvvvvvvv"
  • Start Gpredict. Select Preferences|Interfaces|Rotators.
  • Add a new rotator and select: Az type 0 -> 180 -> 360
  • Note that rotator position feedback (numeric values and crosshairs on the polar display) does not currently work with HAMLIB on Windows because the Arduino Pro Micro USB CDC ACM device is expecting DTR and/or RTS from the host and HAMLIB on Windows does not assert these handshaking lines. Linux works OK. We are investigating some potential solutions... In the meantime you may like to try the following work-around:
    • Instead of using the built-in Pro Micro USB CDC ACM port, connect a USB to TTL serial adapter board to the Pro Micro VCC, GND, TX and RX pins. This board will power the Pro Micro from the PC. Then globally change "Serial" to "Serial1" in the source code and re-compile.

Raspberry Pi Installation

  • Use a RPi Version 3 with built-in WiFi, or a version 2 with a USB WiFi dongle. Add a PiFace Real Time Clock if you want to use it portable.
  • Start with the latest Raspbian - Jessie operating system. Download it from
  • Unzip the .img file and use Win32DiskImager to write it to a micro SD card.
  • Select Menu|Preferences|System: Extend the Filesystem. Select Localisation and set your locale information.
  • Select the WiFi configuration and log into your WiFi access point.
  • Startup a Terminal and execute the following commands.
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install gpredict
  • Please install HAMLIB manually to get the latest version as rotator position feedback will not work with the cached version.
  • Plug the rotator into to a USB port and start the HAMLIB rotator control daemon in a terminal window:
    • rotctld -m 202 -r /dev/ttyACM0 -s 9600 -C timeout=500 -vvv
  • Start Gpredict. Select Preferences|Interfaces|Rotators.
  • Add a new rotator and select: Az type 0 -> 180 -> 360

Operating Instructions

Serial commands:

  • Enter two integers AZ and EL in degrees separated by a space to manually control the rotator. e.g. 270 45<Enter> Note: AZ here works in either 0~180~360 or -180~0~180 degree format.
  • r - Reset. Prints the calibration data. Resets the rotator to the home position and resets the windup value.
  • b - Debug mode. Prints the raw sensor data: Mx, My, Mz, Gx, Gy and Gz.
  • c - Calibrate mode. Displays the calibration data only when it changes.
  • d - Demo mode. Tracks linearly through the following AZ/EL points in a cycle: 0/0, 90/90, 0/180, 90/90 0/0, -90/90, -180/0, -90/90, 0/0
  • m - Monitor mode. Prints current AZ and EL, set points for AZ and EL, the AZ windup angle, the AZ windup state, the AZ and EL error.
  • a - Abort Calibrate, Monitor or Demo mode
  • e - Enter Magnetic Declination. e.g. e11.7<Enter>. It is positive for East or negative for West.
  • s - Save Magnetic Declination and Calibration Data.
  • h - Help
  • p - Pause

Scaling it up

As we said in the article: "It should be noted that this particular rotator is very light duty as it uses small and inexpensive motors. It would certainly not take the rigours of prolonged external use nor support a larger antenna". Some readers have asked us how the mini satellite-antenna rotator can be scaled up for larger antennas. Here are our thoughts:

  1. See our Mini Satellite-Antenna Rotator MkII to check if that meets your needs.
  2. There are two types of H-bridge motor drivers: Single PWM input with DIRection control (designed for DC motors) and two, FWD and REV, PWM inputs (designed for stepper motors).
  3. The L289N (FWD/REV) motor driver will handle 2A at up to 35V.
  4. The LMD18200T (PWM/DIR) motor driver will handle 3A at up to 55V.
  5. You can drive pretty big DC motors with those, especially at 24V. If that is not enough, there are larger motor drivers available.
  6. The following is a dual channel PWM/DIR 10A motor driver.
  7. Motor Driver 10A

  8. The following is a dual-channel FWD/REV 60A motor driver.
  9. 60A Motor Driver

  10. The sensor and Arduino should be located close together (about 1m max) because of the I2C bus interface. We can’t do much about that unfortunately. So the electronics box must be up at the antenna.
  11. The Arduino and the tracking computer can only be about 5m apart because of the USB interface. USB over CAT-V cable extenders are available for cable runs up to 50m. A more reliable option is RS-422 over CAT-V cable described in our Mini Satellite-Antenna Rotator MkII.