Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Newbie question regarding Arduino in general and starter PDE

    Hello,

    and good evening Iam from Germany and just (one week ago) stumbled over Arduino and link2fs.

    At first thank you JIM. Iam building more or less since 3 years on different rigs to improve immersion in flight simming.
    At first I was building a beech baron but I quit because of limited knowledge of all and so I decided 2 years ago to build a Me 109 G 14 based on IL 2 Sturmovik with leos card and Instruments based on device link made by someone else. After finishing this Project I like still to build a beech baron. I used till now only leo s usb Card with all advantages and disadvantages and now I saw the fs2link project and seems that I understand some of the written things unlike to opencockpit sioc etc and the i/o card is affordable. Now I thank all in advance who are willing to help me to make my first steps a sucsess.

    Question s

    1. What is the meaning of rev 3 behind the ardunio uno and are there differences which can slow down my pace?
    2. Has someone already used arduino with il 2 sturmovik maybe via device link? ( I like to use key2fs via Ardunio or a interface like link2fs if on exist)
    3 Has someone expierences with copy of the original italian arduino cards (chinese trader or sainsmart)
    4. where can I get the voltmeter/amperemeter used by JIM and which specification they have?
    5. Have I put a resistor prior to the Led if they have already 5V specification and which resistor to the meters?
    6. Have some already a PDE with a advisory / caution or warning panel for fsx General a/c like the baron?

    Many questions I am looking forward to your answers

    regards Christian

    sorry for my English

  2. #2
    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: Newbie question regarding Arduino in general and starter PDE

    Welcome Christian and there's nothing wrong with your English !! Excellent.

    Now to rattle thru your questions ,,,

    !/.. Have a look at ,,,
    http://arduino.cc/en/Main/ArduinoBoardUno
    where it tells you all the differences.

    2/.. I know my Lin2fs stuff wont work with il 2 sturmovik on the extraction side of things but the "keys" section should work with inputting keystrokes (or groups of keystrokes) but I haven't tried that and haven't heard of anyone actually doing that.

    3/.. Sorry ,, never heard of them but have a look here ,,
    http://arduino.cc/en/Main/Boards
    which may show something that looks the same but that trade name doesn't show up.

    4/.. I had those meters in my "junk box" so I used them ,,, but basically anything that would give you full scale deflection with 5 volts DC (or preferably less) or 10 milliamp (or preferably less) should ?? work. I say that with reservation though because all meters are different and in the meters design, the volts/current going on inside them can kill what, on the surface, seem's like a good match ,, plus you are feeding them with PWM.
    I tested 20 milliamp meters but they didn't go to full scale deflection.

    5/.. Yes you need a resistor before an LED and also need one (generally) before a meter to limit the travel of the meter. (to stop the needle slamming over to the limit) This needs to be found out by "trial and error" as it depends on the meter.

    6/.. The only one I know of is the one in my "Link2fs_Uno1" project.
    http://www.jimspage.co.nz/uno1_interface.htm
    No doubt there will be others out there and hopefully one of the guys will post a project one day


    Hope that helps Christian ,, Jim
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  3. #3
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Newbie question regarding Arduino in general and starter PDE

    Thank you very much again JIM

    ÄHH How do you call the Voltmeter with the drum shaped scala?

    regards Christian

  4. #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: Newbie question regarding Arduino in general and starter PDE

    They are called an "Edgewise" meter ,, which is a style of meter. (it's not a manufacturers name ??)
    Googling for "edgewise meter" brings up heaps of them with a picture search.

    I feed them from the Arduino with PWM from one of the PWM pins.

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

  5. #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: Newbie question regarding Arduino in general and starter PDE

    Has anyone made a sketch and wiring for Edgewice meters?
    I'm trying to create analog instruments with Edgewise meters to my Beechcraft 350.
    (And NOW! The servos I'm going to use for other things )
    Using this 5 V meter:
    14-09-2013 12-31-26.png
    I created my own backgrounds:
    Man Press Left.jpg Fuelflow Right.jpg
    Now the question is, inputs, outputs
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  6. #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: Newbie question regarding Arduino in general and starter PDE

    Nice job Roy and good to see your still at it.

    Now driving meters ,,,
    The first thing you need to find out is the FSD. (Full Scale Deflection of the meter)
    Just because a meter says "5 volt" does not mean to say it really is ,, have you checked it ???
    If it's not as it say's you need to find out the FDS ,, I can step you thru that if needed.

    Once you know the FDS, I'll post a wee snippet for you to run in the Arduino.
    You using the Multi or the inOut ???

    Be carefull ,, we don't want you blowing up the meter. ??

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

  7. #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: Newbie question regarding Arduino in general and starter PDE

    Hey Jim, as always, quick with the responses. Thanks
    Now in the beginning of autumn here in Norway, there will be more time for the hobby.
    I made a test with a variable power source (5V from a computer ATX Power supply and a variable resistor) and digital voltmeter.
    Edgewice meter shows 1 volt, with 1 volt source. Rising steadily by increasing the source, with a small deviation. It shows a little too much. So by 4.85 volt source, the Edgewice meter shows 5 volts.
    When I measure the resistance of The Edgewice meter core, I get 4,77 K Ohm.

    Whether this was the information you were looking for, I do not know. In any case, this is all so far.
    I have not tried me on Multi yet, not looking forward of any new things.
    (Behaviour change is ok, as long as it does'nt mean that it is ME that must change! )
    But if you've got a code for the Multi, maybe this is the way to push me into it

    Sitting reading about Multi yesterday, a little skeptical when I saw a notice in the code, that you had to be careful coding not to destroy the Arduino! Am I wrong or is this possible?
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  8. #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: Newbie question regarding Arduino in general and starter PDE

    Yes it is and it always has been the case ,,, make a pin into an output pin and when it's 'on' there is 5 volts available at a maximum of 40 milliamps.
    Now throw a switch onto that pin and close it ,, you are effectively shorting out the output pin ,, after a wee while things can happen.
    They are pretty forgiving tho ,, I've had a few short term boo-boo's and they have always survived.
    This isn't a new revalation ,, it's there on most other breed's of cards as well, although really expensive one's can have protection for that ,, other cards only output about 3 or 4 milliamps to overcome that risk. Basically I was just reminding Guys to be carefull with the 'setup' code.

    Anway ,, here's a INO for you to play with your meter on pin 10 ,,, again it's crowded out with comments and the code is presented "long hand" so it's easier to understand what is happening where.
    It has been tested so I know it works.


    Have fun ,, Jim



    Code:
    /* A bare bones demo of driving a meter
    The meter used has 5 volt FSD (Full scale deflection)
    Tick "M" (Flaps) in Link2fs_inOut
    Have the meter connected to pin 10 on the Arduino
    Compiled with Arduino IDE version 1.1
    NOTE ,, there are only specific pins on the Arduino for PWM outputs.
    */
    int j1;
    String flaps;
    
    void setup() {
    pinMode(10, OUTPUT);
    digitalWrite(10, LOW); 
    Serial.begin(115200); 
    Serial.flush(); 
    }
     
    void loop() {
      if (Serial.available() > 0) {
        j1 = Serial.read();
        if (j1 == 'M'){    // Found the reading "Flaps"
          delay (11); // It seems to need a delay here
          flaps = "";
          flaps += char(Serial.read());
          flaps += char(Serial.read());
          flaps += char(Serial.read());
          int flapsInt = flaps.toInt(); // convert it to an integer (Thanks Phill)
          flapsInt = map(flapsInt, 0, 57, 0 ,255);//map the integer
          analogWrite(10,flapsInt); 
          //Serial.print(flapsInt); //for testing
         }//end of found "M"
      }//end of serial read
    }//end of void loop
    
    /*
    Notes on that mapping line above.
    First digit (0) is the minimum figure expected from link2fs
    Second digit (57) is the maximum figure expected from link2fs
    (On the Baron in FSX the flaps fully down is 57)
    Third digit is the minimum PWM signal being sent to the meter
    Forth digit is the maximum PWM signal being sent to the meter (Maximum is 255)
    (So if your meter slam's right over, lower the 255 or include a resistor in series with the meter)
    */
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

  9. #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: Newbie question regarding Arduino in general and starter PDE

    Thanks for the clarification Jim
    Now I understand what I read. (And I suppose I've done that all the time). Unfortunately, sometimes one takes things out of context when reading a foreign language!

    Code is simple enough. As I understand, this code is for use with InOut.
    Is it too much to ask for the same to Mega? I have some problems with starting the transition to the new program. I hope that by being able to compare such a simple bit of code, I would be able to better understand what's the difference.

    EDIT:
    OK. It seems that it works poorly with turbo prop engines.
    When I switch to airplane with piston engines, it works.
    I Have tried with the InOut, and tried to insert different values​​, ranging from what the application displays in the " Data sent to Com. Port" , to various other values. No luck! But with ie, the Beechcraft Baron 58, it works.

    Here are some examples of readings from the " Data sent to Com. Port"

    Beechcraft King Air 350, Idle RPM "O18094" (This value I can't get to work)
    Beechcraft Baron 58, Idle RPM "O00727 (This value vorks)
    Life was hard, but then came Windows 7.
    Now we can fly! --------
    --------

  10. #10
    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: Newbie question regarding Arduino in general and starter PDE

    Of course it wont work ,, it was meant as a demo and needs to be fiddled with for specific tasks.

    Here's one that will do the 350 engine RPM but read the comments carefully.

    As you can't change the profile for each plane in "inOut" you should be using the "Multi" if you are going to be changing planes from time to time.
    Then you can set up 'profiles' for each different type of plane and the values change automatically in the Arduino.

    Good luck ,,, Jim





    Code:
    /* A bare bones demo of driving a meter
    The meter has 5 volt FSD (Full scale deflection)
    Tick "O" (eng1rpm) in Link2fs_inOut
    Have the meter connected to pin 10 on the Arduino
    Compiled with Arduino IDE version 1.1
    NOTE ,, there are only specific pins on the Arduino for PWM outputs.
    Note ,, This is to suit the Kingair 350 engine RPM
    The rev's can go over 50000 if, at full revs you slam it into reverse thrust.
    No need for fine resolution at that rate so don't serial-read the last 2 figures.
    Reminder ,, The maximum value of an integer in the arduino is 32,767.
    This code has been tested 18-9-13
    */
    int j1;
    String eng1rpm;
    
    void setup() {
    pinMode(10, OUTPUT);
    digitalWrite(10, LOW); 
    Serial.begin(115200); 
    Serial.flush(); 
    }
     
    void loop() {
      if (Serial.available() > 0) {
        j1 = Serial.read();
        if (j1 == 'O'){    // Found the reading "eng1rpm"
          delay (11); // It seems to need a delay here
          eng1rpm = "";
          eng1rpm += char(Serial.read());
          eng1rpm += char(Serial.read());
          eng1rpm += char(Serial.read());
          //Serial.read();
          //Serial.read();
          int eng1rpmInt = eng1rpm.toInt(); // convert it to an integer (Thanks Phill)
          eng1rpmInt = map(eng1rpmInt, 0, 550, 0 ,255);//map the integer
          analogWrite(10,eng1rpmInt); 
          //Serial.print(eng1rpmInt); //for testing
         }//end of found "M"
      }//end of serial read
    }//end of void loop
    
    /*
    Notes on that mapping line above.
    First digit (0) is the minimum figure expected from link2fs
    Second digit (550) is the maximum figure expected from link2fs(Your not reading the last 2 digits)
    (On the kingair 350 in FSX the RPM can go over 50000 revs.)
    Third digit is the minimum PWM signal being sent to the meter
    Forth digit is the maximum PWM signal being sent to the meter (Maximum is 255)
    (So if your meter slam's right over, lower the 255 or include a resistor in series with the meter)
    */
    www.jimspage.co.nz/intro.htm
    All this and Liz still loves me ! !

Page 1 of 2 12 LastLast