Antenna Rotator position K3NG problem with feedback line to UNO

I’m currently in to a Ham radio project using an Arduino UNO and a dual relay Shield. (Elevate up and down).

The basic operation is functional with no problems at all. However I need to understand how the system sends feedback to the UNO and how it is displayed on the LCD as a feedback.

The problem I’m running in to is the choice of pin on the UNO board to use for this connection?
According to my documentation there is a 4N25 which accepts the pulse from rotator motor and converts this in to a optoelectronic sensor which sends that signal to the UNO.

But it says to connect this lead to pin21 (PDD7) but this is not the “AREF” which shows to be Pin21
however PDD7 is physically on pin 13 or( Digital pin 7).

I know this can be controlled by code in the sketch but “Digital” pin 7 is used in this application as a programmable output either High or low to the relay.

What I’m asking is if it is safe to use physical pin 21 (AREF) since it is an analog pin as the feedback point for the +5VDC pulse from the 4N25 opto-isolator ciruit?

Any help would be greatly appreciated. :confused:

According to the datasheet physical pin 21 (AREF) can only be used as the analogue reference voltage, there are no alternate functions for this pin - no read/write or analogue stuff.

Post the sketch and I'm sure that someone will be able to tell you which pin to use.

Don't use the Aref pin.
There's a pin21 on a Mega.
Code seems a bit big for the Uno.
I think this is the project page.
And this is the code.


If it is the project Wawa refers to;
This is an AZ/EL rotator, by the looks of the sketch it uses ENCODERS to feedback position.
Can you post a link to the circuit diagram of the AZ/EL rotator please.

In fact looking here;

It is a multi function sketch for potentiometer or encoder input.

Tom... :slight_smile:

The diagram from this the site, indicates that it uses analog feedback of AZ and EL.

This document will help;

Tom… :slight_smile:

Use the following as your reference for the potentiometer. On the pot, connect the wiper pin to A0, and the other pins on the pot to 5v and GND respectively, doesn't matter which.

#define rotator_analog_az A0 // reads analog azimuth voltage from rotator This the pin that you connect the

Good luck with your project.

Larry, W4LML