Beam Direction Indicator Project

to point a dish/beam in a required direction either through manual control or automatic tracking
using various antenna direction encoders including: an AS5040/AS5045 magnetic absolute encoder chip, MA3-P12 device and SEI system for A2, A2T from US-Digital, HH-05 and HH-12 from DF1SR, Screwjack output, potentiometer output, 16 bit Gray Coded wheel and now the SCA61T inclinometer chip for elevation.

Built in sun and moon tracking, but may be interfaced to a computer for satellite tracking (Orbitron software) and
EME (VK3UM EME Planner software). Also supports GPS setting of date/time/lat/long for field work.


My satellite antennas controlled by the project
Screwjack elevation and the inclinometer (SCA61T) assembly above
Click the photo or here to see my satellite setup

See below how to order a set of 5 boards (click here)

Latest page change 14 June 2010 added new versions 8.40, 9.51 and 10.0
Differences are in the clock support and 2 or 4 line LCD

Use these links to access information on the various encoders or items of ancillary equipment for the project

Encoders

 

Auxiliary equipment

 


Stan LZ2STO has a great looking example of the controller


The populated shack controller board

The board is fully populated (one MAX232 is unused except for SEI connections) ready to have switches, LEDs, LCD etc plugged in. It's a simple board thanks to the power of the PIC18F4620/82/85.


Rear view of VK5DJ's controller showing connections
DB25 to computer, DB9s to antenna units
Power socket and switch top left, with direction motor terminals top right.

 


Top view of new board in old case. Note brake relay not fitted.
I prefer the layout with the relays on the right, not on the left as shown here.
Click on image for large version of photo (564K)


The encoders supported by this project have grown considerably since the first writing of this page. When reading the description below be aware that it was written when there were few inexpensive solutions to encoders on the market. This is why the description focussed on the AS5040/45 chips as being an opportunity to do something well at resonable cost. Since then a number of encoders have come on the market that use these chips (or other technologies) but save all the alignment problems. Further requests to support other encoders has resulted in the project growing. So when reading the description below be aware that the home brew AS5040/45 solution is just one of a number of ways you can use the project. I have devoted a page to each of the encoder solutions - see above links.

The Project

With greater interest in EME and satellite operation it became clear that there was room for another beam direction indicator device. Technology too has moved on and although there are many amateurs with bottomless pockets and a wish to buy commercial, there are also many amateurs who like to roll their own as much as possible.

Companies such as AustriaMicrosystems have produced Hall Effect Devices for some years but in recent years the appearance of their devices with 10 bits (1024 positions) and now 12 bits (4096 positions) has opened other absolute encoder options. Some amateurs have used US Digital optical absolute encoders with success or home made Gray Coded wheels. All have strengths and weaknesses, all have errors of some sort and all present different challenges be they cost or construction problems.

In early 2005 I read of the AustriaMicrosystems AS5040. I suggest you look at their website: http://www.austriamicrosystems.com/

At GippsTech Symposium in July 2005 I presented some early work using an AS5040 mounting sytem developed with the assistance of Tony VK5ZAI and his lathe. A second presentation was made the following year to describe progress to date and demonstrate the AS5045 in action.

This page provides an overview of the latest version of the project, as of November 2007, and discusses the pros and cons of the AS5040/45. See this link to the AustriaMicrosystems FAQ site for further comments on accuracy.


Two AS5040/45s mounted at the antenna provide direction information for Azimuth and Elevation. Each of these feed a 16F628 PIC which translates the polled serial data from the AS5040 to an ASCII data stream sent serially at 9600 baud to the shack unit where information on antenna direction and calculated sun or moon direction are correlated and the antenna direction motors switched manually or automatically.

Before a description of the devices is presented a few comments on accuracy. An examination of the data sheet for an AS5040 (and the AS5045 is very similar) reveals that for a centred magnet, tracking accuracy will be within +/- 0.5 degrees (or better), while with an uncentred magnet (0.25mm) there may be errors up to +/- 1.4 degrees when commercial considerations in positioning, temperature, A/D noise etc are taken into account. The location of the die within the package may vary up to 0.235mm..


Magnet location chart
Lower scales +/ - 1mm
Vertical scale error 0-6 degrees

 

Other errors


This chart shows over 360 degrees the errors due to internal gain, A/D conversions and mismatch. Note noise.

So what does this mean in practice?

There has been a question around tracking, the data sheet provides useful information. Keep in mind that the accuracy of the system is largely determined by accurate placement of the magnet, so no sloppy mechanics.

For the test jig I arranged for two devices, AS5040s with magnets and two 16F628 translator boards, to be coupled front to front. That is one device operated 0 to 1023, while the other turned in the reverse direction, that is a count of 1023 to 0.


Photo shows basic setup for test, note Chris VK5MCs encoder setup (right) mounted in an old incremental encoder's case to make use of the nice bearings.

The boards fed to my shack unit - one to the Azimuth and one to the Elevation input. Software on the PIC16F628 translator board enables a reversal of the numbers coming from one of the AS5040 chips to cater for different mounting configurations. I used this facility to physically reverse direction but watch measurements move in the same direction . Therefore I was able to arrange the coupling so both AZ and EL read 0 degrees and as I rotated the coupling watch them 'track' in the same direction - I took readings every 5 degrees. I then put the numbers in Excel and produced the following graph. I shifted the zero line to show a symmetrical pattern as a + and -.

In case I had a fortuitous set of readings I then introduced a software offset on one of the data streams and re-adjusted the coupling to provide identical readings of degrees. So although one decoder was counting 0-1023, the other 'effectively' counted 1108-85. The encoders were now working on a completely different section for comparison. Again, I could see a similar pattern as above. In neither test did I see large variations of tracking as I would expect from errors moving in and out of phase. A test, shifting one encoder 10 degrees, was also completed with similar results. I plan more tests including additional rotational positions and at least one other technique, but an initial conclusion is that 'better than +/- 0.5 degrees' seems to be readily achieved, especially as our magnet alignment technique can still be improved. No temperature changes were attempted.

The magnets are not yet perfectly aligned, we're using big holes to allow adjustment. At this point it seems better than the data sheets state, but then again responsible manufacturers should warn us of worse case not best case situations.

I propose to add a calibrate function to the software, there is a switch to support this. The basic idea is to add a push button to the front panel. To calibrate, the beam is accurately aimed at the moon (using noise or signals) then the button is pushed. This will place an offset (if needed) in memory which will enable more accurate tracking over a small part of the sky. Over time a number of offsets might be used to build an error table in memory to minimise across the range of the encoder. If this idea works then it may be worth going for the AS5045 as I think software could then MAYBE take advantage of the extra 2 bits. More work to be done. The method will also have the advantage of correcting for lack of symmetry in the beam/dish rotation mechanism. I'll treat this as a future improvement.

Resistance to RF has not been fully tested apart from a 2M handheld rig running 2 watts had the antenna placed within a few hundred mm of the AS5040 and no effect was seen. I will test the device at 23cm and 70cm too.

A reality check is also necessary as beams and dishes have inherent errors too, irregularities in foundations, flexing, uneven rotating mechanisms all add to the uncertainty of 'Where is my antenna pointing?' For all but the best amateur EME stations this system will provide very usable data and control. Check your antenna's beamwidth to bring things into perspective.

For more information refer to the austriaMicrosystems site. Here is a link to the FAQ page, it makes interesting reading.

The AS5040 based beam/dish controller unit - how does it work?

The AS5040 chip consists of a ring of hall elements placed at the centre of the IC in a circle of 2.2mm diameter. The hall elements pick up the field of a magnet placed above this hall array. This information is digitized and fed into a digital signal processor which calculates the angle of the magnet with a resolution of 0.35 degrees or 1024 positions per revolution at a sampling rate of 10 kHz (assuming magnet is accurately placed). The AS5045 provides 4096 positions per revolution and a resolution (but not accuracy) of better than 0.1 degrees.

The digital angle information is available in several formats; as a serial 10 bit (or 12 bit) data stream, as a pulse-width modulated (PWM) signal or as a quadrature incremental signal.

Essentially a magnet is placed on a shaft attached to the shaft moving with an antenna in the vertical plane and another with a shaft for the antenna movements in the horizontal plane. This provides for azimuth and elevation of the antenna (or dish). The magnet hovers above the AS5040.

A 16F628 located near the AS5040, communicates with the AS5040 and converts it to a serial stream for reading in the unit located in the room below. Two devices are required for a complete satellite or moon tracking system and are catered for in the main unit - hence the two readouts on the LCD. Accuracy to the nearest 0.35 of a degree.

The 18F4620 polls the devices at the antenna and converts the 1-1024 number stream to degrees of movement. Another serial connection can be made to a computer providing information on the location of satellites.

Moon and sun tracking software is contained in the PIC program and enables all the direction control from within the unit. An external computer is not essential.

With the successful development of Moon Finder and Sun Finder programs within PIC memory, the PIC is now a choice of 18F4620 (or 18F4680) for Version 7.02 to provide a real time clock and manage the maths - it has 65K of memory, enough for 32K instructions OR a 18F4682 or 18F4685 with 80K and 90K of memory respectively for Version 8.00. The advantage of the bigger chips is that I have been able to restore a more accurate doppler calculation and add support for the SCA61T inclinometer chip in Version 8.00. All chips are pin for pin compatible, no hardware changes are required.

I have maintained a capability so that a satellite tracking program that outputs the right data (Az and El for the satellite) will be able to control the beam. Because the sun's apparent motion is much easier to calculate, the sun routine is producing results within 0.01 degree of the astronomical almanac. The latter is useful for direction calibration purposes using shadows or sun noise. The moon calculations are usually within 0.1 degree but may be up to 0.2 degree out. A similar result to many other tracking programs. I use the program AA.exe as a reference.

Here are the features:

At the antenna

Various solutions are possible at the antenna.

See the pages accessed through the buttons above for detail on encoders.

The 18F4620 software permits two inputs - ASCII from the AZ/EL unit or an analogue voltage 0-5V from a linear potentiometer or an AS5040/45 or other encoders running in analogue mode.

Calibration - pointing the antenna

In the manual I describe initial calibration by aligning the antenna with the moon or sun referenced to the calculated position. Here is a different method described and used by Stan LZ2STO.
To measure the elevation angle, Stan does the followingI:

  1. place a digital still camera on a stand perpendicular to the rotary surface of the system.
  2. at night, using a flash I take three shots, one of initial position, second of vertical position, not exactly 90degrees but with conected plumb-line and last shot of system at the max. elevation.
  3. then combine the three images with Photoshop and import it into CorelDraw. In Corel I draw a circle with CTRL+mouse than change properties/shape/pie.
  4. in CorelDraw I move the centre of the circle to adjust it over the central pivot point of the antenna image, so I can see the angle of full turn.
  5. with care the angle can be measured with accuracy to 0.1 degree (if the camera was placed perpendicular to the plane). Thanks to the vertical plum-line, initial elevation angle can also be measured.
Results look like this: http://i161.photobucket.com/albums/t206/LZ2STO/TEMP/Rotator%20Conrad/112degangle.jpg

At the Shack

The shack unit is able to automatically calculate the position of, and track, either the sun or the moon. Antenna information enters via 2 DB9 connectors in either serial form from the AS5040/45 antenna units or as a 0-5V from potentiometers or certain MA2/3 units from US Digital. Personally I prefer a solution that makes use of the AZ/EL board and a digital connection from antenna to shack (home brew AS5040/45, MA3-P12, HH-05/12, MAB25 series, Optical encoders, SCA61T.

The shack unit has three input sockets - 2 * DB9 for connection to the antenna units, 1 * DB25 for connection to a computer (optional and only required if external control required with EME Planner or Orbitron or you wish to use a GPS for setup)

The shack unit can be configured for A/D input (on either or both Azimuth and Elevation antenna ports) or serial input (on either or both antenna ports).

The configuration of the shack unit can be adjusted by activating the Menu switch on the front panel. Once accessed, the up or down buttons move through the various options, while the left and right buttons change the values.

The shack unit enables automatic tracking of the sun or the moon (internally calculated) or manual operation. A park facility is provided. The unit can also be configured if a brake is present. A real time clock is accurate to better than a second a day. The unit is able to read a serial port from a computer to provide a satellite tracking function or an interface to the VK3UM EME Planner. A GPS may be connected to the computer port at switch on to provide automatic time and location setting.

The following menu/adjustment options are available in memory in this order:

seconds
minutes
hours
day
month
year
degrees to show below horizon for elevation
presence of brake and rotator stop (north or south)
delay interval before reversal of motors
az/el modes - serial or A/D and which ports
spread of az pot - how many pot degrees equate to 0 to 360
spread of el pot - how many pot degrees equate to 0 to 360
AZ offset - some rotators cover more than 360 degrees
EL offset - some rotators cover more than 180 degrees
AZ hysterisis (stop the motors within this range - allows for overrun)
EL hysterisis (stop the motors within this range - allows for overrun)
Height above sea level for sun moon calculations
Longitude in decimal degrees W (use - sign if East of Greenwich)
Latitude in decimal degrees (use -sign for South of equator)
Park azimuth
Park elevation
AZ resolution 10, 12, 14 or 16 bit
EL resolution 10, 12, 14, 16 bit or SCA61T inclinometer
SCA61 calibrate
Averaging ON/OFF
Add/Sub AZ offset
Add/Sub EL offset
VGA ON/OFF (requires external hardware)
Time ON/OFF (when using external computer input)
CTS/DTR set for TTL or RS232 levels.
SEI connection from US-Digital
Refraction calculation ON/OFF
Relay mode choice of two methods
Doppler
Park
Checksum on/off

Front panel switches

Menu (changed in version 7.00, was park)
Auto track or manual track
Internal/external calculations
Moon/sun switch
Calibrate (to enable final adjustments of the encoders using noise from moon/sun)

Up
Down
Right
Left

Rear panel switch

Power On/Off

Display

A 2 line 16 character display is used for readout. On version 2 I used a non backlit LCD to reduce the heating effect on the voltage regulator, things were getting a bit warm inside. If a backlit display is used, and they are easier to read, I suggest installing the voltage regulator 7805 on a heat sink on the back panel .

Back panel

On/off switch, +12V in, DB25 to computer, DB9 to azimuth sensor, DB9 to elevation sensor, connector for motors switched by 10A relays.

Large Screen display

Using the uVGA video adapter kit from Dontronics it is now possible to display large character information on a computer monitor (NO computer required). See the link above.


Display showing GPS entered data

Downloads
Version 7.05 for the 18F4620/80 basic software clock, 2 line (obsolete)

Version 8.40 for the 18F4682/85. Uses software clock and 2*16 LCD

Version 9.51 for the 18F4682/85 for hardware clock. Uses 4 * 40 LCD (click here for details of version 9)

Version 10.0 for the 18F4682/85 for hardware clock. Uses 2 * 16 LCD

are now ready for download

Which shack unit version should I choose?
The differences are only in the size of the LCD and hardware/software clock support

Version 8.40
Uses 18F4682 or 18F4685
Software clock supported
Supports my 'Remote' software for use through internet
2 * 16 LCD display

Version 10.0
Uses 18F4682 or 18F4685
Hardware clock supported
Supports my 'Remote' software for use through internet
2 * 16 LCD display

Version 9.51
Uses 18F4682 or 18F4685
Hardware clock supported
Supports my 'Remote' software for use through internet
4 * 40 LCD display

Version 7.06 for 18F4620 Version 8.40 for 18F4682/85 Version 10.00 for 18F4682/85 with hardware clock Version 9.51 for 18F4682/85 with hardware clock and 4*40 LCD Documents

Documents and hex files including updated standard manual V7.06
(25 June 2010, 1565K). Includes compiles for the 18F4620 and 18F4680.

This version is no longer supported due to 64K memory limit of 18F4620/4680

Fewer features. V7.06 fixes an elevation tracking problem.

 

Documents and hex files including updated standard manual V8.40

(7 May 2010, approx 1600K for 18F4682 and 18F4685 software clock and 2*16 LCD)

Uses same manual as V10.00 and 9.51. Differences explained in manual

 

 

 

 

Documents and hex files including updated standard manual V10.00

( 15 May 2010 for 18F4682/85 with hardware clock and 2*16 LCD)

See this page for differences

Uses same manual as V8.40 and 9.51. Differences explained in manual

 

 

 

Documents and hex files including updated standard manual V9.51

( 15 May 2010 for 18F4682/85 with hardware clock and 2*16 LCD)

See this page for differences

Uses same manual as V10.00 and 8.40. Differences explained in manual

 

 

 

Version 7.05 manual (11 Nov 2009)

Manual that covers all new versions (14 June 2010)

Board layouts and circuits (2 Sept 2008)

Manual regarding interface of AZ/EL unit to MA3-P12

Manual re interface to Orbitron

Access the SCA61T page for information re inclinometer application

 

 

 

 

Material common to all Versions

Documentation and interface program to use Orbitron for Satellite Tracking (Update 14 June 2010)

Download the hex file for the AZ/EL unit to suit US-Digital's MA3-P12

Download all the HEX files for the PICs (14 June 2010)

Readme1st.txt

Programmers: How to interface to the VK5DJ Controller

 

Other programs of interest

Notes on software changes:

REMOTE.EXE a new program to interface to Orbitron and provide accurate moon position. The program also interfaces to the beam rotator project through the internet or an ethernet connection using WIZ110-SR. This program replaces the old VK5DJ.exe interface.

Download REMOTE here.

18F4620/80 software Version 7.06 on 25 June 2010
Fixed a problem with tracking on the elevation. Note I am now concentrating my efforts with the 18F4682/85 (Versions 8 >) as they have much more memory for interesting things.

I have also included a PDF produced by Peter PE1CHD describing the wiring for his project.
The document (Visio_VK5DJ_29_8_08.pdf) is a great adjunct to the project manual and fills the gap on how to wire the units together. Thanks Peter.

Windows polling the parallel port
Windows XP polls the parallel port and this can create problems with a programmer running on this port. If you find that you have to program a PIC a number of times before you get a good program try running this modification to your registry. It is all automatic, just run the little script file and all will be fixed. If you are nervous about things happening to your registry then don't use it. The file is called XP_Stop_Polling.reg and a search on the internet will provide more information.

How do I get boards?

Australian buyers: AUS$25 for the set of 5 boards P/P included, and I ask you to use Direct Deposit or Postal Order.

Overseas buyers: AUS$32 for the set of 5 boards airmail P/P included, takes into account cost of Paypal and overseas postage.

Boards are available now for delivery on receipt of money. Orders via email to jdrew @ seol . net . au (remove the spaces)

Australians are asked to pay by Direct Bank Deposit if possible as it costs me for Paypal and this isn't a money making venture. Label your deposit with your callsign. If you live 'outback' and you don't have a bank handy let me know and we'll find another solution.

Summary

There is sufficient flexibility in the choice of encoders to suit most people. Undoubtedly the screwjack is the hardest to use as it requires specific calibration and is not an absolute encoder unless you use the SCA61T inclinometer chip.

See errata.txt for two easily avoided slips, one on the 'main board' where one of the SW3 pins is +5V instead of gnd - just use another gnd connection, and one error on the AZEL antenna board where the overlay of the voltage regulator is reversed).

Using some simple averaging in the software the antenna readout shows 0.1 degree increments even with the AS5040, but not as nicely as the AS5045. Note that accuracy over 360 degrees is not guaranteed better than 0.5 degrees due to magnet alignment issues.

The Version 2 sun/moon tracker using the AS5040 on Azimuth and a potentiometer on Elevation.
This version shows the preferred switch layout.
Top left - menu switch, auto/manual switch
Bottom left - External/internal data switch, Sun/Moon switch
Right hand push buttons for manual up, down, right, left with LEDs

Cover off version 2, an earlier tracker version, shown for layout reasons.

Notes:
This is a prototype with an older board but shows my preferred layout with relays near the control transistors.
Motor wires not yet installed on relays
Reverse diodes are now on the board so no need across relay coils.
One MAX232 not used (bottom left) as antenna unit is not using the optional MAX232.
Crystal in the shack unit 8MHZ to allow the processor to run at 32MHz (using internal PLL to multiply clock by 4) and watch crystal at 32,768Hz.


Wayne, VK5APN, has a neat construction


Top view of Wayne's unit - hardware clock top left. Note use of aluminium base plate to mount clock module and main board to minimise holes in the case.

The results of my work are freely distributed to individual amateurs in the spirit of Amateur Radio and on the understanding that no responsibility is taken for any adverse outcomes. Commercial use is strictly forbidden without permission from J.F. Drew, VK5DJ, Millicent, South Australia 5280.