Interfacing a microcontroller (Arduino) to a CDE Antenna Rotor

Discussion in 'Radio Circuits, Repair & Performance' started by WA7ARK, Sep 30, 2018.

ad: L-HROutlet
ad: l-rl
ad: MessiPaoloni-1
ad: Subscribe
ad: L-MFJ
ad: Left-2
ad: Left-3
  1. WA7ARK

    WA7ARK Ham Member QRZ Page

    My friend Dan asked me how to modify a CDE HAM-x rotator and controller so that he could get an analog voltage proportional to beam heading into a Analog-to-Digital Converter in his station-control microprocessor:

    I downloaded the manual for the CDE HAM-2 and extracted this schematic: upload_2018-9-30_15-15-30.png

    With respect to the meter circuit, I think the newer HAM-x models are similar.

    I modeled the existing CDE meter circuit in LTSpice. The LTSpice schematic and plot of current through the meter is shown:

    Look at the CDE schematic, and compare that to the LTSpice schematic that I made. I am showing the Cal switch connected to ground, assuming that it is in the normal "operate" position.

    First, notice that the meter circuit power supply is a floating 13Vdc supply, regulated (somewhat primitively) by a 13V Zener, which I model as a 13V Spice ideal voltage source V1. Neither end of V1 is grounded. V1 is connected to station ground only at the wiper of the 500 Ohm pot used as the heading transducer, inside the rotor itself. The ground connection is carried from tower top to the CDE controller on wire 1 in the rotor cable. The plus and minus end of the floating supply is connected between the controller to the rotor pot as wire 3 and wire 7, respectively.

    I created a simulation model of the Rotor pot, where the beam azimuth is the independent variable (parameter "Az" in degrees), and that controls the resistance of the two pot arms. Note that as Az changes, the resistance of one arm of the pot gets bigger as the other gets smaller .

    I plot the current through the meter movement I(V2) on the y-axis as a function of Az along the X-axis as Az changes from 0.01 degree to 359 degrees in steps of 2 degrees. The variable Az changes the resistance of the top half and bottom half of the pot per the expressions alongside the pot arms.

    The plot of I(V2) vs Az shows that if the Cal pot is set to ~3K, (near center of its range), the current in the meter goes from ~0mA at ~0degrees to 1mA at 359degrees, meaning that the meter is a 1mA full-scale DC meter movement. No surprise, since I = E/R = 13/(10K+3K) = 1mA, essentially the 13K in series with the meter turns the 1mA meter into a voltmeter that reads 13V full-scale.

    Dan wants to get an output voltage to drive the Analog-to-Digital Converter input on his microprocessor such that 0deg is 0V, 180deg is 0.5V, and 360deg is 1.0V. Here is what I came up with:


    Since the meter current ranges from 0 to 1mA, let us rearrange the meter calibration resistors to pick off the required 1V, but referenced to station ground. (No op-amps required).

    Make the following modifications inside the CDE control box as pictured in the second LTSpice schematic. First, shunt R1, 10K with a new R5 (100K) resistor, effectively reducing R1 to 9.1K. You could also do this by replacing R1 with a 9.1K resistor.

    Second, add a new 1K 1% resistor (R6) between the right end of the Cal pot and the common terminal of the Cal Switch. Third, add a new electrolytic capacitor C1, 100uF (3 to 15Vdcwv) as shown. Connect the left end of R6 to a wire that goes to the center pin of a new RCA phono jack or BNC jack that you add to rear of the CDE controller box. This is where you take your A/D output, referenced to the station ground, using a shielded cable. Re-calibrate the rotor per the manual after the mod.

    For Dan's use, the 1mA of full-scale meter current at 360 degrees produces a 1V drop across the new 1K resistor R6. That voltage is proportional to rotor azimuth. The bypass capacitor shunts the output for RF and transients and otherwise doesn't effect the slowly changing voltage. The output impedance is more than low enough to drive the Analog input pin on your microprocessor.

    If someone else needs to interface the CDE controller to an Arduino, which wants a voltage that ranges from 0V to 5V at its analog input, then make R1 and R6 each 4.99K 1%. I'll let you do the math if your A/D converter expects a full-range input of 2.5 or 3.3V...

    An improvement to the CDE meter circuit would be to discard the 13V Zener, and replace it with a 7812 three-legged voltage regulator IC. There should be enough adjustment range in the Calibrate pot to compensate for 12V instead of 13V. This would make the meter reading (and AD values) more stable with fluctuating temperatures and line voltage.
    KK4CUL likes this.
  2. NK7Z

    NK7Z Premium Subscriber QRZ Page

  3. W8VOS

    W8VOS Ham Member QRZ Page

    Thank You!
  4. K7JEM

    K7JEM Ham Member QRZ Page

    I think it would also be a good idea to add a smaller ceramic disc bypass across the new 100uF cap, and also at the other end of the cable where it attaches to the A/D converter, since larger electrolytics don't work well for bypassing the RF which might be present.

    Perhaps if you change to a 7812, you would also change the original value of the shunt resistor from 100K to 43K to give a value close to 8K on the "high side" of the meter. The thing to remember is that the value of all of the series resistors (in k-ohms) in the circuit will always add up to the DC voltage being supplied by the source. The original circuit used 10K plus 3K in the calibration pot. The modified circuit uses 9K plus 3 plus 1, for a total of 13K. If you change to a 12v source, you would shoot for 8K plus 3K plus 1K for a total of 12K.

    Also, a 1K 5% resistor should work just fine in a circuit like this where the precision just isn't there or expected. They are a lot more common.
  5. VE2PF

    VE2PF Ham Member QRZ Page

    I really like the Idea how you came up with the solution for that request..

    That way, if the arduino fail it will not prevent the orginal meter from showing the right direction..

    I would have gone a different way but the orginal meter would have been driven by a DAC on the microcontroler.. and if it would fail, it would not show the direction anymore.. Nice really nice.. Now back at the arduino IDE to code that into my tensy 3.2 ;-)
  6. KC4KK

    KC4KK Ham Member QRZ Page


    Nice thread. I am trying to interface Arduino (external box) with the relays (Seed Studio relay board) inside the Ham IV control box. Problem I am having is that the ADC output ground/reference. The rotor pot wiper connects to the system ground. Not DC ground and that is the ground connection to the Arduino. If you connect grounds the circuit does not work correctly. I see same issue with simulation.
  7. WA7ARK

    WA7ARK Ham Member QRZ Page

    Look again. That was exactly the problem I solved with mods to the HamM control-box in the original posting...

    Both the tower and the CDE control box are connected to "earth" ground and the AD in the u-processor is also referenced to "earth".
    Last edited: Feb 6, 2019

Share This Page