Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Lightbulb Cheap DIY Vertcal Speed Indicator

    Cheaper than this, surely you can't do it?
    Hardware Required:
    - 1 old alarm clock (Use your wife's alarm clock, no expense. When she finds out, she will not yell at you, because you're so happy with you're new instrument )
    - 1 servo, $2.00
    - 1 led, $0.04
    - some glue.
    - 1 sheet of photo paper.
    - double sided tape to tape the background to the instrument.
    A little glue and a servo .... and I was on my way.
    The next is to make a code, to get the neadle mouving.
    Jims tread about the Varspeedservo, will come in handy. http://www.mycockpit.org/forums/showthread.php?t=27094
    1.jpg 2.jpg 4.jpg 3.jpg
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  2. #2
    Executive Assistant Geremy Britton's Avatar
    Join Date
    Jul 2007
    Location
    North,East England
    Posts
    1,597
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Looks great, is there a video of it working!

    Good work
    Geremy Britton
    Executive Assistant, MyCockpit Inc
    Head of GLB Flight Products
    www.geremy.co.uk

  3. #3
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Quote Originally Posted by Geremy Britton View Post
    Looks great, is there a video of it working!
    Yes, now there's a video!
    Took some time because I had chosen the wrong background on the instrument, but now it fits my Beech King Air 350.
    It also took some time to find the correct values ​​in the Sketch, to get the servo to work satisfying,
    but now it's pretty accurate to +300 / -300 feet per minute.
    I'm pretty happy with that.
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  4. Thanks Jim NZ, samfranklin, Fess_ter thanked for this post
    Likes samfranklin, evvatc liked this post
  5. #4
    500+ This must be a daytime job Jim NZ's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    764
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Nice Buzzi ,, very nice.
    I was wondering at what 'cycle speed' your running that at ,,, although it's fine as it is, the cycle speed might smooth out some of the bumps or maybe that verispeed servo library in that other thread ,,, don't get me wrong ,,, it's great what you've got ,,, my "experiment" brain has taken over and I am just curious.

    There's got to be some Kiwi blood in ya.

    Nice unit Buzzi ,,,, just shows what can be done ,, thanks.


    Cheers ,,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  6. #5
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Thanks Jim. Alvays good with some credit (And I do NOT forget, that non of this would be possible without You! THANKS )
    I was running Link2fs at 200 (M/s). And same as you, I was thinking about it later, that a shorter cycle would smoothen it.
    That sayd, I could not get the verispeed servo library to work due to one thing! When using a gear, I had to reverse thing in the code.
    Her is what I could get to work:
    Code:
    #include 
    Servo VSpeedServo;
    String VSpeed;
    
    void setup(){  
       VSpeedServo.attach(9); // The servo pin
       VSpeedServo.write(90);  // set servo to mid-point
       Serial.begin(115200); 
    
    void LESSTHAN(){    // The first identifier was "<"
           CodeIn = getChar(); // Get another character
           switch(CodeIn) {// Now lets find what to do with it
    case 'L': //Found for reading the Vertical Speed     
       VSpeed = "";
       VSpeed += getChar();
       VSpeed += getChar();
       VSpeed += getChar();
       VSpeed += getChar();
       VSpeed += getChar();
    
          int VSpeedi = VSpeed.toInt(); 
          VSpeedi = map(VSpeedi, -510, 500, 180, 0);   // 180, 0 - normaly 0, 180 reversed due to the gear! 
          VSpeedServo.write(VSpeedi); 
        break;
    }
    }
    I could neither find a way to get around the reverse thing, using your "Multi_Keys_with_flaps_servo.ino".
    And as you stated, "Using the "Map" method slows it down".
    A lot af time spent on the (VSpeedi, -510, 500, 180, 0), I guess this changes from type to servo, and therefore won't be a blueprint for everyone!
    Maby som of you guys have another solution to this?

    EDIT: After bedtime, the mill began to grind!How to adjust the climb/descend feet minute, on the instrument? So her we go aganin Have bought more acrylic glass and come up with a solution.
    13-12-2013 13-43-32.jpg
    To achieve this, I guess I probably must come up with a solution for dividing the number of encoder counts, before it is send to Link2fs. Or is it already this you have done Jim, in this R = (quad1.position () / 2);
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  7. #6
    500+ This must be a daytime job Jim NZ's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    764
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Spooky ,,, I tossed around idea's in what's left of my brain and came up with this ,,,

    Option 1,,,
    Have a setup like you have drawn using a 10 turn pot ,,, in the Arduino do the mathematics and send it back to the multi.
    Not very elegant way of doing things tho.

    Option 2 ,,,
    Have your bug driven by a servo that gets it's position from the Multi.
    Meanwhile ,, the knob is turning a rotary encoder and sending the pulses back to the Multi.
    (Probably the better option)

    Now the code above ,,, I appears that you are still using the ordinary Arduino servo library and just named the servo "vspeedservo" ???
    The one I mentioned was called "varspeedservo" (thanks to Eric) I had never heard of it before but it sounds promising with the speed setting in it.

    Anyway ,,, have a look at the samples on that site and nut it out from there.

    I was wondering if you tried you original INO with a setting of 50 in the cycle time ????
    Another thing to try was to read 6 incoming serial reads and increase the -500 and 500 to -5000 and 5000.

    At the moment you are reading only 5 which basically divides the result by ten ,, which would be more than enough ,, I was just curious with all the extra readings whether it affected it or not.

    Happy fiddling ,,, Jim

    Ooops ,,,
    The line ,,
    R = (quad1.position () / 2);
    was to suit the type of encoder I was using (half cycle / full cycle stuff ,, nothing else)
    Last edited by Jim NZ; 12-14-2013 at 03:58 AM.
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  8. #7
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Hey Jim.
    Slightly dejected after your last reply, I sat there wondering.
    This then could not kick the bones under my new idea!
    I could not let this issue rest, so I spent the day writing a code that counts the number of steps of the encoder, and after a specific number of steps, allowing serial.print of the Decrements/Increments of vertical speed reference.
    This will come in handy if using gears in conjunction with the Rotary Encoder.
    I have tried the code with Link2fs Multi and it works.
    I note, though, that not all cunts are equal before alowing the Serial.print. There should probably should have been written some sort of debounce in the code (I do not know how to do that) or maby one should use a hardware debounse with resistors? Ideas?
    Anyway, I have made drawings of the gears, and will eventually start producing them. This project WILL in Port
    Code:
    /*This sketch counts how many steps the rotary encoder moves. 
    When it has counted the "specific" number of steps, it will allow the Serial.print */
    
    
    #include "math.h"
    #include "Quadrature.h"
    Quadrature VSreference(8, 9);
    
    
    int EncoderCounter = 0; // Stores the conts
    
    
    int CodeIn;// used on all serial reads
    int KpinNo; 
    int Koutpin;
    // New, old and variable of the Vertical Speed Reference Rotary Encoder
    int VSr;// a variable
    int VSrold;// the old reading
    int VSrdif;// the difference since last loop
    
    
    void setup() {
     Serial.begin(115200);   
    }
    void loop() {
      {ENCODER();} //Check the Rotary Encoders
      if (Serial.available()) {// Check if serial data has arrived from PC
        CodeIn = getChar();
      }
    }
    char getChar()// Get a character from the serial buffer
    {
      while(Serial.available() == 0);// wait for data
      return((char)Serial.read());// Thanks Doug
    }
    
    
    void ENCODER(){
      
    VSr =(VSreference.position()/2); //The /2 is to suit the encoder(See my website)
      if (VSr != VSrold) { // checks to see if it different
        (VSrdif = (VSr-VSrold));// finds out the difference
      
       EncoderCounter ++; // increments the count
         if (VSrdif == 1 & EncoderCounter % 8 == 0) { // Counts up to 8, and Decrements vertical speed reference.
        Serial.println("B14");
      }
      else{   
       if (VSrdif == -1 & EncoderCounter % 8 == 0) { // Counts up to 8, and and Increments vertical speed reference.
       Serial.println ("B13"); //Com1 Mhz up 
      }
     VSrold = VSr; // overwrites the old reading with the new one. 
      }   
    }
    
    
    }
    PS! The "vspeedservo" was shorten for vertical-speed-servo
    Last edited by BuzziBi; 12-14-2013 at 05:00 PM. Reason: I forgot something
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  9. #8
    500+ This must be a daytime job Jim NZ's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    764
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    Mmmm not sure if I should answer this one but I still like my above suggestions better.

    The trouble with using RE's (rotary encoders) is they are only a means to increase or decrease something ,,, they have no position sensing with them.

    To hook up a rotary encoder shaft to an indicating dial/bug will always go out of kilter no matter how good you make the setup and even if you change planes then it could be all to heck as well.
    You need proper position feedback to FSX of the position of the bug ,,,, or ,,,, drive the bug from FSX.

    Sorry Buzzi ,, keep thinking tho ,,, that's where great idea's come from.

    See ya ,,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  10. #9
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    PJuuuuiiii! (Breathing heavily!)
    I hate to admit it, but you're right! Back to serious thinking.
    I must come up with an idea to control the bug with a servo then.
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  11. #10
    150+ Forum Groupie BuzziBi's Avatar
    Join Date
    Mar 2013
    Location
    Norway
    Posts
    275
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Cheap DIY Vertcal Speed Indicator

    I was thinking (any case, I'm trying)
    What if I use leds instead of a mechanical bug? Eg every five hundred feet. (That should be enough).
    So if I know that the led at zero feet is HIGH, allow serial.print, up or down with five hundred feet.
    Is there another way to do it than:
    Code:
    if (Rdif == 1) Serial.println("B13")&&Serial.println("B13")&&Serial.println("B13")&&Serial.println("B13")&&Serial.println("B13");
    And what am I overlooking using this method?
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

Page 1 of 2 12 LastLast