SARCNET logo

School Amateur Radio Club Network

☰ Menu

Related Information

Please note that this site is currently under constant construction and revision since January 2016. Please check back regularly to see new or updated news, activities and missions.

Mini Satellite-Antenna Rotator

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

Description

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

Parts List

Part Description Vendor Qty  Total
Diecast box HB5046 Sealed Diecast Aluminum Enclosure - 171 x 121 x 55 Jaycar 1  $35.00
DC Motor DC 12V 0.6RPM Low Speed High Torque Turbo Reducer Motor Right Angle Gear eBay 2  $17.00
DC Driver LMD18200T DC Motor Driver Module Board PWM Adjustable Speed for Arduino Robot eBay 2  $15.00
Sensor 10DOF L3GD20 LSM303D BMP180 Gyro Accelerometer Compass Altimeter For Arduino eBay 1  $11.00
Controller 1x Brand New Pro Micro ATmega32U4 5V 16MHz Replace ATmega328 Arduino Pro Mini eBay 1  $7.00
Housing HM3406 6 Pin 0.1 Header with Crimp Pins - 2.54 pitch Jaycar 4  $3.00
Header HM3416 6 Pin 0.1 Straight Locking Header - 2.54 pitch - Single Jaycar 4  $2.40
Hub YG2784 Aluminium Hub with Set Screws Jaycar 1  $8.95
Coupler Rigid Shaft Coupler Steel 4 Screws eBay 1  $4.15
Other Lead Counterweight, 5mm O-Rings, 3mm Stand-Offs, Screws, Nuts      
Total       $103.50

Project Status (Updated 7 July 2016)

Please update your status by e-mailing us.

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:

VK4YB

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

VK2FRW 

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

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: http://www.arrowantennas.com/arrowii/146-437.html
  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

Mechanical

  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. Install the Motor Drivers to the case using countersunk bolts and stand-offs.
  7. 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.
  8. 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.
  9. Attach the lift arm to the EL motor shaft using the 6mm hub. The lift arm can be a length of 30x30x3mm aluminium angle.
  10. Attach a counterweight to the lift shaft. This can be a 101x51x25mm diecast aluminium box: Altronics H045. Filled with lead.
  11. 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.
  12. 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.
  13. 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.
  14. Here is an extreme close-up of the enclosure showing assembly details:

Rotator Case

Sensor Orientation Sensor 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 boresight. 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.

Electrical

  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

Software Source Code

Here is the latest version of our source code: Rotator 002.zip

Change History

  1. 30/4/2016. Original release.
  2. 27/5/2016. Added support for HAMLIB 3.0.1 specifically to handle Easycomm II rotator feedback on linux. Stopped calibrate function trying to read uninitialised EEPROM. Added debug mode to help check raw sensor data.

Testing the Arduino Pro Micro stand-alone

  1. Install the Arduino IDE from https://www.arduino.cc/en/Main/Software
  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 IDE Serial Monitor screen tells you when you have completed each point. However holding the sensor in your hand will not take into account any hard magnetic interference from the antenna boom. Doing the calibration with the sensor attached to the boom of even a small yagi is much harder. Is the increased accuracy worth the effort? You decide. 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 http://www.ngdc.noaa.gov/geomag-web/. 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. Move the sensor around. You will see the 3D magnetometer (M) and accelerometer (G) errors and scaling factors changing on the screen.
  10. The data on the screen only changes if any of the last twelve values change.
  11. You can pretty much keep moving the sensor all around until the data stops changing, but there is a trick to doing it properly.
  12. You must not bump the sensor or it upsets the accelerometer calibration. The sensor must be moved around very gently. Don't even change hands!
  13. You can speed the process up if you know approximately how to point the sensor in 12 different directions.
  14. Think of the sensor as a cube with six faces. You need to point each face in the direction of the Earth's magnetic and again in the direction of the earth's gravitational fields. The gravitational field points straight down, while the magnetic field points up 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 data stops changing.
  15. For extra fun have someone video the whole process and then play it back at high speed!
  16. Don't forget to type s<Enter> when you have finished.
  17. 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: https://sourceforge.net/projects/gpredict/
  • Download the latest HAMLIB for windows installer from: https://sourceforge.net/projects/hamlib/
  • 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 127.0.0.1 -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 127.0.0.1 -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 https://www.raspberrypi.org/downloads/raspbian/
  • 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.

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. The motor driver will handle 3A at up to 55V. You can drive pretty big DC motors with that, especially at 24V. If that is not enough, there are larger motor drivers available. However they all have slightly different control inputs, which will require small software modifications. Contact us if you need support for them. Most 50A and 100A motor drivers require separate PWM inputs for forward and reverse. The following dual-channel 60A motor driver looks more suitable and only requires one PWM input per channel, but it has separate forward and reverse pins, which will still require a small software modification:

60A Motor Driver

  1. 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.
  2. 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.