Using Microcontrollers in Amateur Radio, an AZ EL Controller Application

Содержание

Слайд 2

Things I Hope To Leave You With Share my experience with

Things I Hope To Leave You With

Share my experience with the

rotor controller project
Explain why I made the choices I did
How it works
Status of the project
But more than that:
Why a microcontroller was a good choice for this project
What software development environments are all about
Tempt you to consider experimenting with microcontrollers

Feel free to ask questions at any time !

Слайд 3

Motivation For This Project Developed an interest in LEO (Low Earth

Motivation For This Project

Developed an interest in LEO (Low Earth Orbit)

satellites
Led to an interest in a better antenna system
Wanted to track LEOs with small beam antennas
Commercial rotors & controllers are available
Didn’t want to commit that much money at this stage of interest
Decided to use inexpensive rotors & build my own controller
Слайд 4

Low Earth Orbit Satellites Basically LEOs are orbital repeaters AMSAT has

Low Earth Orbit Satellites

Basically LEOs are orbital repeaters
AMSAT has a lot

of information on the WEB
LEOs offer some special challenges
They move fast.
Short contacts
Low RF power
Слайд 5

LEO Satellites Vary In Both Size & Complexity AO-51 (Echo) ~800

LEO Satellites Vary In Both Size & Complexity

AO-51 (Echo)
~800 km

orbit
voice repeater
PakSat BBS
PSK31 Digital

SuitSat-1 (AO-54)
Russian space suit
Launched from ARISS ~355 km
telemetry only
temp & battery

N-Cube2
10x10x10 CM
I LITER VOLUME
(University Projects)

~690 km orbit

Слайд 6

Satellite QSOs Are Interesting! There are a lot of “things” involved

Satellite QSOs Are Interesting!

There are a lot of “things” involved in

working the LEO satellites!
Computer screen
Keyboard
Mouse
Downlink frequency
Uplink frequency
Doppler effects
Code paddles or a microphone
Azimuth of the satellite
Elevation of the satellite
Слайд 7

So Many things – So Little Time! The window for a

So Many things – So Little Time!

The window for a QSO

is often less than 8 minutes.
If you can automate a few “things”, your QSOs may have more “talk” time.
This project is about automating the rotors for directional azimuth & elevation antennas.
Слайд 8

My Approach To The Project Research the WEB for similar projects

My Approach To The Project

Research the WEB for similar projects
Evaluate what

I might do that is different
Understand how rotors work
Keep it (relatively) cheap
Breadboard parts of the design to verify critical assumptions
Rotor controller needs an LCD display & flashing LEDs!
Слайд 9

Why Use A Microcontroller Anyway?

Why Use A Microcontroller Anyway?

Слайд 10

Choices To Make Features Rotors Software Development tools & Environment Microcontroller

Choices To Make

Features
Rotors
Software Development tools & Environment
Microcontroller

Слайд 11

Desirable Features Work with the Nova tracking software Have 2 main

Desirable Features

Work with the Nova tracking software
Have 2 main modes: “manual”

& “autotrack”
Self-calibrate to any Pulser type rotor
Remember antenna position during powerdown.
Reliable beam positioning – within 5 degrees.
Easy to update the controller software.
Minimize cost
Слайд 12

The Rotor – You must understand the thing you are trying to control! The Alliance U100

The Rotor – You must understand the thing you are trying

to control!

The Alliance U100

Слайд 13

Yes – You Can Stack Them Azimuth Elevation The ability to

Yes – You Can Stack Them

Azimuth

Elevation

The ability to put a pipe

through
the rotor body is fairly unique.
Слайд 14

Anatomy Of A U100 Rotor #2

Anatomy Of A U100 Rotor #2

Слайд 15

Anatomy Of A U100 Rotor #3 Physical stop tab Pulser Cam

Anatomy Of A U100 Rotor #3

Physical stop tab

Pulser Cam

Слайд 16

Anatomy Of A U100 Rotor #4 Motor shaft Gear Pulsing contact Motor Frame Mechanical Stop

Anatomy Of A U100 Rotor #4

Motor shaft Gear

Pulsing contact

Motor Frame

Mechanical Stop

Слайд 17

Commercial Controller for the U100 Rotor 10 degree graduations on the dial

Commercial Controller for the U100 Rotor

10 degree graduations on the dial

Слайд 18

The Original U100 Rotor Schematic Diagram Rotor Control Box Simply replace this with a Microcontroller System

The Original U100 Rotor Schematic Diagram

Rotor

Control Box

Simply replace this with a

Microcontroller System
Слайд 19

Model of the U100 Rotor + - 360/ 0 Deg. 180

Model of the U100 Rotor

+

-

360/ 0 Deg.

180

90

270

2. tics/deg = tics/pulse /

deg/pulse

1. deg/pulse = 360 Deg/# pulse (counted)

Strategy
Do an initial calibration to detect rotor’s pulse characteristics.
Absolute direction is known at each pulse & at rotor physical stops.
Time between pulses to estimate position of rotor to a finer degree of resolution.
Time between pulses to detect rotor limit or problems.

Total feedback from the rotor

Note – A “tic” is 5 milliseconds

Calibration Mode calculates:

3. Use physical stops as a reference

physical stop

~ 100 MS

//

//

Слайд 20

Block Diagram Of the Rotor Controller Front Panel Switches Front Panel

Block Diagram Of the Rotor Controller

Front Panel Switches

Front Panel LEDs

SS relays

and
Phasing capacitors
15 vac

SS relays
Phasing capacitors
15 vac

5 Volt regulator
MAX 232 chip
Ceramic resonator
Etc.

Support circuitry

Front Panel LCD

ATMEGA 16

Note - This diagram does not indicate pin assignments

Слайд 21

A FEW OF THE ATMEGA 16 FEATURES THE DATA SHEET IS

A FEW OF THE ATMEGA 16 FEATURES

THE DATA SHEET IS 358

PAGES !
– 32 x 8 General Purpose Working Registers
– Up to 16 MIPS Throughput at 16 MHz
– 16K Bytes of In-System Self-programmable Flash program memory
– 512 Bytes EEPROM
– 1K Byte Internal SRAM
– Two 8-bit Timer/Counters with Prescalers
– One 16-bit Timer/Counter with Prescaler
– Real Time Counter with Separate Oscillator
– Four PWM Channels
– 8-channel, 10-bit ADC
– Byte-oriented Two-wire Serial Interface
– Programmable Serial USART
– Master/Slave SPI Interface
– 32 Programmable I/O Lines
YOU CAN NOT USE ALL AT SAME TIME – SHARE I/O PINS
Слайд 22

Microcontroller – Atmel Atmega16 YOU GET A LOT OF FUNCTIONALITY IN A SINGLE PACKAGE

Microcontroller – Atmel Atmega16

YOU GET A LOT OF FUNCTIONALITY IN A

SINGLE PACKAGE
Слайд 23

Microcontroller – Save Time By Buying a Proto board I use

Microcontroller – Save Time By Buying a Proto board

I use this

development board for almost all
of my projects.
Saves a lot of soldering and cost about $17.00
I get it from “Spark Fun”.
Слайд 24

Partial Schematic of the Rotor Controller System – Rotor interfaces 30

Partial Schematic of the Rotor Controller System – Rotor interfaces

30 VCT

xfmr

Solid State Relays
(opto isolated)

Micro Controller's power supply ( +5 vdc)

O

O

1

2

X

(

|

<

<

VCC

~20 VDC

Current source for
LCD Backlight

O

O

O

O

1

2

3

4

X

<

x

O

3

x

)|

U100

rotor

To micro controller common

Rotor common

Current limit resistor

R3

AZ –CW PA0 (pin1)

AZ –CCW PA0 (pin 2)

15 VAC

15 VAC

X

Front panel AZ Pulse LED

\/\/\/\

To I/O port pin

R1

X

3

O

O

O

O

AZ Rotor

110 VAC

\/\/\/\

R2

EL – PD7 (pin21)

To micro controller common

U100

EL Rotor

To I/O port pin

Front panel EL Pulse LED

1

4

2

X

4N25

4N25

470 2W

2K

2K

VCC

EL –UP PA2 (38)

EL–DOWN PA3 (pin37)

Слайд 25

Front Panel Switches – Interface to the Microcontroller Micro Controller Port

Front Panel Switches – Interface to the Microcontroller

Micro Controller Port assignments

(Active low)
Port A Pin 0 - Azimuth ClockWise (CW)
Port A Pin 1 - Azimuth Counter ClockWise (CCW)
Port A Pin 2 - Elevation Up
Port A Pin 3 - Elevation Down
Port A Pin 4 - Calibrate momentary pushbutton
Port A Pin 5 - Auto Track momentary pushbutton
Port A Pin 6 - Azimuth Pulse input
Port A Pin 7 - Elevation Pulse input
LCD Port assignments (4 bit data interface)
Details are in a header file
Слайд 26

Development Environment Rotor control cable Debug data Serial port Program flash

Development Environment

Rotor control cable

Debug data Serial port

Program flash memory
using “avrdude”

utility

Fedora Core 7 GNU/LINUX
With AVR-GCC tool chain

Windows – running NOVA

Novacomm1 protocol

Write/debug source code

Слайд 27

Features On My Rotor Control Box 2X16 BACKLIGHTED LCD SPST N.O.

Features On My Rotor Control Box

2X16 BACKLIGHTED LCD

SPST

N.O. Pushbutton

N.O. Pushbutton

ON-OFF-ON

ON-OFF-ON

Indicates rotor

pulse
Слайд 28

Manual Mode - AZ & EL Reading

Manual Mode - AZ & EL Reading

Слайд 29

Auto track mode – tracking AO-10 satellite

Auto track mode – tracking AO-10 satellite

Слайд 30

The Rotor Teststand

The Rotor Teststand

Слайд 31

A Look Under The Hood Rotor power Controller Board Xfmr for

A Look Under The Hood

Rotor power

Controller Board

Xfmr for controller board

Phasing caps/SS

relay boards

Rotor wires plug
In here.

Programming header

Serial in from PC
Serial out for debug

PWR cord connector

Fuse holder

Front Panel

Слайд 32

A Few Software Statistics ATMEGA 16 Controller 16KBytes Flash (Program) memory

A Few Software Statistics
ATMEGA 16 Controller
16KBytes Flash (Program) memory
512 Bytes of

EEPROM
1 K SRAM
Software Sizes
Program 13394 Bytes
Data 262 Bytes – Initialized read only data
BSS 399 Bytes – initialized read/write data
Total 13995 Bytes
30 source files
All source is written in “C”
AVR-GCC Tool Chain programs
Слайд 33

High Level Software Design BACKGROUND processing every 5 milliseconds Watch every

High Level Software Design

BACKGROUND processing every 5 milliseconds
Watch every switch in

the system
Monitor & debounce every switch in the controller
Advertise debounced state to the FOREGROUND processing
Maintain software timers
Decrement every interrupt (5 ms)
FOREGROUND processing
Manage a simple “state machine” based on operating modes:
Calibrate
Initialize
Manual
Auto
Manages the front panel LCD display & LEDs
Fault detection/recovery strategy
Слайд 34

Field Day 2008 Satellite Antenna Setup

Field Day 2008 Satellite Antenna Setup

Слайд 35

Performance Of The Controller Used successfully in last two Field Days

Performance Of The Controller

Used successfully in last two Field Days
Sensitive

to drag on the beams – coax
False detection of physical stop or obstruction
Dressing the coax better resolved this
Have changed “late pulse” detection parameters
Be sure the beams are oriented properly before raising the mast
I consider it a success but it has not seen extensive use
Слайд 36

Things Left Undone Need to get a better schematic in electronic

Things Left Undone

Need to get a better schematic in electronic form
Scattered

around in a notebook now
Finish the front panel
Print another front panel template and put plastic over it
Need to paint the box
Understand other Pulser rotors better (AR-22)
Mainly for azimuth rotor use
Motor power requirements may not be compatible
Adapt to “Potentiometer” type rotors - Perhaps
Made some accommodations, but didn’t finish this
A few things in the software to clean-up
Слайд 37

Closing Thoughts About Antenna Rotors Pulsers have many issues to consider

Closing Thoughts About Antenna Rotors

Pulsers have many issues to consider
Resolution -

must interpolate
Calibration process
Must have persistent memory (power-down) for AZ & EL position
Can find them reasonably priced at hamfests
Potentiometer type rotors seem less complicated
Always know where the rotor is
No persistent memory required for power-down
No interpolation required
No directional history needed
Less opportunity to get out of sync.
Nova tracking software may do most of the work for you
But – these rotors may be expensive!