Arrow Antenna/HRD/Arduino/Servo Build Thread

Discussion in 'Satellite and Space Communications' started by KE5SWU, Jan 8, 2010.

Thread Status:
Not open for further replies.
ad: L-HROutlet
ad: l-rl
ad: Subscribe
ad: L-rfparts
  1. KE5SWU

    KE5SWU Ham Member QRZ Page

    Well for Christmas my wonderful wife got me an Arduino. For those who are not familiar with them here is a link:

    http://en.wikipedia.org/wiki/Arduino

    So far I been playing with it and having fun, doing the little projects one can do with the stuff included in the kits. I am ready for my first personal real project with this little micro-controller. I don't know what I am doing so here are the different projects that might end up as something finished.

    1. Build a mounting bracket and powered turret to hold the arrow 2 satellite antenna. Was going to try to make something from scratch but found this:
    http://www.servocity.com/html/spt200_pan___tilt_system.html
    [​IMG]

    Why re-invent the wheel if I don't have to, I think it might have enough umf to hold the 19oz antenna.


    2.Figure out how to control the servo's on the turret with the ardiuno. At first this will be just to a fixed locations/direction. This is so learn how the software works how best to control the servos.

    I am planning on starting with this guys code:
    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1234233845
    Same idea but he is wanting to use Predict instead of HRD.

    3.Get the arduino to talk to HRD. This part has my head hurting. Might just not do it all and use this guys code and just make the system stand alone:
    http://sites.google.com/site/qrptracker/

    My goal this week is to order some h-bridge chips, I wish Radio Shack still sold them, and go to the flea market and find some servos. I will use this thread as the repository for the on going project. If anyone has any pointers or wants to help toss your 2 cents in, the more minds the better. I will post all the code I use here. Because I am using a micro-controller I don't see why with a little bit more work this could not be used as a nice tool for fox hunts too.



    -James
     
  2. KD5PME

    KD5PME Ham Member QRZ Page

    Good idea. I was looking to something similar, but didn't know what mount to use.
     
  3. KE5SWU

    KE5SWU Ham Member QRZ Page

    The mount was hard for me to figure out too. I have all the tools to make one out of metal but the cost of aluminium is so high I don't think I could make one for the price servocity is selling the one pictured above. If it does not work to actually hold the antenna it will still work for proof of concept and help me get the code working.
     
  4. KC8WBK

    KC8WBK Ham Member QRZ Page

    I have use the Arduino to control servos, it is not too difficult. There are instructions on how to do it on the Arduino website.

    Some other things I have done with the Arduino:

    Use a thermistor and have it flash the temperature in CW on an led

    Use a thermistor, relay and small freezer and act as a thermostat for a beer cooler

    Set it up as a dc motor controller using pwm

    I have done some other stuff as well, but it has been a few years. The arduino is really fun and easy to get to do things.

    The best advice I have is to start with small scripts getting it to do just one thing and then add on to the script little by little. Writing a big script and then debugging it is much harder than adding incremental lines to the script.

    Its really fun to combine controlling servos and motors with programming. I know of someone who uses an Arduino to control his outdoor woodburner heat and hot water system.
     
    Last edited: Jan 9, 2010
  5. KE5SWU

    KE5SWU Ham Member QRZ Page

    No real updates, had to do a little savings before I placed my order with Sparkfun. This is what I ordered to start with:
    ROB-09402 EasyDriver Stepper Motor Driver 1 $14.95
    ROB-09238 Stepper Motor with cable 1 $14.95
    LCD-00791 Basic 16x2 Character LCD 1 $14.90
    - Red on Black 5V
    COM-00315 H-Bridge Motor Driver 1A 4 $9.40

    This should be enough get me started and get some code written. I will post up pics when the package shows up.
     
  6. KE5SWU

    KE5SWU Ham Member QRZ Page

    Well I have a little bit of progress. I have the LCD wired up and the servo working. My goal here is get all the wiring correct. I am using the following code:

    LCD Sketch:
    From here:http://www.arduino.cc/en/Tutorial/LiquidCrystal

    /*
    LiquidCrystal Library - setCursor

    Demonstrates the use a 16x2 LCD display. The LiquidCrystal
    library works with all LCD displays that are compatible with the
    Hitachi HD44780 driver. There are many of them out there, and you
    can usually tell them by the 16-pin interface.

    This sketch prints to all the positions of the LCD using the
    setCursor(0 method:

    The circuit:
    * LCD RS pin to digital pin 12
    * LCD Enable pin to digital pin 11
    * LCD D4 pin to digital pin 5
    * LCD D5 pin to digital pin 4
    * LCD D6 pin to digital pin 3
    * LCD D7 pin to digital pin 2
    * 10K resistor:
    * ends to +5V and ground
    * wiper to LCD VO pin (pin 3)

    Library originally added 18 Apr 2008
    by David A. Mellis
    library modified 5 Jul 2009
    by Limor Fried (http://www.ladyada.net)
    example added 9 Jul 2009
    by Tom Igoe
    modified 22 August 2009
    by Tom Igoe

    http://www.arduino.cc/en/Tutorial/LiquidCrystal
    */

    // include the library code:
    #include <LiquidCrystal.h>

    // these constants won't change. But you can change the size of
    // your LCD using them:
    const int numRows = 2;
    const int numCols = 16;

    // initialize the library with the numbers of the interface pins
    LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

    void setup() {
    // set up the LCD's number of rows and columns:
    lcd.begin(numRows, numCols);
    }

    void loop() {
    // loop from ASCII 'a' to ASCII 'z':
    for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) {
    // loop over the rows:
    for (int thisRow= 0; thisRow < numRows; thisRow++) {
    // loop over the columns:
    for (int thisCol = 0; thisCol < numCols; thisCol++) {
    // set the cursor position:
    lcd.setCursor(thisCol,thisRow);
    // print the letter:
    lcd.print(thisLetter, BYTE);
    delay(200);
    }
    }
    }
    }


    Simple Stepper Sketch:
    http://danthompsonsblog.blogspot.com/2008/09/easydriver-v31-tutorial.html

    ////////////////////////////////////////////////////////
    // Stepper Motor skecth for use with the EasyDriver 3.1
    ////////////////////////////////////////////////////////

    // Dan Thompson 2008
    //
    // Inpired by the code and chat on this thread.
    // http://forum.sparkfun.com/viewtopic.php?t=10378&highlight=easydriver
    //
    // Use this code at your own risk.
    // For all the product details visit http://greta.dhs.org/EasyDriver/
    // For the full tutorial visit http://danthompsonsblog.blogspot.com/
    //

    int dirpin = 3;
    int steppin = 12;

    void setup() {
    Serial.begin(9600);

    pinMode(dirpin, OUTPUT);
    pinMode(steppin, OUTPUT);
    }
    void loop()
    {

    int i;

    digitalWrite(dirpin, LOW); // Set the direction.
    delay(100);

    Serial.println(">>");
    for (i = 0; i<4000; i++) // Iterate for 4000 microsteps.
    {
    digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
    digitalWrite(steppin, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(200); // This delay time is close to top speed for this
    } // particular motor. Any faster the motor stalls.

    digitalWrite(dirpin, HIGH); // Change direction.
    delay(100);

    Serial.println("<<");
    for (i = 0; i<4000; i++) // Iterate for 4000 microsteps
    {
    digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
    digitalWrite(steppin, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(200); // This delay time is close to top speed for this
    } // particular motor. Any faster the motor stalls.

    }

    I am now trying to combine the code so they are both running at the same time. The only other piece of hardware left to do is add two buttons to control the position of the motor. After that is wired up in theory it should all be software. But many more steps before we have an satellite tracker.
     
  7. KE5SWU

    KE5SWU Ham Member QRZ Page

    Just to be silly I just did the math to see where my little paper print out antenna would resonate, 12ghz. LOL, the driven element is about .4" long.
     
  8. KE5SWU

    KE5SWU Ham Member QRZ Page

    Well step one is done. Figured how to use the display and the stepper at the same time. I have not programmed since my freshman year and college and that was pascal. So this has been quite the learning experience for me, but lots and lots of fun. Found myself up till 2am this morning working on it and loved every minute of it.

    So basically all this program does is spin the stepper and display its position in degrees on the display. This weekend I will try to introduce some buttons to change direction or maybe even a pre-defined angle.

    ////////////////////////////////////////////////////////
    // Stepper Motor skecth for use with the EasyDriver 3.1 and an LCD
    ////////////////////////////////////////////////////////


    //
    // include the library code:
    #include <LiquidCrystal.h>
    // these constants won't change. But you can change the size of
    // your LCD using them:
    const int numRows = 2;
    const int numCols = 16;
    // initialize the library with the numbers of the interface pins
    LiquidCrystal lcd(11, 10, 9, 8, 7, 6);

    int dirpin = 3;
    int steppin = 12;
    float screen = 0; //Counter for the Display
    int MS1 = 1; //MS1 Microstep Resolution
    int MS2 = 2; //MS2 this pair sets the resolution to Half step
    void setup() {
    Serial.begin(9600);

    pinMode(dirpin, OUTPUT);
    pinMode(steppin, OUTPUT);
    pinMode(MS1,OUTPUT);
    pinMode(MS2,OUTPUT);

    // set up the LCD's number of rows and columns:
    lcd.begin(numRows, numCols);

    }

    void loop()
    {

    int i;
    digitalWrite(MS1,HIGH);
    digitalWrite(MS2,LOW);
    digitalWrite(dirpin, LOW); // Set the direction.
    delay(50);

    Serial.println(">>");
    for (i = 0; i<1; i++) // Iterate for 1 microsteps.
    {
    digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
    digitalWrite(steppin, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(200); // This delay time is close to top speed for this particular motor. Any faster the motor stalls.
    }


    lcd.setCursor(0,0);
    lcd.print(screen);
    if (screen > 360)
    {
    screen = 0;
    }
    else {
    screen = screen + .9;
    }
    }
     
  9. KE5SWU

    KE5SWU Ham Member QRZ Page

    Well this project is taking a lot longer than I expected. I got my new LCD display in and also picked up an old CDE TR-4 rotator. I am hoping it is not to hard to control the TR-4 via the the arduino. Does anyone know what voltages the TR-4's motor requires?
     
  10. N7SET

    N7SET Ham Member QRZ Page

    Good luck with the project. A coworker and I were looking into building such a setup. I'm quite surprised that there aren't any camera tripod-mountable AzEl rotators out there. Initially we were thinking about using steppers to control the movement, but then realized that it was overkill and too expensive. We were going to go with servos and probably a potentiometer like all other rotators (like you said, why reinvent the wheel, right?). As you found out, getting the Arduino to talk to HRD via some sort of protocol is a pain. Most of the protocols that HRD 'speaks' for AzEl are not well documented or are proprietary, which makes for a frustrating experience. Easycomm may be the best bet since it seems to be the most open. Someone with better "Arduino-fu" than myself should be able to make it work (and make a library to share!).
    http://www.amsat.org/amsat/ftp/software/win32/wisp/easycomm.txt

    Excellent idea on the pre-made pan/tilt mechanism. That's one place where we were scratching our heads, too. I have an X10 Ninja mount, but it lacks the freedom of movement (and oomph) to move an Arrow. My coworker was the person with the background in microcontrollers, but this has piqued my interest again. I look forward to your updates!
     
Thread Status:
Not open for further replies.

Share This Page